diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/CHANGELOG.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/CHANGELOG.md index a87f3374d4a5b..6563f2603a23e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/CHANGELOG.md +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/CHANGELOG.md @@ -1,14 +1,687 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.2 (2026-10-19) -### Features Added +- Azure Resource Manager Azure Stack Hci Vm client library for Java. This package contains Microsoft Azure SDK for Azure Stack Hci Vm Management SDK. Azure Stack HCI management service. Package api-version 2026-07-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.VmImageRepositoryCredentials` was removed + +#### `models.VirtualMachineInstancePropertiesStorageProfileOsDisk` was modified + +* `validate()` was removed + +#### `models.NetworkSecurityGroupStatus` was modified + +* `validate()` was removed + +#### `models.VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig` was modified + +* `validate()` was removed + +#### `models.Subnet` was modified + +* `validate()` was removed + +#### `models.GalleryImageVersionStorageProfile` was modified + +* `validate()` was removed + +#### `models.VirtualHardDiskDownloadStatus` was modified + +* `validate()` was removed + +#### `models.StorageContainerStatusProvisioningStatus` was modified + +* `validate()` was removed + +#### `models.SubnetIpConfigurationReference` was modified + +* `validate()` was removed + +#### `models.SshConfiguration` was modified + +* `validate()` was removed + +#### `models.GalleryOSDiskImage` was modified + +* `validate()` was removed + +#### `models.NetworkInterfaceStatusProvisioningStatus` was modified + +* `validate()` was removed + +#### `models.NetworkInterfacesUpdateProperties` was modified + +* `validate()` was removed + +#### `models.SecurityRuleProperties` was modified + +* `validate()` was removed + +#### `models.LogicalNetworkArmReference` was modified + +* `validate()` was removed + +#### `models.VirtualMachineInstanceView` was modified + +* `validate()` was removed + +#### `models.VirtualMachineInstancePropertiesPlacementProfile` was modified + +* `validate()` was removed + +#### `models.GuestAgentInstallStatus` was modified + +* `validate()` was removed + +#### `models.StorageContainerTagsUpdate` was modified + +* `validate()` was removed + +#### `models.VirtualHardDiskUploadRequest` was modified + +* `validate()` was removed + +#### `models.LogicalNetworkStatusProvisioningStatus` was modified + +* `validate()` was removed + +#### `models.SshPublicKey` was modified + +* `validate()` was removed + +#### `models.VirtualMachineInstanceUpdateRequest` was modified + +* `validate()` was removed + +#### `models.Route` was modified + +* `validate()` was removed + +#### `models.LogicalNetworksUpdateRequest` was modified + +* `validate()` was removed + +#### `models.VirtualMachineInstancePropertiesStorageProfile` was modified + +* `validate()` was removed + +#### `models.MarketplaceGalleryImageStatusDownloadStatus` was modified + +* `validate()` was removed + +#### `models.GuestAgentProperties` was modified + +* `validate()` was removed + +#### `models.VirtualHardDisksUpdateProperties` was modified + +* `validate()` was removed + +#### `models.AttestationStatusProperties` was modified + +* `validate()` was removed + +#### `models.VirtualMachineInstancePropertiesHardwareProfile` was modified + +* `validate()` was removed + +#### `models.VirtualMachineInstancePropertiesSecurityProfileUefiSettings` was modified + +* `validate()` was removed + +#### `models.ImageArmReference` was modified + +* `validate()` was removed + +#### `models.NetworkProfileUpdate` was modified + +* `validate()` was removed + +#### `models.OsProfileUpdate` was modified + +* `validate()` was removed + +#### `models.VirtualMachineInstanceManagedDiskParameters` was modified + +* `validate()` was removed + +#### `models.RouteTable` was modified + +* `validate()` was removed + +#### `models.OsProfileUpdateWindowsConfiguration` was modified + +* `validate()` was removed + +#### `models.InstanceViewStatus` was modified + +* `validate()` was removed + +#### `models.GalleryImageStatusProvisioningStatus` was modified + +* `validate()` was removed + +#### `models.GalleryImageStatus` was modified + +* `validate()` was removed + +#### `models.StorageProfileUpdate` was modified + +* `validate()` was removed + +#### `models.GuestCredential` was modified + +* `validate()` was removed + +#### `models.LogicalNetworkPropertiesDhcpOptions` was modified + +* `validate()` was removed + +#### `models.NetworkInterfaceProperties` was modified + +* `validate()` was removed + +#### `models.GalleryImageProperties` was modified + +* `vmImageRepositoryCredentials()` was removed +* `validate()` was removed +* `withVmImageRepositoryCredentials(models.VmImageRepositoryCredentials)` was removed + +#### `models.NetworkSecurityGroupTagsUpdate` was modified + +* `validate()` was removed + +#### `models.VirtualMachineInstancePropertiesNetworkProfile` was modified + +* `validate()` was removed + +#### `models.GalleryImageVersion` was modified + +* `validate()` was removed + +#### `models.HttpProxyConfiguration` was modified + +* `validate()` was removed + +#### `models.MarketplaceGalleryImageStatusProvisioningStatus` was modified + +* `validate()` was removed + +#### `models.VirtualMachineInstanceUpdateProperties` was modified + +* `validate()` was removed + +#### `models.NetworkInterfaceStatus` was modified + +* `validate()` was removed + +#### `models.GalleryImageTagsUpdate` was modified + +* `validate()` was removed + +#### `models.MarketplaceGalleryImageTagsUpdate` was modified + +* `validate()` was removed + +#### `models.VirtualMachineInstancePropertiesOsProfileWindowsConfiguration` was modified + +* `validate()` was removed + +#### `models.IPPool` was modified + +* `validate()` was removed + +#### `models.IPConfigurationProperties` was modified + +* `validate()` was removed + +#### `models.GalleryImageStatusDownloadStatus` was modified + +* `validate()` was removed + +#### `models.MarketplaceGalleryImageProperties` was modified + +* `validate()` was removed + +#### `models.VirtualMachineInstancePropertiesSecurityProfile` was modified + +* `validate()` was removed + +#### `models.NetworkSecurityGroupProperties` was modified + +* `validate()` was removed + +#### `models.VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU` was modified + +* `validate()` was removed + +#### `models.NetworkInterfacesUpdateRequest` was modified + +* `validate()` was removed + +#### `models.VirtualMachineConfigAgentInstanceView` was modified + +* `validate()` was removed + +#### `models.VirtualMachineInstancePropertiesOsProfileLinuxConfiguration` was modified + +* `validate()` was removed + +#### `models.VirtualHardDiskProperties` was modified + +* `validate()` was removed + +#### `models.VirtualMachineInstancePropertiesOsProfile` was modified + +* `validate()` was removed + +#### `models.LogicalNetworkProperties` was modified + +* `validate()` was removed + +#### `models.StorageContainerStatus` was modified + +* `validate()` was removed + +#### `models.NetworkSecurityGroupStatusProvisioningStatus` was modified + +* `validate()` was removed + +#### `models.ExtendedLocation` was modified + +* `validate()` was removed + +#### `models.VirtualHardDisksUpdateRequest` was modified + +* `validate()` was removed + +#### `models.OsProfileUpdateLinuxConfiguration` was modified + +* `validate()` was removed + +#### `models.LogicalNetworkStatus` was modified + +* `validate()` was removed + +#### `models.UserAssignedIdentity` was modified + +* `validate()` was removed + +#### `models.VMDiskSecurityProfile` was modified + +* `validate()` was removed + +#### `models.NetworkInterfaceArmReference` was modified + +* `validate()` was removed + +#### `models.IPPoolInfo` was modified + +* `validate()` was removed + +#### `models.VirtualMachineInstanceProperties` was modified + +* `validate()` was removed + +#### `models.VirtualHardDiskArmReference` was modified + +* `validate()` was removed + +#### `models.VirtualMachineInstanceStatus` was modified + +* `validate()` was removed + +#### `models.HardwareProfileUpdate` was modified + +* `validate()` was removed + +#### `models.HybridIdentityMetadataProperties` was modified + +* `validate()` was removed + +#### `models.VirtualHardDiskUploadStatus` was modified + +* `validate()` was removed + +#### `models.VirtualMachineInstanceStatusProvisioningStatus` was modified + +* `validate()` was removed + +#### `models.VirtualHardDiskStatus` was modified + +* `validate()` was removed + +#### `models.IPConfiguration` was modified + +* `validate()` was removed + +#### `models.StorageContainerProperties` was modified + +* `validate()` was removed + +#### `models.InterfaceDNSSettings` was modified + +* `validate()` was removed + +#### `models.NetworkSecurityGroupArmReference` was modified + +* `validate()` was removed + +#### `models.MarketplaceGalleryImageStatus` was modified + +* `validate()` was removed + +#### `models.GalleryImageIdentifier` was modified + +* `validate()` was removed + +#### `models.ManagedServiceIdentity` was modified + +* `validate()` was removed + +#### `models.VirtualHardDiskStatusProvisioningStatus` was modified + +* `validate()` was removed + +#### `models.Identity` was modified + +* `validate()` was removed + +### Features Added + +* `models.VirtualNetworkDhcpOptions` was added + +* `models.VirtualNetwork` was added + +* `models.OperationDisplay` was added + +* `models.FrontendIPConfigurationProperties` was added + +* `models.BackendAddressPoolProperties` was added + +* `models.LoadBalancerBackendAddressProperties` was added + +* `models.LoadBalancerRuleTransportProtocol` was added + +* `models.PublicIPAddress$DefinitionStages` was added + +* `models.VirtualNetworkSubnetArmReference` was added + +* `models.SnapshotStatusProvisioningStatus` was added + +* `models.LoadBalancer` was added + +* `models.VirtualNetwork$DefinitionStages` was added + +* `models.NatGateway$UpdateStages` was added + +* `models.Snapshot$UpdateStages` was added + +* `models.OperationStatusResult` was added + +* `models.FabricConnectionHealthEnum` was added + +* `models.Snapshot$DefinitionStages` was added + +* `models.LoadBalancerFrontendIPConfigurationReference` was added + +* `models.NatGatewayStatus` was added + +* `models.InboundRules` was added + +* `models.Operation` was added + +* `models.VirtualNetwork$Definition` was added + +* `models.PublicIPAddressArmReference` was added + +* `models.PowerOffVirtualMachineOptions` was added + +* `models.VirtualNetworkSubnetUpdateProperties` was added + +* `models.ActionType` was added + +* `models.VirtualNetworkAddressSpace` was added + +* `models.InboundRule$Definition` was added + +* `models.Operations` was added + +* `models.VirtualNetworkSubnetIpConfigurationReference` was added + +* `models.Snapshot$Update` was added + +* `models.PublicIPAddressType` was added + +* `models.LoadBalancers` was added + +* `models.VirtualNetworkArmReference` was added + +* `models.PublicIPAddress$Definition` was added + +* `models.PublicIPAddressTagsUpdate` was added + +* `models.NatGatewayProperties` was added + +* `models.Snapshots` was added + +* `models.FabricIssue` was added + +* `models.LoadBalancerRuleSessionPersistenceType` was added + +* `models.LoadBalancerBackendAddressPoolReference` was added + +* `models.ProbeProperties` was added + +* `models.IPConfigurationArmReference` was added + +* `models.LoadBalancer$UpdateStages` was added + +* `models.Snapshot` was added + +* `models.NatGateways` was added + +* `models.InboundRuleProperties` was added + +* `models.VirtualNetwork$Update` was added + +* `models.FabricResourceTypeEnum` was added + +* `models.LoadBalancer$DefinitionStages` was added + +* `models.VirtualNetworkTagsUpdate` was added + +* `models.InboundRuleStatus` was added + +* `models.SnapshotTagsUpdate` was added + +* `models.InboundRuleStatusProvisioningStatus` was added + +* `models.VirtualNetworkSubnetUpdateRequest` was added + +* `models.InboundRule` was added + +* `models.PublicIPAddress` was added + +* `models.LoadBalancerTagsUpdate` was added + +* `models.VirtualNetwork$UpdateStages` was added + +* `models.InboundNATRuleProtocol` was added + +* `models.LoadBalancer$Update` was added + +* `models.Probe` was added + +* `models.VirtualNetworkProperties` was added + +* `models.FabricIntegrationStatus` was added + +* `models.LoadBalancerRule` was added + +* `models.PublicIPAddress$UpdateStages` was added + +* `models.LoadBalancerProperties` was added + +* `models.LoadBalancerProbeReference` was added + +* `models.VirtualNetworks` was added + +* `models.NatGateway` was added + +* `models.VirtualNetworkSubnet` was added + +* `models.VirtualNetworkSubnetStatus` was added + +* `models.InboundRule$Update` was added + +* `models.SnapshotProperties` was added + +* `models.Snapshot$Definition` was added + +* `models.PublicIPAddresses` was added + +* `models.LoadBalancerBackendAddressAdminState` was added + +* `models.VirtualNetworkSubnet$UpdateStages` was added + +* `models.VirtualNetworkSubnet$Definition` was added + +* `models.FabricIntegrationStateEnum` was added + +* `models.LoadBalancerBackendAddress` was added + +* `models.VirtualNetworkSubnets` was added + +* `models.ManagedNetworkFabricArmReference` was added + +* `models.VirtualNetworkStatus` was added + +* `models.LoadBalancer$Definition` was added + +* `models.LoadBalancerRuleProperties` was added + +* `models.LoadBalancerStatusProvisioningStatus` was added + +* `models.SnapshotStatus` was added + +* `models.NatGateway$DefinitionStages` was added + +* `models.Origin` was added + +* `models.CreationData` was added + +* `models.LoadBalancerProbeProtocol` was added + +* `models.FrontendIPConfiguration` was added + +* `models.BackendAddressPool` was added + +* `models.NatGatewayArmReference` was added + +* `models.LoadBalancerStatus` was added + +* `models.PublicIPAddress$Update` was added + +* `models.VirtualNetworkSubnetStatusProvisioningStatus` was added + +* `models.NatGateway$Update` was added + +* `models.VirtualNetworkSubnet$DefinitionStages` was added + +* `models.OperationStepResult` was added + +* `models.DiskCreateOption` was added + +* `models.VirtualNetworkStatusProvisioningStatus` was added + +* `models.VirtualNetworkSubnetProperties` was added + +* `models.VirtualNetworkSubnet$Update` was added + +* `models.NatGatewayStatusProvisioningStatus` was added + +* `models.NatGateway$Definition` was added + +* `models.InboundRule$UpdateStages` was added + +* `models.InboundRule$DefinitionStages` was added + +* `models.NatGatewayTagsUpdate` was added + +* `models.PublicIPAddressProperties` was added + +#### `models.VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig` was modified + +* `withEnabled(java.lang.Boolean)` was added +* `enabled()` was added + +#### `models.Subnet` was modified + +* `provisioningState()` was added + +#### `models.NetworkInterfacesUpdateProperties` was modified + +* `bypassSdnPolicies()` was added +* `withBypassSdnPolicies(java.lang.Boolean)` was added + +#### `models.VirtualMachineInstances` was modified + +* `powerOff(java.lang.String,models.PowerOffVirtualMachineOptions)` was added +* `powerOff(java.lang.String,models.PowerOffVirtualMachineOptions,com.azure.core.util.Context)` was added + +#### `AzureStackHciVmManager` was modified + +* `operations()` was added +* `virtualNetworkSubnets()` was added +* `natGateways()` was added +* `snapshots()` was added +* `loadBalancers()` was added +* `virtualNetworks()` was added +* `publicIPAddresses()` was added +* `inboundRules()` was added + +#### `models.NetworkInterfaceProperties` was modified + +* `withBypassSdnPolicies(java.lang.Boolean)` was added +* `bypassSdnPolicies()` was added + +#### `models.HyperVGeneration` was modified + +* `NA` was added + +#### `models.VirtualHardDiskProperties` was modified + +* `withLocalVhdPath(java.lang.String)` was added +* `withCreationData(models.CreationData)` was added +* `creationData()` was added +* `localVhdPath()` was added + +#### `models.LogicalNetworkProperties` was modified + +* `fabricNetworkConfiguration()` was added +* `withFabricNetworkConfiguration(models.ManagedNetworkFabricArmReference)` was added + +#### `models.LogicalNetworkStatus` was modified + +* `fabricIntegration()` was added + +#### `models.VirtualMachineInstanceProperties` was modified + +* `withLocalVmName(java.lang.String)` was added +* `localVmName()` was added + +#### `models.VirtualMachineInstanceStatus` was modified + +* `operationDetails()` was added + +#### `models.HardwareProfileUpdate` was modified -### Other Changes +* `withDynamicMemoryConfig(models.VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig)` was added +* `dynamicMemoryConfig()` was added ## 1.0.0-beta.1 (2025-08-11) diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/README.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/README.md index c6575f486088b..67caaacb27fb9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/README.md +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Azure Stack Hci Vm client library for Java. -This package contains Microsoft Azure SDK for Azure Stack Hci Vm Management SDK. Azure Stack HCI management service. Package api-version 2025-06-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Azure Stack Hci Vm Management SDK. Azure Stack HCI management service. Package api-version 2026-07-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-azurestackhci-vm - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/SAMPLE.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/SAMPLE.md index 8d1d328812a30..3393bbdcdc1b2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/SAMPLE.md +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/SAMPLE.md @@ -26,6 +26,22 @@ - [Get](#hybrididentitymetadata_get) - [ListByVirtualMachineInstance](#hybrididentitymetadata_listbyvirtualmachineinstance) +## InboundRules + +- [CreateOrUpdate](#inboundrules_createorupdate) +- [Delete](#inboundrules_delete) +- [Get](#inboundrules_get) +- [ListByNatGateway](#inboundrules_listbynatgateway) + +## LoadBalancers + +- [CreateOrUpdate](#loadbalancers_createorupdate) +- [Delete](#loadbalancers_delete) +- [GetByResourceGroup](#loadbalancers_getbyresourcegroup) +- [List](#loadbalancers_list) +- [ListByResourceGroup](#loadbalancers_listbyresourcegroup) +- [UpdateTags](#loadbalancers_updatetags) + ## LogicalNetworks - [CreateOrUpdate](#logicalnetworks_createorupdate) @@ -44,6 +60,15 @@ - [ListByResourceGroup](#marketplacegalleryimages_listbyresourcegroup) - [Update](#marketplacegalleryimages_update) +## NatGateways + +- [CreateOrUpdate](#natgateways_createorupdate) +- [Delete](#natgateways_delete) +- [GetByResourceGroup](#natgateways_getbyresourcegroup) +- [List](#natgateways_list) +- [ListByResourceGroup](#natgateways_listbyresourcegroup) +- [UpdateTags](#natgateways_updatetags) + ## NetworkInterfaces - [CreateOrUpdate](#networkinterfaces_createorupdate) @@ -62,6 +87,19 @@ - [ListByResourceGroup](#networksecuritygroups_listbyresourcegroup) - [UpdateTags](#networksecuritygroups_updatetags) +## Operations + +- [List](#operations_list) + +## PublicIPAddresses + +- [CreateOrUpdate](#publicipaddresses_createorupdate) +- [Delete](#publicipaddresses_delete) +- [GetByResourceGroup](#publicipaddresses_getbyresourcegroup) +- [List](#publicipaddresses_list) +- [ListByResourceGroup](#publicipaddresses_listbyresourcegroup) +- [UpdateTags](#publicipaddresses_updatetags) + ## SecurityRules - [CreateOrUpdate](#securityrules_createorupdate) @@ -69,6 +107,15 @@ - [Get](#securityrules_get) - [ListByNetworkSecurityGroup](#securityrules_listbynetworksecuritygroup) +## Snapshots + +- [CreateOrUpdate](#snapshots_createorupdate) +- [Delete](#snapshots_delete) +- [GetByResourceGroup](#snapshots_getbyresourcegroup) +- [List](#snapshots_list) +- [ListByResourceGroup](#snapshots_listbyresourcegroup) +- [Update](#snapshots_update) + ## StorageContainers - [CreateOrUpdate](#storagecontainers_createorupdate) @@ -95,11 +142,29 @@ - [Get](#virtualmachineinstances_get) - [List](#virtualmachineinstances_list) - [Pause](#virtualmachineinstances_pause) +- [PowerOff](#virtualmachineinstances_poweroff) - [Restart](#virtualmachineinstances_restart) - [Save](#virtualmachineinstances_save) - [Start](#virtualmachineinstances_start) - [Stop](#virtualmachineinstances_stop) - [Update](#virtualmachineinstances_update) + +## VirtualNetworkSubnets + +- [CreateOrUpdate](#virtualnetworksubnets_createorupdate) +- [Delete](#virtualnetworksubnets_delete) +- [Get](#virtualnetworksubnets_get) +- [ListByVirtualNetwork](#virtualnetworksubnets_listbyvirtualnetwork) +- [Update](#virtualnetworksubnets_update) + +## VirtualNetworks + +- [CreateOrUpdate](#virtualnetworks_createorupdate) +- [Delete](#virtualnetworks_delete) +- [GetByResourceGroup](#virtualnetworks_getbyresourcegroup) +- [List](#virtualnetworks_list) +- [ListByResourceGroup](#virtualnetworks_listbyresourcegroup) +- [UpdateTags](#virtualnetworks_updatetags) ### AttestationStatuses_Get ```java @@ -108,7 +173,7 @@ */ public final class AttestationStatusesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/AttestationStatuses_Get.json + * x-ms-original-file: 2026-07-01-preview/AttestationStatuses_Get.json */ /** * Sample code: GetAttestationStatus. @@ -137,7 +202,7 @@ import com.azure.resourcemanager.azurestackhci.vm.models.OperatingSystemTypes; */ public final class GalleryImagesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/GalleryImages_CreateOrUpdate.json + * x-ms-original-file: 2026-07-01-preview/GalleryImages_CreateOrUpdate.json */ /** * Sample code: PutGalleryImage. @@ -169,7 +234,7 @@ public final class GalleryImagesCreateOrUpdateSamples { */ public final class GalleryImagesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/GalleryImages_Delete.json + * x-ms-original-file: 2026-07-01-preview/GalleryImages_Delete.json */ /** * Sample code: DeleteGalleryImage. @@ -190,7 +255,7 @@ public final class GalleryImagesDeleteSamples { */ public final class GalleryImagesGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/GalleryImages_Get.json + * x-ms-original-file: 2026-07-01-preview/GalleryImages_Get.json */ /** * Sample code: GetGalleryImage. @@ -212,7 +277,7 @@ public final class GalleryImagesGetByResourceGroupSamples { */ public final class GalleryImagesListSamples { /* - * x-ms-original-file: 2025-06-01-preview/GalleryImages_ListAll.json + * x-ms-original-file: 2026-07-01-preview/GalleryImages_ListAll.json */ /** * Sample code: ListGalleryImageBySubscription. @@ -234,7 +299,7 @@ public final class GalleryImagesListSamples { */ public final class GalleryImagesListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/GalleryImages_ListByResourceGroup.json + * x-ms-original-file: 2026-07-01-preview/GalleryImages_ListByResourceGroup.json */ /** * Sample code: ListGalleryImageByResourceGroup. @@ -260,7 +325,7 @@ import java.util.Map; */ public final class GalleryImagesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/GalleryImages_Update.json + * x-ms-original-file: 2026-07-01-preview/GalleryImages_Update.json */ /** * Sample code: UpdateGalleryImage. @@ -301,7 +366,7 @@ import com.azure.resourcemanager.azurestackhci.vm.models.ProvisioningAction; */ public final class GuestAgentsCreateSamples { /* - * x-ms-original-file: 2025-06-01-preview/GuestAgents_Create.json + * x-ms-original-file: 2026-07-01-preview/GuestAgents_Create.json */ /** * Sample code: CreateGuestAgent. @@ -329,7 +394,7 @@ public final class GuestAgentsCreateSamples { */ public final class GuestAgentsDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/GuestAgents_Delete.json + * x-ms-original-file: 2026-07-01-preview/GuestAgents_Delete.json */ /** * Sample code: DeleteGuestAgent. @@ -353,7 +418,7 @@ public final class GuestAgentsDeleteSamples { */ public final class GuestAgentsGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/GuestAgents_Get.json + * x-ms-original-file: 2026-07-01-preview/GuestAgents_Get.json */ /** * Sample code: GetGuestAgent. @@ -377,7 +442,7 @@ public final class GuestAgentsGetSamples { */ public final class GuestAgentsListByVirtualMachineInstanceSamples { /* - * x-ms-original-file: 2025-06-01-preview/GuestAgents_ListByVirtualMachineInstance.json + * x-ms-original-file: 2026-07-01-preview/GuestAgents_ListByVirtualMachineInstance.json */ /** * Sample code: GuestAgentListByVirtualMachineInstances. @@ -402,7 +467,7 @@ public final class GuestAgentsListByVirtualMachineInstanceSamples { */ public final class HybridIdentityMetadataGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/HybridIdentityMetadataGroup_Get.json + * x-ms-original-file: 2026-07-01-preview/HybridIdentityMetadataGroup_Get.json */ /** * Sample code: GetHybridIdentityMetadata. @@ -427,7 +492,7 @@ public final class HybridIdentityMetadataGetSamples { */ public final class HybridIdentityMetadataListByVirtualMachineInstanceSamples { /* - * x-ms-original-file: 2025-06-01-preview/HybridIdentityMetadata_ListByVirtualMachineInstance.json + * x-ms-original-file: 2026-07-01-preview/HybridIdentityMetadata_ListByVirtualMachineInstance.json */ /** * Sample code: HybridIdentityMetadataListByVirtualMachineInstances. @@ -444,6 +509,343 @@ public final class HybridIdentityMetadataListByVirtualMachineInstanceSamples { } ``` +### InboundRules_CreateOrUpdate + +```java +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.vm.models.IPConfigurationArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.InboundNATRuleProtocol; +import com.azure.resourcemanager.azurestackhci.vm.models.InboundRuleProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressArmReference; + +/** + * Samples for InboundRules CreateOrUpdate. + */ +public final class InboundRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-01-preview/InboundRules_CreateOrUpdate.json + */ + /** + * Sample code: CreateOrUpdateInboundRule. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + createOrUpdateInboundRule(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.inboundRules() + .define("sample-inbound-rule") + .withExistingNatGateway("test-rg", "test-nat-gw") + .withProperties(new InboundRuleProperties().withProtocol(InboundNATRuleProtocol.TCP) + .withFrontendPort(3389) + .withBackendPort(3389) + .withBackendIPConfiguration(new IPConfigurationArmReference().withResourceId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic/ipConfigurations/ipconfig1")) + .withPublicIPAddress(new PublicIPAddressArmReference().withResourceId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/publicIPAddresses/test-public-ip"))) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .create(); + } +} +``` + +### InboundRules_Delete + +```java +/** + * Samples for InboundRules Delete. + */ +public final class InboundRulesDeleteSamples { + /* + * x-ms-original-file: 2026-07-01-preview/InboundRules_Delete.json + */ + /** + * Sample code: DeleteInboundRule. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void deleteInboundRule(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.inboundRules() + .delete("test-rg", "test-nat-gw", "sample-inbound-rule", com.azure.core.util.Context.NONE); + } +} +``` + +### InboundRules_Get + +```java +/** + * Samples for InboundRules Get. + */ +public final class InboundRulesGetSamples { + /* + * x-ms-original-file: 2026-07-01-preview/InboundRules_Get.json + */ + /** + * Sample code: GetInboundRule. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void getInboundRule(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.inboundRules() + .getWithResponse("test-rg", "test-nat-gw", "sample-inbound-rule", com.azure.core.util.Context.NONE); + } +} +``` + +### InboundRules_ListByNatGateway + +```java +/** + * Samples for InboundRules ListByNatGateway. + */ +public final class InboundRulesListByNatGatewaySamples { + /* + * x-ms-original-file: 2026-07-01-preview/InboundRules_ListByNatGateway.json + */ + /** + * Sample code: ListInboundRulesByNatGateway. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listInboundRulesByNatGateway(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.inboundRules().listByNatGateway("test-rg", "test-nat-gw", com.azure.core.util.Context.NONE); + } +} +``` + +### LoadBalancers_CreateOrUpdate + +```java +import com.azure.resourcemanager.azurestackhci.vm.models.BackendAddressPool; +import com.azure.resourcemanager.azurestackhci.vm.models.BackendAddressPoolProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.vm.models.FrontendIPConfiguration; +import com.azure.resourcemanager.azurestackhci.vm.models.FrontendIPConfigurationProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.IPConfigurationArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddress; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressAdminState; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressPoolReference; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerFrontendIPConfigurationReference; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerProbeProtocol; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerProbeReference; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRule; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRuleProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRuleSessionPersistenceType; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRuleTransportProtocol; +import com.azure.resourcemanager.azurestackhci.vm.models.Probe; +import com.azure.resourcemanager.azurestackhci.vm.models.ProbeProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkArmReference; +import java.util.Arrays; + +/** + * Samples for LoadBalancers CreateOrUpdate. + */ +public final class LoadBalancersCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-01-preview/LoadBalancers_CreateOrUpdate.json + */ + /** + * Sample code: PutLoadBalancer. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void putLoadBalancer(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.loadBalancers() + .define("test-lb") + .withRegion("West US2") + .withExistingResourceGroup("test-rg") + .withProperties(new LoadBalancerProperties() + .withFrontendIPConfigurations(Arrays.asList(new FrontendIPConfiguration().withName("web-frontend") + .withProperties(new FrontendIPConfigurationProperties() + .withPublicIPAddress(new PublicIPAddressArmReference().withResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/azure-local-rg/providers/Microsoft.AzureStackHCI/publicIPs/webPublicIP"))))) + .withBackendAddressPools(Arrays.asList(new BackendAddressPool().withName("web-backend") + .withProperties(new BackendAddressPoolProperties().withLoadBalancerBackendAddresses(Arrays.asList( + new LoadBalancerBackendAddress().withName("web-server-1") + .withProperties(new LoadBalancerBackendAddressProperties() + .withAdminState(LoadBalancerBackendAddressAdminState.UP) + .withNetworkInterfaceIPConfiguration(new IPConfigurationArmReference().withResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/azure-local-rg/providers/Microsoft.AzureStackHCI/networkInterfaces/web-server-1-nic/ipConfigurations/primary"))), + new LoadBalancerBackendAddress().withName("web-server-2") + .withProperties(new LoadBalancerBackendAddressProperties() + .withAdminState(LoadBalancerBackendAddressAdminState.UP) + .withNetworkInterfaceIPConfiguration(new IPConfigurationArmReference().withResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/azure-local-rg/providers/Microsoft.AzureStackHCI/networkInterfaces/web-server-2-nic/ipConfigurations/primary"))))) + .withVirtualNetwork(new VirtualNetworkArmReference().withResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/azure-local-rg/providers/Microsoft.AzureStackHCI/virtualNetworks/webVNet"))))) + .withLoadBalancingRules(Arrays.asList( + new LoadBalancerRule().withName("http-rule") + .withProperties(new LoadBalancerRuleProperties() + .withFrontendIPConfiguration( + new LoadBalancerFrontendIPConfigurationReference().withName("web-frontend")) + .withBackendAddressPool( + new LoadBalancerBackendAddressPoolReference().withName("web-backend")) + .withFrontendPort(80) + .withBackendPort(80) + .withProtocol(LoadBalancerRuleTransportProtocol.TCP) + .withProbe(new LoadBalancerProbeReference().withName("http-probe")) + .withLoadDistribution(LoadBalancerRuleSessionPersistenceType.DEFAULT) + .withIdleTimeoutInMinutes(4)), + new LoadBalancerRule().withName("https-rule") + .withProperties(new LoadBalancerRuleProperties() + .withFrontendIPConfiguration( + new LoadBalancerFrontendIPConfigurationReference().withName("web-frontend")) + .withBackendAddressPool( + new LoadBalancerBackendAddressPoolReference().withName("web-backend")) + .withFrontendPort(443) + .withBackendPort(443) + .withProtocol(LoadBalancerRuleTransportProtocol.TCP) + .withLoadDistribution(LoadBalancerRuleSessionPersistenceType.DEFAULT) + .withIdleTimeoutInMinutes(4)))) + .withProbes(Arrays.asList(new Probe().withName("http-probe") + .withProperties(new ProbeProperties().withProtocol(LoadBalancerProbeProtocol.HTTP) + .withPort(80) + .withRequestPath("/health") + .withIntervalInSeconds(15) + .withNumberOfProbes(2))))) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .create(); + } +} +``` + +### LoadBalancers_Delete + +```java +/** + * Samples for LoadBalancers Delete. + */ +public final class LoadBalancersDeleteSamples { + /* + * x-ms-original-file: 2026-07-01-preview/LoadBalancers_Delete.json + */ + /** + * Sample code: DeleteLoadBalancers. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void deleteLoadBalancers(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.loadBalancers().delete("test-rg", "test-lb", com.azure.core.util.Context.NONE); + } +} +``` + +### LoadBalancers_GetByResourceGroup + +```java +/** + * Samples for LoadBalancers GetByResourceGroup. + */ +public final class LoadBalancersGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/LoadBalancers_Get.json + */ + /** + * Sample code: GetLoadBalancers. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void getLoadBalancers(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.loadBalancers().getByResourceGroupWithResponse("test-rg", "test-lb", com.azure.core.util.Context.NONE); + } +} +``` + +### LoadBalancers_List + +```java +/** + * Samples for LoadBalancers List. + */ +public final class LoadBalancersListSamples { + /* + * x-ms-original-file: 2026-07-01-preview/LoadBalancers_ListAll.json + */ + /** + * Sample code: ListLoadBalancerBySubscription. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listLoadBalancerBySubscription(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.loadBalancers().list(com.azure.core.util.Context.NONE); + } +} +``` + +### LoadBalancers_ListByResourceGroup + +```java +/** + * Samples for LoadBalancers ListByResourceGroup. + */ +public final class LoadBalancersListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/LoadBalancers_ListByResourceGroup.json + */ + /** + * Sample code: ListLoadBalancerByResourceGroup. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listLoadBalancerByResourceGroup(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.loadBalancers().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### LoadBalancers_UpdateTags + +```java +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancer; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for LoadBalancers UpdateTags. + */ +public final class LoadBalancersUpdateTagsSamples { + /* + * x-ms-original-file: 2026-07-01-preview/LoadBalancers_UpdateTags.json + */ + /** + * Sample code: Update LoadBalancers tags. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + updateLoadBalancersTags(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + LoadBalancer resource = manager.loadBalancers() + .getByResourceGroupWithResponse("testrg", "test-lb", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).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; + } +} +``` + ### LogicalNetworks_CreateOrUpdate ```java @@ -455,7 +857,7 @@ import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes; */ public final class LogicalNetworksCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/LogicalNetworks_CreateOrUpdate.json + * x-ms-original-file: 2026-07-01-preview/LogicalNetworks_CreateOrUpdate.json */ /** * Sample code: PutLogicalNetwork. @@ -483,7 +885,7 @@ public final class LogicalNetworksCreateOrUpdateSamples { */ public final class LogicalNetworksDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/LogicalNetworks_Delete.json + * x-ms-original-file: 2026-07-01-preview/LogicalNetworks_Delete.json */ /** * Sample code: DeleteLogicalNetwork. @@ -504,7 +906,7 @@ public final class LogicalNetworksDeleteSamples { */ public final class LogicalNetworksGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/LogicalNetworks_Get.json + * x-ms-original-file: 2026-07-01-preview/LogicalNetworks_Get.json */ /** * Sample code: GetLogicalNetwork. @@ -526,7 +928,7 @@ public final class LogicalNetworksGetByResourceGroupSamples { */ public final class LogicalNetworksListSamples { /* - * x-ms-original-file: 2025-06-01-preview/LogicalNetworks_ListAll.json + * x-ms-original-file: 2026-07-01-preview/LogicalNetworks_ListAll.json */ /** * Sample code: ListLogicalNetworkBySubscription. @@ -548,7 +950,7 @@ public final class LogicalNetworksListSamples { */ public final class LogicalNetworksListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/LogicalNetworks_ListByResourceGroup.json + * x-ms-original-file: 2026-07-01-preview/LogicalNetworks_ListByResourceGroup.json */ /** * Sample code: ListLogicalNetworkByResourceGroup. @@ -574,7 +976,7 @@ import java.util.Map; */ public final class LogicalNetworksUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/LogicalNetworks_Update.json + * x-ms-original-file: 2026-07-01-preview/LogicalNetworks_Update.json */ /** * Sample code: UpdateLogicalNetwork. @@ -619,7 +1021,7 @@ import com.azure.resourcemanager.azurestackhci.vm.models.OperatingSystemTypes; */ public final class MarketplaceGalleryImagesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/MarketplaceGalleryImages_CreateOrUpdate.json + * x-ms-original-file: 2026-07-01-preview/MarketplaceGalleryImages_CreateOrUpdate.json */ /** * Sample code: PutMarketplaceGalleryImage. @@ -657,7 +1059,7 @@ public final class MarketplaceGalleryImagesCreateOrUpdateSamples { */ public final class MarketplaceGalleryImagesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/MarketplaceGalleryImages_Delete.json + * x-ms-original-file: 2026-07-01-preview/MarketplaceGalleryImages_Delete.json */ /** * Sample code: DeleteMarketplaceGalleryImage. @@ -680,7 +1082,7 @@ public final class MarketplaceGalleryImagesDeleteSamples { */ public final class MarketplaceGalleryImagesGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/MarketplaceGalleryImages_Get.json + * x-ms-original-file: 2026-07-01-preview/MarketplaceGalleryImages_Get.json */ /** * Sample code: GetMarketplaceGalleryImage. @@ -704,7 +1106,7 @@ public final class MarketplaceGalleryImagesGetByResourceGroupSamples { */ public final class MarketplaceGalleryImagesListSamples { /* - * x-ms-original-file: 2025-06-01-preview/MarketplaceGalleryImages_ListAll.json + * x-ms-original-file: 2026-07-01-preview/MarketplaceGalleryImages_ListAll.json */ /** * Sample code: ListMarketplaceGalleryImageBySubscription. @@ -726,7 +1128,7 @@ public final class MarketplaceGalleryImagesListSamples { */ public final class MarketplaceGalleryImagesListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/MarketplaceGalleryImages_ListByResourceGroup.json + * x-ms-original-file: 2026-07-01-preview/MarketplaceGalleryImages_ListByResourceGroup.json */ /** * Sample code: ListMarketplaceGalleryImageByResourceGroup. @@ -752,7 +1154,7 @@ import java.util.Map; */ public final class MarketplaceGalleryImagesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/MarketplaceGalleryImages_Update.json + * x-ms-original-file: 2026-07-01-preview/MarketplaceGalleryImages_Update.json */ /** * Sample code: UpdateMarketplaceGalleryImage. @@ -782,132 +1184,296 @@ public final class MarketplaceGalleryImagesUpdateSamples { } ``` -### NetworkInterfaces_CreateOrUpdate +### NatGateways_CreateOrUpdate ```java import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes; -import com.azure.resourcemanager.azurestackhci.vm.models.IPConfiguration; -import com.azure.resourcemanager.azurestackhci.vm.models.IPConfigurationProperties; -import com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworkArmReference; -import com.azure.resourcemanager.azurestackhci.vm.models.NetworkInterfaceProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.NatGatewayProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressArmReference; import java.util.Arrays; /** - * Samples for NetworkInterfaces CreateOrUpdate. + * Samples for NatGateways CreateOrUpdate. */ -public final class NetworkInterfacesCreateOrUpdateSamples { +public final class NatGatewaysCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkInterfaces__CreateOrUpdate_CreateFromLocal.json + * x-ms-original-file: 2026-07-01-preview/NatGateways_CreateOrUpdate.json */ /** - * Sample code: CreateNetworkInterfaceFromLocal. + * Sample code: PutNatGateway. * * @param manager Entry point to AzureStackHciVmManager. */ - public static void - createNetworkInterfaceFromLocal(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { - manager.networkInterfaces() - .define("test-nic") - .withRegion("eastus") + public static void putNatGateway(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.natGateways() + .define("test-nat-gw") + .withRegion("West US2") .withExistingResourceGroup("test-rg") - .withProperties(new NetworkInterfaceProperties().withIpConfigurations(Arrays.asList(new IPConfiguration() - .withName("ipconfig-sample") - .withProperties(new IPConfigurationProperties().withSubnet(new LogicalNetworkArmReference().withId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/logicalNetworks/test-lnet"))))) - .withCreateFromLocal(true)) + .withProperties(new NatGatewayProperties() + .withPublicIPAddresses(Arrays.asList(new PublicIPAddressArmReference().withResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/azure-local-rg/providers/Microsoft.AzureStackHCI/publicIPAddresses/outbound-pip")))) .withExtendedLocation(new ExtendedLocation().withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .create(); } +} +``` +### NatGateways_Delete + +```java +/** + * Samples for NatGateways Delete. + */ +public final class NatGatewaysDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkInterfaces_CreateOrUpdate.json + * x-ms-original-file: 2026-07-01-preview/NatGateways_Delete.json */ /** - * Sample code: PutNetworkInterface. + * Sample code: DeleteNatGateway. * * @param manager Entry point to AzureStackHciVmManager. */ - public static void putNetworkInterface(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { - manager.networkInterfaces() - .define("test-nic") - .withRegion("eastus") - .withExistingResourceGroup("test-rg") - .withProperties(new NetworkInterfaceProperties().withIpConfigurations(Arrays.asList(new IPConfiguration() - .withName("ipconfig-sample") - .withProperties(new IPConfigurationProperties().withSubnet(new LogicalNetworkArmReference().withId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/logicalNetworks/test-lnet")))))) - .withExtendedLocation(new ExtendedLocation().withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .create(); + public static void deleteNatGateway(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.natGateways().delete("test-rg", "test-nat-gw", com.azure.core.util.Context.NONE); } } ``` -### NetworkInterfaces_Delete +### NatGateways_GetByResourceGroup ```java /** - * Samples for NetworkInterfaces Delete. + * Samples for NatGateways GetByResourceGroup. */ -public final class NetworkInterfacesDeleteSamples { +public final class NatGatewaysGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkInterfaces_Delete.json + * x-ms-original-file: 2026-07-01-preview/NatGateways_Get.json */ /** - * Sample code: DeleteNetworkInterface. + * Sample code: GetNatGateway. * * @param manager Entry point to AzureStackHciVmManager. */ - public static void - deleteNetworkInterface(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { - manager.networkInterfaces().delete("test-rg", "test-nic", com.azure.core.util.Context.NONE); + public static void getNatGateway(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.natGateways() + .getByResourceGroupWithResponse("test-rg", "test-nat-gw", com.azure.core.util.Context.NONE); } } ``` -### NetworkInterfaces_GetByResourceGroup +### NatGateways_List ```java /** - * Samples for NetworkInterfaces GetByResourceGroup. + * Samples for NatGateways List. */ -public final class NetworkInterfacesGetByResourceGroupSamples { +public final class NatGatewaysListSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkInterfaces_Get.json + * x-ms-original-file: 2026-07-01-preview/NatGateways_ListAll.json */ /** - * Sample code: GetNetworkInterface. + * Sample code: ListNatGatewayBySubscription. * * @param manager Entry point to AzureStackHciVmManager. */ - public static void getNetworkInterface(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { - manager.networkInterfaces() - .getByResourceGroupWithResponse("test-rg", "test-nic", com.azure.core.util.Context.NONE); + public static void + listNatGatewayBySubscription(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.natGateways().list(com.azure.core.util.Context.NONE); } } ``` -### NetworkInterfaces_List +### NatGateways_ListByResourceGroup ```java /** - * Samples for NetworkInterfaces List. + * Samples for NatGateways ListByResourceGroup. */ -public final class NetworkInterfacesListSamples { +public final class NatGatewaysListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkInterfaces_ListAll.json + * x-ms-original-file: 2026-07-01-preview/NatGateways_ListByResourceGroup.json */ /** - * Sample code: ListNetworkInterfaceBySubscription. + * Sample code: ListNatGatewayByResourceGroup. * * @param manager Entry point to AzureStackHciVmManager. */ public static void - listNetworkInterfaceBySubscription(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + listNatGatewayByResourceGroup(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.natGateways().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### NatGateways_UpdateTags + +```java +import com.azure.resourcemanager.azurestackhci.vm.models.NatGateway; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for NatGateways UpdateTags. + */ +public final class NatGatewaysUpdateTagsSamples { + /* + * x-ms-original-file: 2026-07-01-preview/NatGateways_UpdateTags.json + */ + /** + * Sample code: Update natGateway tags. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void updateNatGatewayTags(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + NatGateway resource = manager.natGateways() + .getByResourceGroupWithResponse("testrg", "testnatgw", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).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; + } +} +``` + +### NetworkInterfaces_CreateOrUpdate + +```java +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.vm.models.IPConfiguration; +import com.azure.resourcemanager.azurestackhci.vm.models.IPConfigurationProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworkArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.NetworkInterfaceProperties; +import java.util.Arrays; + +/** + * Samples for NetworkInterfaces CreateOrUpdate. + */ +public final class NetworkInterfacesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-01-preview/NetworkInterfaces__CreateOrUpdate_CreateFromLocal.json + */ + /** + * Sample code: CreateNetworkInterfaceFromLocal. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + createNetworkInterfaceFromLocal(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.networkInterfaces() + .define("test-nic") + .withRegion("eastus") + .withExistingResourceGroup("test-rg") + .withProperties(new NetworkInterfaceProperties().withIpConfigurations(Arrays.asList(new IPConfiguration() + .withName("ipconfig-sample") + .withProperties(new IPConfigurationProperties().withSubnet(new LogicalNetworkArmReference().withId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/logicalNetworks/test-lnet"))))) + .withCreateFromLocal(true)) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .create(); + } + + /* + * x-ms-original-file: 2026-07-01-preview/NetworkInterfaces_CreateOrUpdate.json + */ + /** + * Sample code: PutNetworkInterface. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void putNetworkInterface(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.networkInterfaces() + .define("test-nic") + .withRegion("eastus") + .withExistingResourceGroup("test-rg") + .withProperties(new NetworkInterfaceProperties().withIpConfigurations(Arrays.asList(new IPConfiguration() + .withName("ipconfig-sample") + .withProperties(new IPConfigurationProperties().withSubnet(new LogicalNetworkArmReference().withId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/logicalNetworks/test-lnet")))))) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .create(); + } +} +``` + +### NetworkInterfaces_Delete + +```java +/** + * Samples for NetworkInterfaces Delete. + */ +public final class NetworkInterfacesDeleteSamples { + /* + * x-ms-original-file: 2026-07-01-preview/NetworkInterfaces_Delete.json + */ + /** + * Sample code: DeleteNetworkInterface. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + deleteNetworkInterface(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.networkInterfaces().delete("test-rg", "test-nic", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkInterfaces_GetByResourceGroup + +```java +/** + * Samples for NetworkInterfaces GetByResourceGroup. + */ +public final class NetworkInterfacesGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/NetworkInterfaces_Get.json + */ + /** + * Sample code: GetNetworkInterface. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void getNetworkInterface(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.networkInterfaces() + .getByResourceGroupWithResponse("test-rg", "test-nic", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkInterfaces_List + +```java +/** + * Samples for NetworkInterfaces List. + */ +public final class NetworkInterfacesListSamples { + /* + * x-ms-original-file: 2026-07-01-preview/NetworkInterfaces_ListAll.json + */ + /** + * Sample code: ListNetworkInterfaceBySubscription. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listNetworkInterfaceBySubscription(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { manager.networkInterfaces().list(com.azure.core.util.Context.NONE); } } @@ -921,7 +1487,7 @@ public final class NetworkInterfacesListSamples { */ public final class NetworkInterfacesListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkInterfaces_ListByResourceGroup.json + * x-ms-original-file: 2026-07-01-preview/NetworkInterfaces_ListByResourceGroup.json */ /** * Sample code: ListNetworkInterfaceByResourceGroup. @@ -947,7 +1513,7 @@ import java.util.Map; */ public final class NetworkInterfacesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkInterfaces_Update.json + * x-ms-original-file: 2026-07-01-preview/NetworkInterfaces_Update.json */ /** * Sample code: UpdateNetworkInterface. @@ -984,7 +1550,7 @@ public final class NetworkInterfacesUpdateSamples { */ public final class NetworkSecurityGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkSecurityGroups_CreateOrUpdate.json + * x-ms-original-file: 2026-07-01-preview/NetworkSecurityGroups_CreateOrUpdate.json */ /** * Sample code: CreateNetworkSecurityGroup. @@ -1010,7 +1576,7 @@ public final class NetworkSecurityGroupsCreateOrUpdateSamples { */ public final class NetworkSecurityGroupsDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkSecurityGroups_Delete.json + * x-ms-original-file: 2026-07-01-preview/NetworkSecurityGroups_Delete.json */ /** * Sample code: Delete network security group. @@ -1032,7 +1598,7 @@ public final class NetworkSecurityGroupsDeleteSamples { */ public final class NetworkSecurityGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkSecurityGroups_Get.json + * x-ms-original-file: 2026-07-01-preview/NetworkSecurityGroups_Get.json */ /** * Sample code: Get network security group. @@ -1055,7 +1621,7 @@ public final class NetworkSecurityGroupsGetByResourceGroupSamples { */ public final class NetworkSecurityGroupsListSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkSecurityGroups_ListAll.json + * x-ms-original-file: 2026-07-01-preview/NetworkSecurityGroups_ListAll.json */ /** * Sample code: List all network security groups. @@ -1077,7 +1643,7 @@ public final class NetworkSecurityGroupsListSamples { */ public final class NetworkSecurityGroupsListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkSecurityGroups_ListByResourceGroup.json + * x-ms-original-file: 2026-07-01-preview/NetworkSecurityGroups_ListByResourceGroup.json */ /** * Sample code: List network security groups in resource group. @@ -1103,7 +1669,7 @@ import java.util.Map; */ public final class NetworkSecurityGroupsUpdateTagsSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkSecurityGroups_UpdateTags.json + * x-ms-original-file: 2026-07-01-preview/NetworkSecurityGroups_UpdateTags.json */ /** * Sample code: Update network security group tags. @@ -1132,6 +1698,190 @@ public final class NetworkSecurityGroupsUpdateTagsSamples { } ``` +### Operations_List + +```java +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: 2026-07-01-preview/Operations_List.json + */ + /** + * Sample code: List the operations for the provider. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listTheOperationsForTheProvider(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### PublicIPAddresses_CreateOrUpdate + +```java +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressType; + +/** + * Samples for PublicIPAddresses CreateOrUpdate. + */ +public final class PublicIPAddressesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-01-preview/PublicIPAddresses_CreateOrUpdate.json + */ + /** + * Sample code: CreatePublicIPAddress. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + createPublicIPAddress(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.publicIPAddresses() + .define("public-ip1") + .withRegion("eastus") + .withExistingResourceGroup("testrg") + .withProperties(new PublicIPAddressProperties().withPublicIPAddressVersion(PublicIPAddressType.IPV4) + .withIpAllocationScope( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/logicalNetworks/lnet1") + .withIpAddress("10.100.100.4")) + .create(); + } +} +``` + +### PublicIPAddresses_Delete + +```java +/** + * Samples for PublicIPAddresses Delete. + */ +public final class PublicIPAddressesDeleteSamples { + /* + * x-ms-original-file: 2026-07-01-preview/PublicIPAddresses_Delete.json + */ + /** + * Sample code: Delete public IP address. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + deletePublicIPAddress(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.publicIPAddresses().delete("test-rg", "test-ip", com.azure.core.util.Context.NONE); + } +} +``` + +### PublicIPAddresses_GetByResourceGroup + +```java +/** + * Samples for PublicIPAddresses GetByResourceGroup. + */ +public final class PublicIPAddressesGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/PublicIPAddresses_Get.json + */ + /** + * Sample code: Get public IP address. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void getPublicIPAddress(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.publicIPAddresses() + .getByResourceGroupWithResponse("test-rg", "testip", com.azure.core.util.Context.NONE); + } +} +``` + +### PublicIPAddresses_List + +```java +/** + * Samples for PublicIPAddresses List. + */ +public final class PublicIPAddressesListSamples { + /* + * x-ms-original-file: 2026-07-01-preview/PublicIPAddresses_ListALL.json + */ + /** + * Sample code: List all public IP addresses. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listAllPublicIPAddresses(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.publicIPAddresses().list(com.azure.core.util.Context.NONE); + } +} +``` + +### PublicIPAddresses_ListByResourceGroup + +```java +/** + * Samples for PublicIPAddresses ListByResourceGroup. + */ +public final class PublicIPAddressesListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/PublicIPAddresses_ListByResourceGroup.json + */ + /** + * Sample code: List public IPs in resource group. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listPublicIPsInResourceGroup(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.publicIPAddresses().listByResourceGroup("testrg", com.azure.core.util.Context.NONE); + } +} +``` + +### PublicIPAddresses_UpdateTags + +```java +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddress; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for PublicIPAddresses UpdateTags. + */ +public final class PublicIPAddressesUpdateTagsSamples { + /* + * x-ms-original-file: 2026-07-01-preview/PublicIPAddresses_UpdateTags.json + */ + /** + * Sample code: Update public IP addresses tags. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + updatePublicIPAddressesTags(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + PublicIPAddress resource = manager.publicIPAddresses() + .getByResourceGroupWithResponse("testrg", "publicip", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).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; + } +} +``` + ### SecurityRules_CreateOrUpdate ```java @@ -1148,7 +1898,7 @@ import java.util.Arrays; */ public final class SecurityRulesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/SecurityRules_CreateOrUpdate.json + * x-ms-original-file: 2026-07-01-preview/SecurityRules_CreateOrUpdate.json */ /** * Sample code: SecurityRulesCreateOrUpdate. @@ -1184,7 +1934,7 @@ public final class SecurityRulesCreateOrUpdateSamples { */ public final class SecurityRulesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/SecurityRules_Delete.json + * x-ms-original-file: 2026-07-01-preview/SecurityRules_Delete.json */ /** * Sample code: SecurityRulesDelete. @@ -1205,7 +1955,7 @@ public final class SecurityRulesDeleteSamples { */ public final class SecurityRulesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/SecurityRules_Get.json + * x-ms-original-file: 2026-07-01-preview/SecurityRules_Get.json */ /** * Sample code: Get network security rule in network security group. @@ -1225,18 +1975,199 @@ public final class SecurityRulesGetSamples { /** * Samples for SecurityRules ListByNetworkSecurityGroup. */ -public final class SecurityRulesListByNetworkSecurityGroupSamples { +public final class SecurityRulesListByNetworkSecurityGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/SecurityRules_ListByNetworkSecurityGroup.json + */ + /** + * Sample code: List network security rules in network security group. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void listNetworkSecurityRulesInNetworkSecurityGroup( + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.securityRules().listByNetworkSecurityGroup("testrg", "testnsg", com.azure.core.util.Context.NONE); + } +} +``` + +### Snapshots_CreateOrUpdate + +```java +import com.azure.resourcemanager.azurestackhci.vm.models.CreationData; +import com.azure.resourcemanager.azurestackhci.vm.models.DiskCreateOption; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.vm.models.SnapshotProperties; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Snapshots CreateOrUpdate. + */ +public final class SnapshotsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-01-preview/Snapshots_CreateOrUpdate.json + */ + /** + * Sample code: Create or update a snapshot. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + createOrUpdateASnapshot(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.snapshots() + .define("test-snapshot") + .withRegion("West US2") + .withExistingResourceGroup("test-rg") + .withTags(mapOf("environment", "test")) + .withProperties(new SnapshotProperties().withCreationData(new CreationData() + .withCreateOption(DiskCreateOption.COPY) + .withSourceResourceId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/virtualHardDisks/source-vhd"))) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .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; + } +} +``` + +### Snapshots_Delete + +```java +/** + * Samples for Snapshots Delete. + */ +public final class SnapshotsDeleteSamples { + /* + * x-ms-original-file: 2026-07-01-preview/Snapshots_Delete.json + */ + /** + * Sample code: Delete a snapshot. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void deleteASnapshot(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.snapshots().delete("test-rg", "test-snapshot", com.azure.core.util.Context.NONE); + } +} +``` + +### Snapshots_GetByResourceGroup + +```java +/** + * Samples for Snapshots GetByResourceGroup. + */ +public final class SnapshotsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/Snapshots_Get.json + */ + /** + * Sample code: Get a snapshot. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void getASnapshot(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.snapshots() + .getByResourceGroupWithResponse("test-rg", "test-snapshot", com.azure.core.util.Context.NONE); + } +} +``` + +### Snapshots_List + +```java +/** + * Samples for Snapshots List. + */ +public final class SnapshotsListSamples { + /* + * x-ms-original-file: 2026-07-01-preview/Snapshots_ListAll.json + */ + /** + * Sample code: List all snapshots in a subscription. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listAllSnapshotsInASubscription(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.snapshots().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Snapshots_ListByResourceGroup + +```java +/** + * Samples for Snapshots ListByResourceGroup. + */ +public final class SnapshotsListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/Snapshots_ListByResourceGroup.json + */ + /** + * Sample code: List snapshots by resource group. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listSnapshotsByResourceGroup(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.snapshots().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### Snapshots_Update + +```java +import com.azure.resourcemanager.azurestackhci.vm.models.Snapshot; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Snapshots Update. + */ +public final class SnapshotsUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/SecurityRules_ListByNetworkSecurityGroup.json + * x-ms-original-file: 2026-07-01-preview/Snapshots_Update.json */ /** - * Sample code: List network security rules in network security group. + * Sample code: Update a snapshot. * * @param manager Entry point to AzureStackHciVmManager. */ - public static void listNetworkSecurityRulesInNetworkSecurityGroup( - com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { - manager.securityRules().listByNetworkSecurityGroup("testrg", "testnsg", com.azure.core.util.Context.NONE); + public static void updateASnapshot(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + Snapshot resource = manager.snapshots() + .getByResourceGroupWithResponse("test-rg", "test-snapshot", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("environment", "production", "tier", "standard")).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; } } ``` @@ -1253,7 +2184,7 @@ import com.azure.resourcemanager.azurestackhci.vm.models.StorageContainerPropert */ public final class StorageContainersCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/StorageContainers_CreateOrUpdate.json + * x-ms-original-file: 2026-07-01-preview/StorageContainers_CreateOrUpdate.json */ /** * Sample code: PutStorageContainer. @@ -1282,7 +2213,7 @@ public final class StorageContainersCreateOrUpdateSamples { */ public final class StorageContainersDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/StorageContainers_Delete.json + * x-ms-original-file: 2026-07-01-preview/StorageContainers_Delete.json */ /** * Sample code: DeleteStorageContainer. @@ -1304,7 +2235,7 @@ public final class StorageContainersDeleteSamples { */ public final class StorageContainersGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/StorageContainers_Get.json + * x-ms-original-file: 2026-07-01-preview/StorageContainers_Get.json */ /** * Sample code: GetStorageContainer. @@ -1326,7 +2257,7 @@ public final class StorageContainersGetByResourceGroupSamples { */ public final class StorageContainersListSamples { /* - * x-ms-original-file: 2025-06-01-preview/StorageContainers_ListAll.json + * x-ms-original-file: 2026-07-01-preview/StorageContainers_ListAll.json */ /** * Sample code: ListStorageContainerBySubscription. @@ -1348,7 +2279,7 @@ public final class StorageContainersListSamples { */ public final class StorageContainersListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/StorageContainers_ListByResourceGroup.json + * x-ms-original-file: 2026-07-01-preview/StorageContainers_ListByResourceGroup.json */ /** * Sample code: ListStorageContainerByResourceGroup. @@ -1374,7 +2305,7 @@ import java.util.Map; */ public final class StorageContainersUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/StorageContainers_Update.json + * x-ms-original-file: 2026-07-01-preview/StorageContainers_Update.json */ /** * Sample code: UpdateStorageContainer. @@ -1415,7 +2346,7 @@ import com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskProperti */ public final class VirtualHardDisksCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualHardDisks__CreateOrUpdate_CreateFromLocal.json + * x-ms-original-file: 2026-07-01-preview/VirtualHardDisks__CreateOrUpdate_CreateFromLocal.json */ /** * Sample code: CreateVirtualHardDiskFromLocal. @@ -1425,12 +2356,12 @@ public final class VirtualHardDisksCreateOrUpdateSamples { public static void createVirtualHardDiskFromLocal(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { manager.virtualHardDisks() - .define("test-vhd") + .define("rehome-datadisk-1") .withRegion("West US2") .withExistingResourceGroup("test-rg") .withProperties(new VirtualHardDiskProperties().withCreateFromLocal(true) - .withContainerId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container")) + .withLocalVhdPath( + "C:\\ClusterStorage\\UserStorage_2\\e35803d0bd82d61\\rehome555-dd1-a95612cb-f1fa-4daa-a4fd-272844fa512c-dogfoodarc.vhdx")) .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) @@ -1438,7 +2369,7 @@ public final class VirtualHardDisksCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/VirtualHardDisks_CreateOrUpdate.json + * x-ms-original-file: 2026-07-01-preview/VirtualHardDisks_CreateOrUpdate.json */ /** * Sample code: PutVirtualHardDisk. @@ -1467,7 +2398,7 @@ public final class VirtualHardDisksCreateOrUpdateSamples { */ public final class VirtualHardDisksDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualHardDisks_Delete.json + * x-ms-original-file: 2026-07-01-preview/VirtualHardDisks_Delete.json */ /** * Sample code: DeleteVirtualHardDisk. @@ -1489,7 +2420,7 @@ public final class VirtualHardDisksDeleteSamples { */ public final class VirtualHardDisksGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualHardDisks_Get.json + * x-ms-original-file: 2026-07-01-preview/VirtualHardDisks_Get.json */ /** * Sample code: GetVirtualHardDisk. @@ -1511,7 +2442,7 @@ public final class VirtualHardDisksGetByResourceGroupSamples { */ public final class VirtualHardDisksListSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualHardDisks_ListAll.json + * x-ms-original-file: 2026-07-01-preview/VirtualHardDisks_ListAll.json */ /** * Sample code: ListVirtualHardDiskBySubscription. @@ -1533,7 +2464,7 @@ public final class VirtualHardDisksListSamples { */ public final class VirtualHardDisksListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualHardDisks_ListByResourceGroup.json + * x-ms-original-file: 2026-07-01-preview/VirtualHardDisks_ListByResourceGroup.json */ /** * Sample code: ListVirtualHardDiskByResourceGroup. @@ -1559,7 +2490,7 @@ import java.util.Map; */ public final class VirtualHardDisksUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualHardDisks_Update.json + * x-ms-original-file: 2026-07-01-preview/VirtualHardDisks_Update.json */ /** * Sample code: UpdateVirtualHardDisk. @@ -1598,7 +2529,7 @@ import com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskUploadRe */ public final class VirtualHardDisksUploadSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualHardDisks_Upload.json + * x-ms-original-file: 2026-07-01-preview/VirtualHardDisks_Upload.json */ /** * Sample code: UploadVirtualHardDisk. @@ -1644,7 +2575,7 @@ import java.util.Arrays; public final class VirtualMachineInstancesCreateOrUpdateSamples { /* * x-ms-original-file: - * 2025-06-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Gallery_Image.json + * 2026-07-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Gallery_Image.json */ /** * Sample code: PutVirtualMachineInstanceWithGalleryImage. @@ -1682,7 +2613,7 @@ public final class VirtualMachineInstancesCreateOrUpdateSamples { /* * x-ms-original-file: - * 2025-06-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Os_Disk.json + * 2026-07-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Os_Disk.json */ /** * Sample code: PutVirtualMachineInstanceWithOsDisk. @@ -1715,7 +2646,7 @@ public final class VirtualMachineInstancesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/ + * x-ms-original-file: 2026-07-01-preview/ * VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Marketplace_Gallery_Image.json */ /** @@ -1754,7 +2685,7 @@ public final class VirtualMachineInstancesCreateOrUpdateSamples { /* * x-ms-original-file: - * 2025-06-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Vm_Config_Agent.json + * 2026-07-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Vm_Config_Agent.json */ /** * Sample code: PutVirtualMachineInstanceWithVMConfigAgent. @@ -1794,7 +2725,7 @@ public final class VirtualMachineInstancesCreateOrUpdateSamples { /* * x-ms-original-file: - * 2025-06-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Gpu.json + * 2026-07-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Gpu.json */ /** * Sample code: PutVirtualMachineInstanceWithGpu. @@ -1837,7 +2768,7 @@ public final class VirtualMachineInstancesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances__CreateOrUpdate_CreateFromLocal.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances__CreateOrUpdate_CreateFromLocal.json */ /** * Sample code: CreateVirtualMachineInstanceFromLocal. @@ -1856,7 +2787,8 @@ public final class VirtualMachineInstancesCreateOrUpdateSamples { .withStorageProfile(new VirtualMachineInstancePropertiesStorageProfile() .withDataDisks(Arrays.asList(new VirtualHardDiskArmReference().withId( "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd")))) - .withCreateFromLocal(true)) + .withCreateFromLocal(true) + .withLocalVmName("DemoVM_restored")) .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") .withType(ExtendedLocationTypes.CUSTOM_LOCATION)), @@ -1873,7 +2805,7 @@ public final class VirtualMachineInstancesCreateOrUpdateSamples { */ public final class VirtualMachineInstancesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances_Delete.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Delete.json */ /** * Sample code: DeleteVirtualMachine. @@ -1897,7 +2829,23 @@ public final class VirtualMachineInstancesDeleteSamples { */ public final class VirtualMachineInstancesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances_Get.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Get_OperationFailed.json + */ + /** + * Sample code: GetVirtualMachineInstanceWithFailedOperation. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void getVirtualMachineInstanceWithFailedOperation( + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualMachineInstances() + .getWithResponse( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Get.json */ /** * Sample code: GetVirtualMachineInstance. @@ -1922,7 +2870,7 @@ public final class VirtualMachineInstancesGetSamples { */ public final class VirtualMachineInstancesListSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances_List.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_List.json */ /** * Sample code: ListVirtualMachineInstances. @@ -1947,7 +2895,7 @@ public final class VirtualMachineInstancesListSamples { */ public final class VirtualMachineInstancesPauseSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances_Pause.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Pause.json */ /** * Sample code: PauseVirtualMachine. @@ -1963,6 +2911,33 @@ public final class VirtualMachineInstancesPauseSamples { } ``` +### VirtualMachineInstances_PowerOff + +```java +import com.azure.resourcemanager.azurestackhci.vm.models.PowerOffVirtualMachineOptions; + +/** + * Samples for VirtualMachineInstances PowerOff. + */ +public final class VirtualMachineInstancesPowerOffSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_PowerOff.json + */ + /** + * Sample code: PowerOffVirtualMachine. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + powerOffVirtualMachine(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualMachineInstances() + .powerOff( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", + new PowerOffVirtualMachineOptions().withSkipShutdown(false), com.azure.core.util.Context.NONE); + } +} +``` + ### VirtualMachineInstances_Restart ```java @@ -1971,7 +2946,7 @@ public final class VirtualMachineInstancesPauseSamples { */ public final class VirtualMachineInstancesRestartSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances_Restart.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Restart.json */ /** * Sample code: RestartVirtualMachine. @@ -1996,7 +2971,7 @@ public final class VirtualMachineInstancesRestartSamples { */ public final class VirtualMachineInstancesSaveSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances_Save.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Save.json */ /** * Sample code: SaveVirtualMachine. @@ -2020,7 +2995,7 @@ public final class VirtualMachineInstancesSaveSamples { */ public final class VirtualMachineInstancesStartSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances_Start.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Start.json */ /** * Sample code: StartVirtualMachine. @@ -2044,7 +3019,7 @@ public final class VirtualMachineInstancesStartSamples { */ public final class VirtualMachineInstancesStopSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances_Stop.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Stop.json */ /** * Sample code: StopVirtualMachine. @@ -2063,8 +3038,10 @@ public final class VirtualMachineInstancesStopSamples { ### VirtualMachineInstances_Update ```java +import com.azure.resourcemanager.azurestackhci.vm.models.HardwareProfileUpdate; import com.azure.resourcemanager.azurestackhci.vm.models.StorageProfileUpdate; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceUpdateProperties; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceUpdateRequest; import java.util.Arrays; @@ -2074,7 +3051,30 @@ import java.util.Arrays; */ public final class VirtualMachineInstancesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances_Update.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Update_DynamicMemory.json + */ + /** + * Sample code: UpdateVirtualMachineDynamicMemory. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + updateVirtualMachineDynamicMemory(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualMachineInstances() + .update( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", + new VirtualMachineInstanceUpdateRequest().withProperties(new VirtualMachineInstanceUpdateProperties() + .withHardwareProfile(new HardwareProfileUpdate().withDynamicMemoryConfig( + new VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig() + .withMaximumMemoryMB(8192L) + .withMinimumMemoryMB(2048L) + .withTargetMemoryBuffer(20) + .withEnabled(true)))), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Update.json */ /** * Sample code: UpdateVirtualMachine. @@ -2094,3 +3094,297 @@ public final class VirtualMachineInstancesUpdateSamples { } ``` +### VirtualNetworkSubnets_CreateOrUpdate + +```java +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetProperties; + +/** + * Samples for VirtualNetworkSubnets CreateOrUpdate. + */ +public final class VirtualNetworkSubnetsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworkSubnets_CreateOrUpdate.json + */ + /** + * Sample code: PutVirtualNetworkSubnet. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + putVirtualNetworkSubnet(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualNetworkSubnets() + .define("subnet1") + .withExistingVirtualNetwork("test-rg", "test-vnet") + .withProperties(new VirtualNetworkSubnetProperties().withAddressPrefix("10.0.0.0/28")) + .create(); + } +} +``` + +### VirtualNetworkSubnets_Delete + +```java +/** + * Samples for VirtualNetworkSubnets Delete. + */ +public final class VirtualNetworkSubnetsDeleteSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworkSubnets_Delete.json + */ + /** + * Sample code: DeleteVirtualNetworkSubnet. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + deleteVirtualNetworkSubnet(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualNetworkSubnets().delete("test-rg", "test-vnet", "subnet1", com.azure.core.util.Context.NONE); + } +} +``` + +### VirtualNetworkSubnets_Get + +```java +/** + * Samples for VirtualNetworkSubnets Get. + */ +public final class VirtualNetworkSubnetsGetSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworkSubnets_Get.json + */ + /** + * Sample code: GetVirtualNetworkSubnet. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + getVirtualNetworkSubnet(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualNetworkSubnets() + .getWithResponse("test-rg", "test-vnet", "subnet1", com.azure.core.util.Context.NONE); + } +} +``` + +### VirtualNetworkSubnets_ListByVirtualNetwork + +```java +/** + * Samples for VirtualNetworkSubnets ListByVirtualNetwork. + */ +public final class VirtualNetworkSubnetsListByVirtualNetworkSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworkSubnets_ListByVirtualNetwork.json + */ + /** + * Sample code: ListVirtualNetworkSubnetsByVirtualNetwork. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void listVirtualNetworkSubnetsByVirtualNetwork( + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualNetworkSubnets().listByVirtualNetwork("test-rg", "test-vnet", com.azure.core.util.Context.NONE); + } +} +``` + +### VirtualNetworkSubnets_Update + +```java +import com.azure.resourcemanager.azurestackhci.vm.models.NetworkSecurityGroupArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnet; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetUpdateProperties; + +/** + * Samples for VirtualNetworkSubnets Update. + */ +public final class VirtualNetworkSubnetsUpdateSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworkSubnets_Update.json + */ + /** + * Sample code: UpdateVirtualNetworkUpdates. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + updateVirtualNetworkUpdates(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + VirtualNetworkSubnet resource = manager.virtualNetworkSubnets() + .getWithResponse("test-rg", "test-vnet", "subnet1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new VirtualNetworkSubnetUpdateProperties() + .withNetworkSecurityGroup(new NetworkSecurityGroupArmReference().withId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkSecurityGroups/testnsg"))) + .apply(); + } +} +``` + +### VirtualNetworks_CreateOrUpdate + +```java +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkAddressSpace; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkDhcpOptions; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkProperties; +import java.util.Arrays; + +/** + * Samples for VirtualNetworks CreateOrUpdate. + */ +public final class VirtualNetworksCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworks_CreateOrUpdate.json + */ + /** + * Sample code: PutVirtualNetwork. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void putVirtualNetwork(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualNetworks() + .define("test-vnet") + .withRegion("West US2") + .withExistingResourceGroup("test-rg") + .withProperties(new VirtualNetworkProperties() + .withAddressSpace(new VirtualNetworkAddressSpace().withAddressPrefixes(Arrays.asList("10.0.0.0/24"))) + .withDhcpOptions(new VirtualNetworkDhcpOptions().withDnsServers(Arrays.asList()))) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .create(); + } +} +``` + +### VirtualNetworks_Delete + +```java +/** + * Samples for VirtualNetworks Delete. + */ +public final class VirtualNetworksDeleteSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworks_Delete.json + */ + /** + * Sample code: DeleteVirtualNetwork. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void deleteVirtualNetwork(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualNetworks().delete("test-rg", "test-vnet", com.azure.core.util.Context.NONE); + } +} +``` + +### VirtualNetworks_GetByResourceGroup + +```java +/** + * Samples for VirtualNetworks GetByResourceGroup. + */ +public final class VirtualNetworksGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworks_Get.json + */ + /** + * Sample code: GetVirtualNetwork. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void getVirtualNetwork(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualNetworks() + .getByResourceGroupWithResponse("test-rg", "test-vnet", com.azure.core.util.Context.NONE); + } +} +``` + +### VirtualNetworks_List + +```java +/** + * Samples for VirtualNetworks List. + */ +public final class VirtualNetworksListSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworks_ListAll.json + */ + /** + * Sample code: ListVirtualNetworkBySubscription. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listVirtualNetworkBySubscription(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualNetworks().list(com.azure.core.util.Context.NONE); + } +} +``` + +### VirtualNetworks_ListByResourceGroup + +```java +/** + * Samples for VirtualNetworks ListByResourceGroup. + */ +public final class VirtualNetworksListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworks_ListByResourceGroup.json + */ + /** + * Sample code: ListVirtualNetworkByResourceGroup. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listVirtualNetworkByResourceGroup(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualNetworks().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### VirtualNetworks_UpdateTags + +```java +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetwork; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for VirtualNetworks UpdateTags. + */ +public final class VirtualNetworksUpdateTagsSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworks_UpdateTags.json + */ + /** + * Sample code: Update virtual Network tags. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + updateVirtualNetworkTags(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + VirtualNetwork resource = manager.virtualNetworks() + .getByResourceGroupWithResponse("testrg", "testvnet", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).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/azurestackhci/azure-resourcemanager-azurestackhci-vm/pom.xml b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/pom.xml index a6308d70f5eec..fd8a1fb9dd076 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/pom.xml +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/pom.xml @@ -3,7 +3,7 @@ ~ Licensed under the MIT License. ~ Code generated by Microsoft (R) TypeSpec Code Generator. --> - + 4.0.0 com.azure @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for Azure Stack Hci Vm Management - This package contains Microsoft Azure SDK for Azure Stack Hci Vm Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Stack HCI management service. Package api-version 2025-06-01-preview. + This package contains Microsoft Azure SDK for Azure Stack Hci Vm Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Stack HCI management service. Package api-version 2026-07-01-preview. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/AzureStackHciVmManager.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/AzureStackHciVmManager.java index 9f1b405ae3b59..bc651765321fe 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/AzureStackHciVmManager.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/AzureStackHciVmManager.java @@ -30,26 +30,42 @@ import com.azure.resourcemanager.azurestackhci.vm.implementation.GalleryImagesImpl; import com.azure.resourcemanager.azurestackhci.vm.implementation.GuestAgentsImpl; import com.azure.resourcemanager.azurestackhci.vm.implementation.HybridIdentityMetadatasImpl; +import com.azure.resourcemanager.azurestackhci.vm.implementation.InboundRulesImpl; +import com.azure.resourcemanager.azurestackhci.vm.implementation.LoadBalancersImpl; import com.azure.resourcemanager.azurestackhci.vm.implementation.LogicalNetworksImpl; import com.azure.resourcemanager.azurestackhci.vm.implementation.MarketplaceGalleryImagesImpl; +import com.azure.resourcemanager.azurestackhci.vm.implementation.NatGatewaysImpl; import com.azure.resourcemanager.azurestackhci.vm.implementation.NetworkInterfacesImpl; import com.azure.resourcemanager.azurestackhci.vm.implementation.NetworkSecurityGroupsImpl; +import com.azure.resourcemanager.azurestackhci.vm.implementation.OperationsImpl; +import com.azure.resourcemanager.azurestackhci.vm.implementation.PublicIPAddressesImpl; import com.azure.resourcemanager.azurestackhci.vm.implementation.SecurityRulesImpl; +import com.azure.resourcemanager.azurestackhci.vm.implementation.SnapshotsImpl; import com.azure.resourcemanager.azurestackhci.vm.implementation.StorageContainersImpl; import com.azure.resourcemanager.azurestackhci.vm.implementation.VirtualHardDisksImpl; import com.azure.resourcemanager.azurestackhci.vm.implementation.VirtualMachineInstancesImpl; +import com.azure.resourcemanager.azurestackhci.vm.implementation.VirtualNetworkSubnetsImpl; +import com.azure.resourcemanager.azurestackhci.vm.implementation.VirtualNetworksImpl; import com.azure.resourcemanager.azurestackhci.vm.models.AttestationStatuses; import com.azure.resourcemanager.azurestackhci.vm.models.GalleryImages; import com.azure.resourcemanager.azurestackhci.vm.models.GuestAgents; import com.azure.resourcemanager.azurestackhci.vm.models.HybridIdentityMetadatas; +import com.azure.resourcemanager.azurestackhci.vm.models.InboundRules; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancers; import com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworks; import com.azure.resourcemanager.azurestackhci.vm.models.MarketplaceGalleryImages; +import com.azure.resourcemanager.azurestackhci.vm.models.NatGateways; import com.azure.resourcemanager.azurestackhci.vm.models.NetworkInterfaces; import com.azure.resourcemanager.azurestackhci.vm.models.NetworkSecurityGroups; +import com.azure.resourcemanager.azurestackhci.vm.models.Operations; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddresses; import com.azure.resourcemanager.azurestackhci.vm.models.SecurityRules; +import com.azure.resourcemanager.azurestackhci.vm.models.Snapshots; import com.azure.resourcemanager.azurestackhci.vm.models.StorageContainers; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDisks; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstances; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnets; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworks; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -75,6 +91,8 @@ public final class AzureStackHciVmManager { private SecurityRules securityRules; + private Snapshots snapshots; + private StorageContainers storageContainers; private VirtualHardDisks virtualHardDisks; @@ -87,6 +105,20 @@ public final class AzureStackHciVmManager { private GuestAgents guestAgents; + private VirtualNetworks virtualNetworks; + + private VirtualNetworkSubnets virtualNetworkSubnets; + + private PublicIPAddresses publicIPAddresses; + + private NatGateways natGateways; + + private InboundRules inboundRules; + + private LoadBalancers loadBalancers; + + private Operations operations; + private final AzureStackHciVmMgmtClient clientObject; private AzureStackHciVmManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -375,6 +407,18 @@ public SecurityRules securityRules() { return securityRules; } + /** + * Gets the resource collection API of Snapshots. It manages Snapshot. + * + * @return Resource collection API of Snapshots. + */ + public Snapshots snapshots() { + if (this.snapshots == null) { + this.snapshots = new SnapshotsImpl(clientObject.getSnapshots(), this); + } + return snapshots; + } + /** * Gets the resource collection API of StorageContainers. It manages StorageContainer. * @@ -449,6 +493,90 @@ public GuestAgents guestAgents() { return guestAgents; } + /** + * Gets the resource collection API of VirtualNetworks. It manages VirtualNetwork. + * + * @return Resource collection API of VirtualNetworks. + */ + public VirtualNetworks virtualNetworks() { + if (this.virtualNetworks == null) { + this.virtualNetworks = new VirtualNetworksImpl(clientObject.getVirtualNetworks(), this); + } + return virtualNetworks; + } + + /** + * Gets the resource collection API of VirtualNetworkSubnets. It manages VirtualNetworkSubnet. + * + * @return Resource collection API of VirtualNetworkSubnets. + */ + public VirtualNetworkSubnets virtualNetworkSubnets() { + if (this.virtualNetworkSubnets == null) { + this.virtualNetworkSubnets = new VirtualNetworkSubnetsImpl(clientObject.getVirtualNetworkSubnets(), this); + } + return virtualNetworkSubnets; + } + + /** + * Gets the resource collection API of PublicIPAddresses. It manages PublicIPAddress. + * + * @return Resource collection API of PublicIPAddresses. + */ + public PublicIPAddresses publicIPAddresses() { + if (this.publicIPAddresses == null) { + this.publicIPAddresses = new PublicIPAddressesImpl(clientObject.getPublicIPAddresses(), this); + } + return publicIPAddresses; + } + + /** + * Gets the resource collection API of NatGateways. It manages NatGateway. + * + * @return Resource collection API of NatGateways. + */ + public NatGateways natGateways() { + if (this.natGateways == null) { + this.natGateways = new NatGatewaysImpl(clientObject.getNatGateways(), this); + } + return natGateways; + } + + /** + * Gets the resource collection API of InboundRules. It manages InboundRule. + * + * @return Resource collection API of InboundRules. + */ + public InboundRules inboundRules() { + if (this.inboundRules == null) { + this.inboundRules = new InboundRulesImpl(clientObject.getInboundRules(), this); + } + return inboundRules; + } + + /** + * Gets the resource collection API of LoadBalancers. It manages LoadBalancer. + * + * @return Resource collection API of LoadBalancers. + */ + public LoadBalancers loadBalancers() { + if (this.loadBalancers == null) { + this.loadBalancers = new LoadBalancersImpl(clientObject.getLoadBalancers(), this); + } + return loadBalancers; + } + + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + /** * Gets wrapped service client AzureStackHciVmMgmtClient providing direct access to the underlying auto-generated * API implementation, based on Azure REST API. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/AzureStackHciVmMgmtClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/AzureStackHciVmMgmtClient.java index 130b991866d45..344f4b4d131fd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/AzureStackHciVmMgmtClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/AzureStackHciVmMgmtClient.java @@ -88,6 +88,13 @@ public interface AzureStackHciVmMgmtClient { */ SecurityRulesClient getSecurityRules(); + /** + * Gets the SnapshotsClient object to access its operations. + * + * @return the SnapshotsClient object. + */ + SnapshotsClient getSnapshots(); + /** * Gets the StorageContainersClient object to access its operations. * @@ -129,4 +136,53 @@ public interface AzureStackHciVmMgmtClient { * @return the GuestAgentsClient object. */ GuestAgentsClient getGuestAgents(); + + /** + * Gets the VirtualNetworksClient object to access its operations. + * + * @return the VirtualNetworksClient object. + */ + VirtualNetworksClient getVirtualNetworks(); + + /** + * Gets the VirtualNetworkSubnetsClient object to access its operations. + * + * @return the VirtualNetworkSubnetsClient object. + */ + VirtualNetworkSubnetsClient getVirtualNetworkSubnets(); + + /** + * Gets the PublicIPAddressesClient object to access its operations. + * + * @return the PublicIPAddressesClient object. + */ + PublicIPAddressesClient getPublicIPAddresses(); + + /** + * Gets the NatGatewaysClient object to access its operations. + * + * @return the NatGatewaysClient object. + */ + NatGatewaysClient getNatGateways(); + + /** + * Gets the InboundRulesClient object to access its operations. + * + * @return the InboundRulesClient object. + */ + InboundRulesClient getInboundRules(); + + /** + * Gets the LoadBalancersClient object to access its operations. + * + * @return the LoadBalancersClient object. + */ + LoadBalancersClient getLoadBalancers(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/InboundRulesClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/InboundRulesClient.java new file mode 100644 index 0000000000000..887cb26c298ca --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/InboundRulesClient.java @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.InboundRuleInner; + +/** + * An instance of this class provides access to all the operations defined in InboundRulesClient. + */ +public interface InboundRulesClient { + /** + * The operation to get an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the inbound rule resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String natGatewayName, String inboundRuleName, + Context context); + + /** + * The operation to get an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the inbound rule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InboundRuleInner get(String resourceGroupName, String natGatewayName, String inboundRuleName); + + /** + * The operation to create or update an inbound rule. Please note some properties can be set only during inbound + * rule creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the inbound rule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InboundRuleInner> beginCreateOrUpdate(String resourceGroupName, + String natGatewayName, String inboundRuleName, InboundRuleInner resource); + + /** + * The operation to create or update an inbound rule. Please note some properties can be set only during inbound + * rule creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the inbound rule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InboundRuleInner> beginCreateOrUpdate(String resourceGroupName, + String natGatewayName, String inboundRuleName, InboundRuleInner resource, Context context); + + /** + * The operation to create or update an inbound rule. Please note some properties can be set only during inbound + * rule creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the inbound rule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InboundRuleInner createOrUpdate(String resourceGroupName, String natGatewayName, String inboundRuleName, + InboundRuleInner resource); + + /** + * The operation to create or update an inbound rule. Please note some properties can be set only during inbound + * rule creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the inbound rule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InboundRuleInner createOrUpdate(String resourceGroupName, String natGatewayName, String inboundRuleName, + InboundRuleInner resource, Context context); + + /** + * The operation to delete an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String natGatewayName, + String inboundRuleName); + + /** + * The operation to delete an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String natGatewayName, + String inboundRuleName, Context context); + + /** + * The operation to delete an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String natGatewayName, String inboundRuleName); + + /** + * The operation to delete an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String natGatewayName, String inboundRuleName, Context context); + + /** + * Lists all of the inbound rules in the specified NAT gateway. Use the nextLink property in the response to get the + * next page of inbound rules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InboundRule list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNatGateway(String resourceGroupName, String natGatewayName); + + /** + * Lists all of the inbound rules in the specified NAT gateway. Use the nextLink property in the response to get the + * next page of inbound rules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InboundRule list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNatGateway(String resourceGroupName, String natGatewayName, Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/LoadBalancersClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/LoadBalancersClient.java new file mode 100644 index 0000000000000..0aa624d67844f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/LoadBalancersClient.java @@ -0,0 +1,277 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.LoadBalancerInner; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerTagsUpdate; + +/** + * An instance of this class provides access to all the operations defined in LoadBalancersClient. + */ +public interface LoadBalancersClient { + /** + * The operation to get a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String loadBalancerName, + Context context); + + /** + * The operation to get a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LoadBalancerInner getByResourceGroup(String resourceGroupName, String loadBalancerName); + + /** + * The operation to create or update a loadBalancer. Please note some properties can be set only during LoadBalancer + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LoadBalancerInner> beginCreateOrUpdate(String resourceGroupName, + String loadBalancerName, LoadBalancerInner resource); + + /** + * The operation to create or update a loadBalancer. Please note some properties can be set only during LoadBalancer + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LoadBalancerInner> beginCreateOrUpdate(String resourceGroupName, + String loadBalancerName, LoadBalancerInner resource, Context context); + + /** + * The operation to create or update a loadBalancer. Please note some properties can be set only during LoadBalancer + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LoadBalancerInner createOrUpdate(String resourceGroupName, String loadBalancerName, LoadBalancerInner resource); + + /** + * The operation to create or update a loadBalancer. Please note some properties can be set only during LoadBalancer + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LoadBalancerInner createOrUpdate(String resourceGroupName, String loadBalancerName, LoadBalancerInner resource, + Context context); + + /** + * Updates a loadBalancer tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LoadBalancerInner> beginUpdateTags(String resourceGroupName, + String loadBalancerName, LoadBalancerTagsUpdate properties); + + /** + * Updates a loadBalancer tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LoadBalancerInner> beginUpdateTags(String resourceGroupName, + String loadBalancerName, LoadBalancerTagsUpdate properties, Context context); + + /** + * Updates a loadBalancer tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LoadBalancerInner updateTags(String resourceGroupName, String loadBalancerName, LoadBalancerTagsUpdate properties); + + /** + * Updates a loadBalancer tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LoadBalancerInner updateTags(String resourceGroupName, String loadBalancerName, LoadBalancerTagsUpdate properties, + Context context); + + /** + * The operation to delete a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String loadBalancerName); + + /** + * The operation to delete a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String loadBalancerName, Context context); + + /** + * The operation to delete a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String loadBalancerName); + + /** + * The operation to delete a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String loadBalancerName, Context context); + + /** + * Lists all of the loadBalancers in the specified resource group. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all of the loadBalancers in the specified resource group. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Lists all of the loadBalancers in the specified subscription. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists all of the loadBalancers in the specified subscription. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/NatGatewaysClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/NatGatewaysClient.java new file mode 100644 index 0000000000000..ea40bdc0da0a9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/NatGatewaysClient.java @@ -0,0 +1,277 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.NatGatewayInner; +import com.azure.resourcemanager.azurestackhci.vm.models.NatGatewayTagsUpdate; + +/** + * An instance of this class provides access to all the operations defined in NatGatewaysClient. + */ +public interface NatGatewaysClient { + /** + * The operation to get a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String natGatewayName, + Context context); + + /** + * The operation to get a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NatGatewayInner getByResourceGroup(String resourceGroupName, String natGatewayName); + + /** + * The operation to create or update a natGateway. Please note some properties can be set only during NatGateway + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NatGatewayInner> beginCreateOrUpdate(String resourceGroupName, + String natGatewayName, NatGatewayInner resource); + + /** + * The operation to create or update a natGateway. Please note some properties can be set only during NatGateway + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NatGatewayInner> beginCreateOrUpdate(String resourceGroupName, + String natGatewayName, NatGatewayInner resource, Context context); + + /** + * The operation to create or update a natGateway. Please note some properties can be set only during NatGateway + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NatGatewayInner createOrUpdate(String resourceGroupName, String natGatewayName, NatGatewayInner resource); + + /** + * The operation to create or update a natGateway. Please note some properties can be set only during NatGateway + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NatGatewayInner createOrUpdate(String resourceGroupName, String natGatewayName, NatGatewayInner resource, + Context context); + + /** + * Updates a natGateway tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NatGatewayInner> beginUpdateTags(String resourceGroupName, + String natGatewayName, NatGatewayTagsUpdate properties); + + /** + * Updates a natGateway tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NatGatewayInner> beginUpdateTags(String resourceGroupName, + String natGatewayName, NatGatewayTagsUpdate properties, Context context); + + /** + * Updates a natGateway tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NatGatewayInner updateTags(String resourceGroupName, String natGatewayName, NatGatewayTagsUpdate properties); + + /** + * Updates a natGateway tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NatGatewayInner updateTags(String resourceGroupName, String natGatewayName, NatGatewayTagsUpdate properties, + Context context); + + /** + * The operation to delete a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String natGatewayName); + + /** + * The operation to delete a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String natGatewayName, Context context); + + /** + * The operation to delete a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String natGatewayName); + + /** + * The operation to delete a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String natGatewayName, Context context); + + /** + * Lists all of the natGateways in the specified resource group. Use the nextLink property in the response to get + * the next page of NatGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all of the natGateways in the specified resource group. Use the nextLink property in the response to get + * the next page of NatGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Lists all of the natGateways in the specified subscription. Use the nextLink property in the response to get the + * next page of NatGateway. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists all of the natGateways in the specified subscription. Use the nextLink property in the response to get the + * next page of NatGateway. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/OperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/OperationsClient.java new file mode 100644 index 0000000000000..ea1838f312a05 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/OperationsClient.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.OperationInner; + +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ +public interface OperationsClient { + /** + * List the operations for the provider. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/PublicIPAddressesClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/PublicIPAddressesClient.java new file mode 100644 index 0000000000000..b1c20fda828b8 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/PublicIPAddressesClient.java @@ -0,0 +1,280 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.PublicIPAddressInner; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressTagsUpdate; + +/** + * An instance of this class provides access to all the operations defined in PublicIPAddressesClient. + */ +public interface PublicIPAddressesClient { + /** + * The operation to get a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String publicIPAddressName, + Context context); + + /** + * The operation to get a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PublicIPAddressInner getByResourceGroup(String resourceGroupName, String publicIPAddressName); + + /** + * The operation to create or update a publicIPAddress. Please note some properties can be set only during PublicIP + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PublicIPAddressInner> beginCreateOrUpdate(String resourceGroupName, + String publicIPAddressName, PublicIPAddressInner resource); + + /** + * The operation to create or update a publicIPAddress. Please note some properties can be set only during PublicIP + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PublicIPAddressInner> beginCreateOrUpdate(String resourceGroupName, + String publicIPAddressName, PublicIPAddressInner resource, Context context); + + /** + * The operation to create or update a publicIPAddress. Please note some properties can be set only during PublicIP + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PublicIPAddressInner createOrUpdate(String resourceGroupName, String publicIPAddressName, + PublicIPAddressInner resource); + + /** + * The operation to create or update a publicIPAddress. Please note some properties can be set only during PublicIP + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PublicIPAddressInner createOrUpdate(String resourceGroupName, String publicIPAddressName, + PublicIPAddressInner resource, Context context); + + /** + * Updates a publicIPAddress tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PublicIPAddressInner> beginUpdateTags(String resourceGroupName, + String publicIPAddressName, PublicIPAddressTagsUpdate properties); + + /** + * Updates a publicIPAddress tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PublicIPAddressInner> beginUpdateTags(String resourceGroupName, + String publicIPAddressName, PublicIPAddressTagsUpdate properties, Context context); + + /** + * Updates a publicIPAddress tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PublicIPAddressInner updateTags(String resourceGroupName, String publicIPAddressName, + PublicIPAddressTagsUpdate properties); + + /** + * Updates a publicIPAddress tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PublicIPAddressInner updateTags(String resourceGroupName, String publicIPAddressName, + PublicIPAddressTagsUpdate properties, Context context); + + /** + * The operation to delete a publicIPAddresses. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String publicIPAddressName); + + /** + * The operation to delete a publicIPAddresses. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String publicIPAddressName, + Context context); + + /** + * The operation to delete a publicIPAddresses. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String publicIPAddressName); + + /** + * The operation to delete a publicIPAddresses. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String publicIPAddressName, Context context); + + /** + * Lists all of the publicIPAddresses in the specified resource group. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all of the publicIPAddresses in the specified resource group. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Lists all of the publicIPAddresses in the specified subscription. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists all of the publicIPAddresses in the specified subscription. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/SnapshotsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/SnapshotsClient.java new file mode 100644 index 0000000000000..e881cb1e7ab1c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/SnapshotsClient.java @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.SnapshotInner; +import com.azure.resourcemanager.azurestackhci.vm.models.SnapshotTagsUpdate; + +/** + * An instance of this class provides access to all the operations defined in SnapshotsClient. + */ +public interface SnapshotsClient { + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String snapshotName, + Context context); + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SnapshotInner getByResourceGroup(String resourceGroupName, String snapshotName); + + /** + * The operation to create or update a snapshot. Please note some properties can be set only during snapshot + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the snapshot resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SnapshotInner> beginCreateOrUpdate(String resourceGroupName, + String snapshotName, SnapshotInner resource); + + /** + * The operation to create or update a snapshot. Please note some properties can be set only during snapshot + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the snapshot resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SnapshotInner> beginCreateOrUpdate(String resourceGroupName, + String snapshotName, SnapshotInner resource, Context context); + + /** + * The operation to create or update a snapshot. Please note some properties can be set only during snapshot + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the snapshot resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SnapshotInner createOrUpdate(String resourceGroupName, String snapshotName, SnapshotInner resource); + + /** + * The operation to create or update a snapshot. Please note some properties can be set only during snapshot + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the snapshot resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SnapshotInner createOrUpdate(String resourceGroupName, String snapshotName, SnapshotInner resource, + Context context); + + /** + * The operation to update a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the snapshot resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SnapshotInner> beginUpdate(String resourceGroupName, String snapshotName, + SnapshotTagsUpdate properties); + + /** + * The operation to update a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the snapshot resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SnapshotInner> beginUpdate(String resourceGroupName, String snapshotName, + SnapshotTagsUpdate properties, Context context); + + /** + * The operation to update a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the snapshot resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SnapshotInner update(String resourceGroupName, String snapshotName, SnapshotTagsUpdate properties); + + /** + * The operation to update a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the snapshot resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SnapshotInner update(String resourceGroupName, String snapshotName, SnapshotTagsUpdate properties, Context context); + + /** + * The operation to delete a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String snapshotName); + + /** + * The operation to delete a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String snapshotName, Context context); + + /** + * The operation to delete a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String snapshotName); + + /** + * The operation to delete a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String snapshotName, Context context); + + /** + * Lists all of the snapshots in the specified resource group. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all of the snapshots in the specified resource group. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Lists all of the snapshots in the specified subscription. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists all of the snapshots in the specified subscription. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/VirtualMachineInstancesClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/VirtualMachineInstancesClient.java index b0df769b500f6..82d1912374afc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/VirtualMachineInstancesClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/VirtualMachineInstancesClient.java @@ -11,7 +11,9 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualMachineInstanceInner; +import com.azure.resourcemanager.azurestackhci.vm.models.PowerOffVirtualMachineOptions; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceUpdateRequest; /** @@ -473,4 +475,60 @@ VirtualMachineInstanceInner update(String resourceUri, VirtualMachineInstanceUpd */ @ServiceMethod(returns = ReturnType.SINGLE) void save(String resourceUri, Context context); + + /** + * The operation to power off a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResultInner> beginPowerOff(String resourceUri, + PowerOffVirtualMachineOptions body); + + /** + * The operation to power off a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResultInner> beginPowerOff(String resourceUri, + PowerOffVirtualMachineOptions body, Context context); + + /** + * The operation to power off a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner powerOff(String resourceUri, PowerOffVirtualMachineOptions body); + + /** + * The operation to power off a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner powerOff(String resourceUri, PowerOffVirtualMachineOptions body, Context context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/VirtualNetworkSubnetsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/VirtualNetworkSubnetsClient.java new file mode 100644 index 0000000000000..82f865d7b3fa1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/VirtualNetworkSubnetsClient.java @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualNetworkSubnetInner; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetUpdateRequest; + +/** + * An instance of this class provides access to all the operations defined in VirtualNetworkSubnetsClient. + */ +public interface VirtualNetworkSubnetsClient { + /** + * The operation to get a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String virtualNetworkName, + String subnetName, Context context); + + /** + * The operation to get a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualNetworkSubnetInner get(String resourceGroupName, String virtualNetworkName, String subnetName); + + /** + * The operation to create or update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VirtualNetworkSubnetInner> beginCreateOrUpdate( + String resourceGroupName, String virtualNetworkName, String subnetName, VirtualNetworkSubnetInner resource); + + /** + * The operation to create or update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VirtualNetworkSubnetInner> beginCreateOrUpdate( + String resourceGroupName, String virtualNetworkName, String subnetName, VirtualNetworkSubnetInner resource, + Context context); + + /** + * The operation to create or update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualNetworkSubnetInner createOrUpdate(String resourceGroupName, String virtualNetworkName, String subnetName, + VirtualNetworkSubnetInner resource); + + /** + * The operation to create or update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualNetworkSubnetInner createOrUpdate(String resourceGroupName, String virtualNetworkName, String subnetName, + VirtualNetworkSubnetInner resource, Context context); + + /** + * The operation to update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VirtualNetworkSubnetInner> beginUpdate(String resourceGroupName, + String virtualNetworkName, String subnetName, VirtualNetworkSubnetUpdateRequest properties); + + /** + * The operation to update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VirtualNetworkSubnetInner> beginUpdate(String resourceGroupName, + String virtualNetworkName, String subnetName, VirtualNetworkSubnetUpdateRequest properties, Context context); + + /** + * The operation to update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualNetworkSubnetInner update(String resourceGroupName, String virtualNetworkName, String subnetName, + VirtualNetworkSubnetUpdateRequest properties); + + /** + * The operation to update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualNetworkSubnetInner update(String resourceGroupName, String virtualNetworkName, String subnetName, + VirtualNetworkSubnetUpdateRequest properties, Context context); + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String virtualNetworkName, + String subnetName); + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String virtualNetworkName, + String subnetName, Context context); + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String virtualNetworkName, String subnetName); + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String virtualNetworkName, String subnetName, Context context); + + /** + * Lists all of the virtual network subnets in a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkSubnet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVirtualNetwork(String resourceGroupName, String virtualNetworkName); + + /** + * Lists all of the virtual network subnets in a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkSubnet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVirtualNetwork(String resourceGroupName, String virtualNetworkName, + Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/VirtualNetworksClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/VirtualNetworksClient.java new file mode 100644 index 0000000000000..618655a151488 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/VirtualNetworksClient.java @@ -0,0 +1,280 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualNetworkInner; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkTagsUpdate; + +/** + * An instance of this class provides access to all the operations defined in VirtualNetworksClient. + */ +public interface VirtualNetworksClient { + /** + * The operation to get a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String virtualNetworkName, + Context context); + + /** + * The operation to get a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualNetworkInner getByResourceGroup(String resourceGroupName, String virtualNetworkName); + + /** + * The operation to create or update a virtual network. Please note some properties can be set only during + * virtualNetwork network creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VirtualNetworkInner> beginCreateOrUpdate(String resourceGroupName, + String virtualNetworkName, VirtualNetworkInner resource); + + /** + * The operation to create or update a virtual network. Please note some properties can be set only during + * virtualNetwork network creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VirtualNetworkInner> beginCreateOrUpdate(String resourceGroupName, + String virtualNetworkName, VirtualNetworkInner resource, Context context); + + /** + * The operation to create or update a virtual network. Please note some properties can be set only during + * virtualNetwork network creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualNetworkInner createOrUpdate(String resourceGroupName, String virtualNetworkName, + VirtualNetworkInner resource); + + /** + * The operation to create or update a virtual network. Please note some properties can be set only during + * virtualNetwork network creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualNetworkInner createOrUpdate(String resourceGroupName, String virtualNetworkName, + VirtualNetworkInner resource, Context context); + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VirtualNetworkInner> beginUpdateTags(String resourceGroupName, + String virtualNetworkName, VirtualNetworkTagsUpdate properties); + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VirtualNetworkInner> beginUpdateTags(String resourceGroupName, + String virtualNetworkName, VirtualNetworkTagsUpdate properties, Context context); + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualNetworkInner updateTags(String resourceGroupName, String virtualNetworkName, + VirtualNetworkTagsUpdate properties); + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualNetworkInner updateTags(String resourceGroupName, String virtualNetworkName, + VirtualNetworkTagsUpdate properties, Context context); + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String virtualNetworkName); + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String virtualNetworkName, + Context context); + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String virtualNetworkName); + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String virtualNetworkName, Context context); + + /** + * Lists all of the virtual networks in the specified resource group. Use the nextLink property in the response to + * get the next page of virtualNetwork networks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all of the virtual networks in the specified resource group. Use the nextLink property in the response to + * get the next page of virtualNetwork networks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Lists all of the virtual networks in the specified subscription. Use the nextLink property in the response to get + * the next page of virtualNetwork networks. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists all of the virtual networks in the specified subscription. Use the nextLink property in the response to get + * the next page of virtualNetwork networks. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/InboundRuleInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/InboundRuleInner.java new file mode 100644 index 0000000000000..bccdb76bb41f3 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/InboundRuleInner.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.InboundRuleProperties; +import java.io.IOException; + +/** + * The inbound rule resource definition. + */ +@Fluent +public final class InboundRuleInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private InboundRuleProperties properties; + + /* + * The extendedLocation of the resource. + */ + private ExtendedLocation extendedLocation; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of InboundRuleInner class. + */ + public InboundRuleInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public InboundRuleProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the InboundRuleInner object itself. + */ + public InboundRuleInner withProperties(InboundRuleProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the extendedLocation property: The extendedLocation of the resource. + * + * @return the extendedLocation value. + */ + public ExtendedLocation extendedLocation() { + return this.extendedLocation; + } + + /** + * Set the extendedLocation property: The extendedLocation of the resource. + * + * @param extendedLocation the extendedLocation value to set. + * @return the InboundRuleInner object itself. + */ + public InboundRuleInner withExtendedLocation(ExtendedLocation extendedLocation) { + this.extendedLocation = extendedLocation; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InboundRuleInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InboundRuleInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the InboundRuleInner. + */ + public static InboundRuleInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InboundRuleInner deserializedInboundRuleInner = new InboundRuleInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedInboundRuleInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedInboundRuleInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedInboundRuleInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedInboundRuleInner.properties = InboundRuleProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedInboundRuleInner.extendedLocation = ExtendedLocation.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedInboundRuleInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInboundRuleInner; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/LoadBalancerInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/LoadBalancerInner.java new file mode 100644 index 0000000000000..54aa0f163ac35 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/LoadBalancerInner.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerProperties; +import java.io.IOException; +import java.util.Map; + +/** + * The LoadBalancer resource definition. + */ +@Fluent +public final class LoadBalancerInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private LoadBalancerProperties properties; + + /* + * The extendedLocation of the resource. + */ + private ExtendedLocation extendedLocation; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of LoadBalancerInner class. + */ + public LoadBalancerInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public LoadBalancerProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withProperties(LoadBalancerProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the extendedLocation property: The extendedLocation of the resource. + * + * @return the extendedLocation value. + */ + public ExtendedLocation extendedLocation() { + return this.extendedLocation; + } + + /** + * Set the extendedLocation property: The extendedLocation of the resource. + * + * @param extendedLocation the extendedLocation value to set. + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withExtendedLocation(ExtendedLocation extendedLocation) { + this.extendedLocation = extendedLocation; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public LoadBalancerInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LoadBalancerInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LoadBalancerInner. + */ + public static LoadBalancerInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerInner deserializedLoadBalancerInner = new LoadBalancerInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedLoadBalancerInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedLoadBalancerInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedLoadBalancerInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedLoadBalancerInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedLoadBalancerInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedLoadBalancerInner.properties = LoadBalancerProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedLoadBalancerInner.extendedLocation = ExtendedLocation.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedLoadBalancerInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerInner; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/NatGatewayInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/NatGatewayInner.java new file mode 100644 index 0000000000000..6d1eafd54c977 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/NatGatewayInner.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.NatGatewayProperties; +import java.io.IOException; +import java.util.Map; + +/** + * The NatGateway resource definition. + */ +@Fluent +public final class NatGatewayInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private NatGatewayProperties properties; + + /* + * The extendedLocation of the resource. + */ + private ExtendedLocation extendedLocation; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of NatGatewayInner class. + */ + public NatGatewayInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public NatGatewayProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the NatGatewayInner object itself. + */ + public NatGatewayInner withProperties(NatGatewayProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the extendedLocation property: The extendedLocation of the resource. + * + * @return the extendedLocation value. + */ + public ExtendedLocation extendedLocation() { + return this.extendedLocation; + } + + /** + * Set the extendedLocation property: The extendedLocation of the resource. + * + * @param extendedLocation the extendedLocation value to set. + * @return the NatGatewayInner object itself. + */ + public NatGatewayInner withExtendedLocation(ExtendedLocation extendedLocation) { + this.extendedLocation = extendedLocation; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public NatGatewayInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public NatGatewayInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NatGatewayInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NatGatewayInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NatGatewayInner. + */ + public static NatGatewayInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NatGatewayInner deserializedNatGatewayInner = new NatGatewayInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedNatGatewayInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNatGatewayInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedNatGatewayInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedNatGatewayInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedNatGatewayInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedNatGatewayInner.properties = NatGatewayProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedNatGatewayInner.extendedLocation = ExtendedLocation.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedNatGatewayInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNatGatewayInner; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/OperationInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/OperationInner.java new file mode 100644 index 0000000000000..b251c1a7c462b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/OperationInner.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.vm.models.ActionType; +import com.azure.resourcemanager.azurestackhci.vm.models.OperationDisplay; +import com.azure.resourcemanager.azurestackhci.vm.models.Origin; +import java.io.IOException; + +/** + * REST API Operation + * + * Details of a REST API operation, returned from the Resource Provider Operations API. + */ +@Immutable +public final class OperationInner implements JsonSerializable { + /* + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + */ + private String name; + + /* + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure + * Resource Manager/control-plane operations. + */ + private Boolean isDataAction; + + /* + * Localized display information for this particular operation. + */ + private OperationDisplay display; + + /* + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + * value is "user,system" + */ + private Origin origin; + + /* + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ + private ActionType actionType; + + /** + * Creates an instance of OperationInner class. + */ + private OperationInner() { + } + + /** + * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for Azure Resource Manager/control-plane operations. + * + * @return the isDataAction value. + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Get the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + public Origin origin() { + return this.origin; + } + + /** + * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. + * + * @return the actionType value. + */ + public ActionType actionType() { + return this.actionType; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("display", this.display); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationInner. + */ + public static OperationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationInner deserializedOperationInner = new OperationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedOperationInner.name = reader.getString(); + } else if ("isDataAction".equals(fieldName)) { + deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean); + } else if ("display".equals(fieldName)) { + deserializedOperationInner.display = OperationDisplay.fromJson(reader); + } else if ("origin".equals(fieldName)) { + deserializedOperationInner.origin = Origin.fromString(reader.getString()); + } else if ("actionType".equals(fieldName)) { + deserializedOperationInner.actionType = ActionType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationInner; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/OperationStatusResultInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/OperationStatusResultInner.java new file mode 100644 index 0000000000000..cec64714cd654 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/OperationStatusResultInner.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The current status of an async operation. + */ +@Immutable +public final class OperationStatusResultInner implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of OperationStatusResultInner class. + */ + private OperationStatusResultInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationStatusResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationStatusResultInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OperationStatusResultInner. + */ + public static OperationStatusResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationStatusResultInner deserializedOperationStatusResultInner = new OperationStatusResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedOperationStatusResultInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedOperationStatusResultInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedOperationStatusResultInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedOperationStatusResultInner.percentComplete = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedOperationStatusResultInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedOperationStatusResultInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedOperationStatusResultInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedOperationStatusResultInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedOperationStatusResultInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationStatusResultInner; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/PublicIPAddressInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/PublicIPAddressInner.java new file mode 100644 index 0000000000000..cd41bfc84f79b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/PublicIPAddressInner.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressProperties; +import java.io.IOException; +import java.util.Map; + +/** + * The publicIP resource definition. + */ +@Fluent +public final class PublicIPAddressInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private PublicIPAddressProperties properties; + + /* + * The extendedLocation of the resource. + */ + private ExtendedLocation extendedLocation; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of PublicIPAddressInner class. + */ + public PublicIPAddressInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public PublicIPAddressProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the PublicIPAddressInner object itself. + */ + public PublicIPAddressInner withProperties(PublicIPAddressProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the extendedLocation property: The extendedLocation of the resource. + * + * @return the extendedLocation value. + */ + public ExtendedLocation extendedLocation() { + return this.extendedLocation; + } + + /** + * Set the extendedLocation property: The extendedLocation of the resource. + * + * @param extendedLocation the extendedLocation value to set. + * @return the PublicIPAddressInner object itself. + */ + public PublicIPAddressInner withExtendedLocation(ExtendedLocation extendedLocation) { + this.extendedLocation = extendedLocation; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public PublicIPAddressInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PublicIPAddressInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PublicIPAddressInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PublicIPAddressInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PublicIPAddressInner. + */ + public static PublicIPAddressInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PublicIPAddressInner deserializedPublicIPAddressInner = new PublicIPAddressInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPublicIPAddressInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPublicIPAddressInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPublicIPAddressInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedPublicIPAddressInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPublicIPAddressInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedPublicIPAddressInner.properties = PublicIPAddressProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedPublicIPAddressInner.extendedLocation = ExtendedLocation.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPublicIPAddressInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPublicIPAddressInner; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/SnapshotInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/SnapshotInner.java new file mode 100644 index 0000000000000..242bf76f136c6 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/SnapshotInner.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.SnapshotProperties; +import java.io.IOException; +import java.util.Map; + +/** + * The snapshot resource definition. + */ +@Fluent +public final class SnapshotInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private SnapshotProperties properties; + + /* + * The extendedLocation of the resource. + */ + private ExtendedLocation extendedLocation; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SnapshotInner class. + */ + public SnapshotInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public SnapshotProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the SnapshotInner object itself. + */ + public SnapshotInner withProperties(SnapshotProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the extendedLocation property: The extendedLocation of the resource. + * + * @return the extendedLocation value. + */ + public ExtendedLocation extendedLocation() { + return this.extendedLocation; + } + + /** + * Set the extendedLocation property: The extendedLocation of the resource. + * + * @param extendedLocation the extendedLocation value to set. + * @return the SnapshotInner object itself. + */ + public SnapshotInner withExtendedLocation(ExtendedLocation extendedLocation) { + this.extendedLocation = extendedLocation; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public SnapshotInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SnapshotInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SnapshotInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SnapshotInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SnapshotInner. + */ + public static SnapshotInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SnapshotInner deserializedSnapshotInner = new SnapshotInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSnapshotInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSnapshotInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSnapshotInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedSnapshotInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSnapshotInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedSnapshotInner.properties = SnapshotProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedSnapshotInner.extendedLocation = ExtendedLocation.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSnapshotInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSnapshotInner; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/SubnetProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/SubnetProperties.java index 9931c114f1ec9..592b15275b644 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/SubnetProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/SubnetProperties.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.azurestackhci.vm.models.IPPool; import com.azure.resourcemanager.azurestackhci.vm.models.IpAllocationMethodEnum; import com.azure.resourcemanager.azurestackhci.vm.models.NetworkSecurityGroupArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.ProvisioningStateEnum; import com.azure.resourcemanager.azurestackhci.vm.models.RouteTable; import com.azure.resourcemanager.azurestackhci.vm.models.SubnetIpConfigurationReference; import java.io.IOException; @@ -62,6 +63,11 @@ public final class SubnetProperties implements JsonSerializable { /* - * The ARM ID for a Virtual Hard Disk. + * The Azure Resource ID for a Virtual Hard Disk. */ private String virtualHardDiskId; @@ -34,7 +34,7 @@ private VirtualHardDiskUploadResponseInner() { } /** - * Get the virtualHardDiskId property: The ARM ID for a Virtual Hard Disk. + * Get the virtualHardDiskId property: The Azure Resource ID for a Virtual Hard Disk. * * @return the virtualHardDiskId value. */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/VirtualNetworkInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/VirtualNetworkInner.java new file mode 100644 index 0000000000000..83c3d963855ae --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/VirtualNetworkInner.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkProperties; +import java.io.IOException; +import java.util.Map; + +/** + * The virtual network resource definition. + */ +@Fluent +public final class VirtualNetworkInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private VirtualNetworkProperties properties; + + /* + * The extendedLocation of the resource. + */ + private ExtendedLocation extendedLocation; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of VirtualNetworkInner class. + */ + public VirtualNetworkInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public VirtualNetworkProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the VirtualNetworkInner object itself. + */ + public VirtualNetworkInner withProperties(VirtualNetworkProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the extendedLocation property: The extendedLocation of the resource. + * + * @return the extendedLocation value. + */ + public ExtendedLocation extendedLocation() { + return this.extendedLocation; + } + + /** + * Set the extendedLocation property: The extendedLocation of the resource. + * + * @param extendedLocation the extendedLocation value to set. + * @return the VirtualNetworkInner object itself. + */ + public VirtualNetworkInner withExtendedLocation(ExtendedLocation extendedLocation) { + this.extendedLocation = extendedLocation; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public VirtualNetworkInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public VirtualNetworkInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VirtualNetworkInner. + */ + public static VirtualNetworkInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkInner deserializedVirtualNetworkInner = new VirtualNetworkInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedVirtualNetworkInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedVirtualNetworkInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedVirtualNetworkInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedVirtualNetworkInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedVirtualNetworkInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedVirtualNetworkInner.properties = VirtualNetworkProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedVirtualNetworkInner.extendedLocation = ExtendedLocation.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedVirtualNetworkInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkInner; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/VirtualNetworkSubnetInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/VirtualNetworkSubnetInner.java new file mode 100644 index 0000000000000..1a5799fda99d8 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/VirtualNetworkSubnetInner.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetProperties; +import java.io.IOException; + +/** + * The virtual network resource definition. + */ +@Fluent +public final class VirtualNetworkSubnetInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private VirtualNetworkSubnetProperties properties; + + /* + * The extendedLocation of the resource. + */ + private ExtendedLocation extendedLocation; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of VirtualNetworkSubnetInner class. + */ + public VirtualNetworkSubnetInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public VirtualNetworkSubnetProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the VirtualNetworkSubnetInner object itself. + */ + public VirtualNetworkSubnetInner withProperties(VirtualNetworkSubnetProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the extendedLocation property: The extendedLocation of the resource. + * + * @return the extendedLocation value. + */ + public ExtendedLocation extendedLocation() { + return this.extendedLocation; + } + + /** + * Set the extendedLocation property: The extendedLocation of the resource. + * + * @param extendedLocation the extendedLocation value to set. + * @return the VirtualNetworkSubnetInner object itself. + */ + public VirtualNetworkSubnetInner withExtendedLocation(ExtendedLocation extendedLocation) { + this.extendedLocation = extendedLocation; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkSubnetInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkSubnetInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VirtualNetworkSubnetInner. + */ + public static VirtualNetworkSubnetInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkSubnetInner deserializedVirtualNetworkSubnetInner = new VirtualNetworkSubnetInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedVirtualNetworkSubnetInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedVirtualNetworkSubnetInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedVirtualNetworkSubnetInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedVirtualNetworkSubnetInner.properties = VirtualNetworkSubnetProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedVirtualNetworkSubnetInner.extendedLocation = ExtendedLocation.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedVirtualNetworkSubnetInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkSubnetInner; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/AzureStackHciVmMgmtClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/AzureStackHciVmMgmtClientImpl.java index db820550c6ba2..e09bc932b8495 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/AzureStackHciVmMgmtClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/AzureStackHciVmMgmtClientImpl.java @@ -31,14 +31,22 @@ import com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient; import com.azure.resourcemanager.azurestackhci.vm.fluent.GuestAgentsClient; import com.azure.resourcemanager.azurestackhci.vm.fluent.HybridIdentityMetadatasClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.InboundRulesClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.LoadBalancersClient; import com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient; import com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.NatGatewaysClient; import com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient; import com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.OperationsClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.PublicIPAddressesClient; import com.azure.resourcemanager.azurestackhci.vm.fluent.SecurityRulesClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.SnapshotsClient; import com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient; import com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient; import com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworkSubnetsClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworksClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -221,6 +229,20 @@ public SecurityRulesClient getSecurityRules() { return this.securityRules; } + /** + * The SnapshotsClient object to access its operations. + */ + private final SnapshotsClient snapshots; + + /** + * Gets the SnapshotsClient object to access its operations. + * + * @return the SnapshotsClient object. + */ + public SnapshotsClient getSnapshots() { + return this.snapshots; + } + /** * The StorageContainersClient object to access its operations. */ @@ -305,6 +327,104 @@ public GuestAgentsClient getGuestAgents() { return this.guestAgents; } + /** + * The VirtualNetworksClient object to access its operations. + */ + private final VirtualNetworksClient virtualNetworks; + + /** + * Gets the VirtualNetworksClient object to access its operations. + * + * @return the VirtualNetworksClient object. + */ + public VirtualNetworksClient getVirtualNetworks() { + return this.virtualNetworks; + } + + /** + * The VirtualNetworkSubnetsClient object to access its operations. + */ + private final VirtualNetworkSubnetsClient virtualNetworkSubnets; + + /** + * Gets the VirtualNetworkSubnetsClient object to access its operations. + * + * @return the VirtualNetworkSubnetsClient object. + */ + public VirtualNetworkSubnetsClient getVirtualNetworkSubnets() { + return this.virtualNetworkSubnets; + } + + /** + * The PublicIPAddressesClient object to access its operations. + */ + private final PublicIPAddressesClient publicIPAddresses; + + /** + * Gets the PublicIPAddressesClient object to access its operations. + * + * @return the PublicIPAddressesClient object. + */ + public PublicIPAddressesClient getPublicIPAddresses() { + return this.publicIPAddresses; + } + + /** + * The NatGatewaysClient object to access its operations. + */ + private final NatGatewaysClient natGateways; + + /** + * Gets the NatGatewaysClient object to access its operations. + * + * @return the NatGatewaysClient object. + */ + public NatGatewaysClient getNatGateways() { + return this.natGateways; + } + + /** + * The InboundRulesClient object to access its operations. + */ + private final InboundRulesClient inboundRules; + + /** + * Gets the InboundRulesClient object to access its operations. + * + * @return the InboundRulesClient object. + */ + public InboundRulesClient getInboundRules() { + return this.inboundRules; + } + + /** + * The LoadBalancersClient object to access its operations. + */ + private final LoadBalancersClient loadBalancers; + + /** + * Gets the LoadBalancersClient object to access its operations. + * + * @return the LoadBalancersClient object. + */ + public LoadBalancersClient getLoadBalancers() { + return this.loadBalancers; + } + + /** + * The OperationsClient object to access its operations. + */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + /** * Initializes an instance of AzureStackHciVmMgmtClient client. * @@ -322,19 +442,27 @@ public GuestAgentsClient getGuestAgents() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2025-06-01-preview"; + this.apiVersion = "2026-07-01-preview"; this.galleryImages = new GalleryImagesClientImpl(this); this.logicalNetworks = new LogicalNetworksClientImpl(this); this.marketplaceGalleryImages = new MarketplaceGalleryImagesClientImpl(this); this.networkInterfaces = new NetworkInterfacesClientImpl(this); this.networkSecurityGroups = new NetworkSecurityGroupsClientImpl(this); this.securityRules = new SecurityRulesClientImpl(this); + this.snapshots = new SnapshotsClientImpl(this); this.storageContainers = new StorageContainersClientImpl(this); this.virtualHardDisks = new VirtualHardDisksClientImpl(this); this.virtualMachineInstances = new VirtualMachineInstancesClientImpl(this); this.hybridIdentityMetadatas = new HybridIdentityMetadatasClientImpl(this); this.attestationStatuses = new AttestationStatusesClientImpl(this); this.guestAgents = new GuestAgentsClientImpl(this); + this.virtualNetworks = new VirtualNetworksClientImpl(this); + this.virtualNetworkSubnets = new VirtualNetworkSubnetsClientImpl(this); + this.publicIPAddresses = new PublicIPAddressesClientImpl(this); + this.natGateways = new NatGatewaysClientImpl(this); + this.inboundRules = new InboundRulesClientImpl(this); + this.loadBalancers = new LoadBalancersClientImpl(this); + this.operations = new OperationsClientImpl(this); } /** diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/InboundRuleImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/InboundRuleImpl.java new file mode 100644 index 0000000000000..f5043531c1cc4 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/InboundRuleImpl.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.InboundRuleInner; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.InboundRule; +import com.azure.resourcemanager.azurestackhci.vm.models.InboundRuleProperties; + +public final class InboundRuleImpl implements InboundRule, InboundRule.Definition, InboundRule.Update { + private InboundRuleInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public InboundRuleProperties properties() { + return this.innerModel().properties(); + } + + public ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public InboundRuleInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String natGatewayName; + + private String inboundRuleName; + + public InboundRuleImpl withExistingNatGateway(String resourceGroupName, String natGatewayName) { + this.resourceGroupName = resourceGroupName; + this.natGatewayName = natGatewayName; + return this; + } + + public InboundRule create() { + this.innerObject = serviceManager.serviceClient() + .getInboundRules() + .createOrUpdate(resourceGroupName, natGatewayName, inboundRuleName, this.innerModel(), Context.NONE); + return this; + } + + public InboundRule create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getInboundRules() + .createOrUpdate(resourceGroupName, natGatewayName, inboundRuleName, this.innerModel(), context); + return this; + } + + InboundRuleImpl(String name, com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerObject = new InboundRuleInner(); + this.serviceManager = serviceManager; + this.inboundRuleName = name; + } + + public InboundRuleImpl update() { + return this; + } + + public InboundRule apply() { + this.innerObject = serviceManager.serviceClient() + .getInboundRules() + .createOrUpdate(resourceGroupName, natGatewayName, inboundRuleName, this.innerModel(), Context.NONE); + return this; + } + + public InboundRule apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getInboundRules() + .createOrUpdate(resourceGroupName, natGatewayName, inboundRuleName, this.innerModel(), context); + return this; + } + + InboundRuleImpl(InboundRuleInner innerObject, + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.natGatewayName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "natGateways"); + this.inboundRuleName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "inboundRules"); + } + + public InboundRule refresh() { + this.innerObject = serviceManager.serviceClient() + .getInboundRules() + .getWithResponse(resourceGroupName, natGatewayName, inboundRuleName, Context.NONE) + .getValue(); + return this; + } + + public InboundRule refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getInboundRules() + .getWithResponse(resourceGroupName, natGatewayName, inboundRuleName, context) + .getValue(); + return this; + } + + public InboundRuleImpl withProperties(InboundRuleProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public InboundRuleImpl withExtendedLocation(ExtendedLocation extendedLocation) { + this.innerModel().withExtendedLocation(extendedLocation); + return this; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/InboundRulesClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/InboundRulesClientImpl.java new file mode 100644 index 0000000000000..cf0bcb49b599e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/InboundRulesClientImpl.java @@ -0,0 +1,784 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.vm.fluent.InboundRulesClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.InboundRuleInner; +import com.azure.resourcemanager.azurestackhci.vm.implementation.models.InboundRuleListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in InboundRulesClient. + */ +public final class InboundRulesClientImpl implements InboundRulesClient { + /** + * The proxy service used to perform REST calls. + */ + private final InboundRulesService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciVmMgmtClientImpl client; + + /** + * Initializes an instance of InboundRulesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + InboundRulesClientImpl(AzureStackHciVmMgmtClientImpl client) { + this.service + = RestProxy.create(InboundRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciVmMgmtClientInboundRules to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciVmMgmtClientInboundRules") + public interface InboundRulesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways/{natGatewayName}/inboundRules/{inboundRuleName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("natGatewayName") String natGatewayName, @PathParam("inboundRuleName") String inboundRuleName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways/{natGatewayName}/inboundRules/{inboundRuleName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("natGatewayName") String natGatewayName, @PathParam("inboundRuleName") String inboundRuleName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways/{natGatewayName}/inboundRules/{inboundRuleName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("natGatewayName") String natGatewayName, @PathParam("inboundRuleName") String inboundRuleName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InboundRuleInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways/{natGatewayName}/inboundRules/{inboundRuleName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("natGatewayName") String natGatewayName, @PathParam("inboundRuleName") String inboundRuleName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InboundRuleInner resource, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways/{natGatewayName}/inboundRules/{inboundRuleName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("natGatewayName") String natGatewayName, @PathParam("inboundRuleName") String inboundRuleName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways/{natGatewayName}/inboundRules/{inboundRuleName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("natGatewayName") String natGatewayName, @PathParam("inboundRuleName") String inboundRuleName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways/{natGatewayName}/inboundRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNatGateway(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("natGatewayName") String natGatewayName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways/{natGatewayName}/inboundRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByNatGatewaySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("natGatewayName") String natGatewayName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNatGatewayNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByNatGatewayNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * The operation to get an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the inbound rule resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String natGatewayName, + String inboundRuleName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, inboundRuleName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to get an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the inbound rule resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String natGatewayName, String inboundRuleName) { + return getWithResponseAsync(resourceGroupName, natGatewayName, inboundRuleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * The operation to get an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the inbound rule resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String natGatewayName, + String inboundRuleName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, natGatewayName, inboundRuleName, accept, context); + } + + /** + * The operation to get an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the inbound rule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InboundRuleInner get(String resourceGroupName, String natGatewayName, String inboundRuleName) { + return getWithResponse(resourceGroupName, natGatewayName, inboundRuleName, Context.NONE).getValue(); + } + + /** + * The operation to create or update an inbound rule. Please note some properties can be set only during inbound + * rule creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the inbound rule resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String natGatewayName, String inboundRuleName, InboundRuleInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, inboundRuleName, contentType, + accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to create or update an inbound rule. Please note some properties can be set only during inbound + * rule creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the inbound rule resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String natGatewayName, + String inboundRuleName, InboundRuleInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, inboundRuleName, contentType, accept, + resource, Context.NONE); + } + + /** + * The operation to create or update an inbound rule. Please note some properties can be set only during inbound + * rule creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the inbound rule resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String natGatewayName, + String inboundRuleName, InboundRuleInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, inboundRuleName, contentType, accept, + resource, context); + } + + /** + * The operation to create or update an inbound rule. Please note some properties can be set only during inbound + * rule creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the inbound rule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InboundRuleInner> beginCreateOrUpdateAsync( + String resourceGroupName, String natGatewayName, String inboundRuleName, InboundRuleInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, natGatewayName, inboundRuleName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InboundRuleInner.class, InboundRuleInner.class, this.client.getContext()); + } + + /** + * The operation to create or update an inbound rule. Please note some properties can be set only during inbound + * rule creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the inbound rule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InboundRuleInner> beginCreateOrUpdate(String resourceGroupName, + String natGatewayName, String inboundRuleName, InboundRuleInner resource) { + Response response + = createOrUpdateWithResponse(resourceGroupName, natGatewayName, inboundRuleName, resource); + return this.client.getLroResult(response, InboundRuleInner.class, + InboundRuleInner.class, Context.NONE); + } + + /** + * The operation to create or update an inbound rule. Please note some properties can be set only during inbound + * rule creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the inbound rule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InboundRuleInner> beginCreateOrUpdate(String resourceGroupName, + String natGatewayName, String inboundRuleName, InboundRuleInner resource, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, natGatewayName, inboundRuleName, resource, context); + return this.client.getLroResult(response, InboundRuleInner.class, + InboundRuleInner.class, context); + } + + /** + * The operation to create or update an inbound rule. Please note some properties can be set only during inbound + * rule creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the inbound rule resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String natGatewayName, + String inboundRuleName, InboundRuleInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, natGatewayName, inboundRuleName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to create or update an inbound rule. Please note some properties can be set only during inbound + * rule creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the inbound rule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InboundRuleInner createOrUpdate(String resourceGroupName, String natGatewayName, String inboundRuleName, + InboundRuleInner resource) { + return beginCreateOrUpdate(resourceGroupName, natGatewayName, inboundRuleName, resource).getFinalResult(); + } + + /** + * The operation to create or update an inbound rule. Please note some properties can be set only during inbound + * rule creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the inbound rule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InboundRuleInner createOrUpdate(String resourceGroupName, String natGatewayName, String inboundRuleName, + InboundRuleInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, natGatewayName, inboundRuleName, resource, context) + .getFinalResult(); + } + + /** + * The operation to delete an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String natGatewayName, + String inboundRuleName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, inboundRuleName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to delete an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String natGatewayName, + String inboundRuleName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, inboundRuleName, Context.NONE); + } + + /** + * The operation to delete an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String natGatewayName, + String inboundRuleName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, inboundRuleName, context); + } + + /** + * The operation to delete an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String natGatewayName, + String inboundRuleName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, natGatewayName, inboundRuleName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * The operation to delete an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String natGatewayName, + String inboundRuleName) { + Response response = deleteWithResponse(resourceGroupName, natGatewayName, inboundRuleName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * The operation to delete an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String natGatewayName, + String inboundRuleName, Context context) { + Response response = deleteWithResponse(resourceGroupName, natGatewayName, inboundRuleName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * The operation to delete an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String natGatewayName, String inboundRuleName) { + return beginDeleteAsync(resourceGroupName, natGatewayName, inboundRuleName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to delete an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String natGatewayName, String inboundRuleName) { + beginDelete(resourceGroupName, natGatewayName, inboundRuleName).getFinalResult(); + } + + /** + * The operation to delete an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String natGatewayName, String inboundRuleName, Context context) { + beginDelete(resourceGroupName, natGatewayName, inboundRuleName, context).getFinalResult(); + } + + /** + * Lists all of the inbound rules in the specified NAT gateway. Use the nextLink property in the response to get the + * next page of inbound rules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InboundRule list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNatGatewaySinglePageAsync(String resourceGroupName, + String natGatewayName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByNatGateway(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all of the inbound rules in the specified NAT gateway. Use the nextLink property in the response to get the + * next page of inbound rules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InboundRule list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNatGatewayAsync(String resourceGroupName, String natGatewayName) { + return new PagedFlux<>(() -> listByNatGatewaySinglePageAsync(resourceGroupName, natGatewayName), + nextLink -> listByNatGatewayNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the inbound rules in the specified NAT gateway. Use the nextLink property in the response to get the + * next page of inbound rules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InboundRule list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNatGatewaySinglePage(String resourceGroupName, + String natGatewayName) { + final String accept = "application/json"; + Response res + = service.listByNatGatewaySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the inbound rules in the specified NAT gateway. Use the nextLink property in the response to get the + * next page of inbound rules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InboundRule list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNatGatewaySinglePage(String resourceGroupName, String natGatewayName, + Context context) { + final String accept = "application/json"; + Response res + = service.listByNatGatewaySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the inbound rules in the specified NAT gateway. Use the nextLink property in the response to get the + * next page of inbound rules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InboundRule list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNatGateway(String resourceGroupName, String natGatewayName) { + return new PagedIterable<>(() -> listByNatGatewaySinglePage(resourceGroupName, natGatewayName), + nextLink -> listByNatGatewayNextSinglePage(nextLink)); + } + + /** + * Lists all of the inbound rules in the specified NAT gateway. Use the nextLink property in the response to get the + * next page of inbound rules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InboundRule list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNatGateway(String resourceGroupName, String natGatewayName, + Context context) { + return new PagedIterable<>(() -> listByNatGatewaySinglePage(resourceGroupName, natGatewayName, context), + nextLink -> listByNatGatewayNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InboundRule list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNatGatewayNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByNatGatewayNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InboundRule list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNatGatewayNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByNatGatewayNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InboundRule list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNatGatewayNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listByNatGatewayNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/InboundRulesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/InboundRulesImpl.java new file mode 100644 index 0000000000000..60db3d0719768 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/InboundRulesImpl.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.vm.fluent.InboundRulesClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.InboundRuleInner; +import com.azure.resourcemanager.azurestackhci.vm.models.InboundRule; +import com.azure.resourcemanager.azurestackhci.vm.models.InboundRules; + +public final class InboundRulesImpl implements InboundRules { + private static final ClientLogger LOGGER = new ClientLogger(InboundRulesImpl.class); + + private final InboundRulesClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager; + + public InboundRulesImpl(InboundRulesClient innerClient, + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String natGatewayName, + String inboundRuleName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, natGatewayName, inboundRuleName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new InboundRuleImpl(inner.getValue(), this.manager())); + } + + public InboundRule get(String resourceGroupName, String natGatewayName, String inboundRuleName) { + InboundRuleInner inner = this.serviceClient().get(resourceGroupName, natGatewayName, inboundRuleName); + if (inner != null) { + return new InboundRuleImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String natGatewayName, String inboundRuleName) { + this.serviceClient().delete(resourceGroupName, natGatewayName, inboundRuleName); + } + + public void delete(String resourceGroupName, String natGatewayName, String inboundRuleName, Context context) { + this.serviceClient().delete(resourceGroupName, natGatewayName, inboundRuleName, context); + } + + public PagedIterable listByNatGateway(String resourceGroupName, String natGatewayName) { + PagedIterable inner + = this.serviceClient().listByNatGateway(resourceGroupName, natGatewayName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new InboundRuleImpl(inner1, this.manager())); + } + + public PagedIterable listByNatGateway(String resourceGroupName, String natGatewayName, + Context context) { + PagedIterable inner + = this.serviceClient().listByNatGateway(resourceGroupName, natGatewayName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new InboundRuleImpl(inner1, this.manager())); + } + + public InboundRule getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String natGatewayName = ResourceManagerUtils.getValueFromIdByName(id, "natGateways"); + if (natGatewayName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'natGateways'.", id))); + } + String inboundRuleName = ResourceManagerUtils.getValueFromIdByName(id, "inboundRules"); + if (inboundRuleName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inboundRules'.", id))); + } + return this.getWithResponse(resourceGroupName, natGatewayName, inboundRuleName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String natGatewayName = ResourceManagerUtils.getValueFromIdByName(id, "natGateways"); + if (natGatewayName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'natGateways'.", id))); + } + String inboundRuleName = ResourceManagerUtils.getValueFromIdByName(id, "inboundRules"); + if (inboundRuleName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inboundRules'.", id))); + } + return this.getWithResponse(resourceGroupName, natGatewayName, inboundRuleName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String natGatewayName = ResourceManagerUtils.getValueFromIdByName(id, "natGateways"); + if (natGatewayName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'natGateways'.", id))); + } + String inboundRuleName = ResourceManagerUtils.getValueFromIdByName(id, "inboundRules"); + if (inboundRuleName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inboundRules'.", id))); + } + this.delete(resourceGroupName, natGatewayName, inboundRuleName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String natGatewayName = ResourceManagerUtils.getValueFromIdByName(id, "natGateways"); + if (natGatewayName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'natGateways'.", id))); + } + String inboundRuleName = ResourceManagerUtils.getValueFromIdByName(id, "inboundRules"); + if (inboundRuleName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inboundRules'.", id))); + } + this.delete(resourceGroupName, natGatewayName, inboundRuleName, context); + } + + private InboundRulesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager() { + return this.serviceManager; + } + + public InboundRuleImpl define(String name) { + return new InboundRuleImpl(name, this.manager()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/LoadBalancerImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/LoadBalancerImpl.java new file mode 100644 index 0000000000000..7c71eca6f75ea --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/LoadBalancerImpl.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.LoadBalancerInner; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancer; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerTagsUpdate; +import java.util.Collections; +import java.util.Map; + +public final class LoadBalancerImpl implements LoadBalancer, LoadBalancer.Definition, LoadBalancer.Update { + private LoadBalancerInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public LoadBalancerProperties properties() { + return this.innerModel().properties(); + } + + public ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public LoadBalancerInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String loadBalancerName; + + private LoadBalancerTagsUpdate updateProperties; + + public LoadBalancerImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public LoadBalancer create() { + this.innerObject = serviceManager.serviceClient() + .getLoadBalancers() + .createOrUpdate(resourceGroupName, loadBalancerName, this.innerModel(), Context.NONE); + return this; + } + + public LoadBalancer create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getLoadBalancers() + .createOrUpdate(resourceGroupName, loadBalancerName, this.innerModel(), context); + return this; + } + + LoadBalancerImpl(String name, com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerObject = new LoadBalancerInner(); + this.serviceManager = serviceManager; + this.loadBalancerName = name; + } + + public LoadBalancerImpl update() { + this.updateProperties = new LoadBalancerTagsUpdate(); + return this; + } + + public LoadBalancer apply() { + this.innerObject = serviceManager.serviceClient() + .getLoadBalancers() + .updateTags(resourceGroupName, loadBalancerName, updateProperties, Context.NONE); + return this; + } + + public LoadBalancer apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getLoadBalancers() + .updateTags(resourceGroupName, loadBalancerName, updateProperties, context); + return this; + } + + LoadBalancerImpl(LoadBalancerInner innerObject, + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.loadBalancerName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "loadBalancers"); + } + + public LoadBalancer refresh() { + this.innerObject = serviceManager.serviceClient() + .getLoadBalancers() + .getByResourceGroupWithResponse(resourceGroupName, loadBalancerName, Context.NONE) + .getValue(); + return this; + } + + public LoadBalancer refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getLoadBalancers() + .getByResourceGroupWithResponse(resourceGroupName, loadBalancerName, context) + .getValue(); + return this; + } + + public LoadBalancerImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public LoadBalancerImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public LoadBalancerImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public LoadBalancerImpl withProperties(LoadBalancerProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public LoadBalancerImpl withExtendedLocation(ExtendedLocation extendedLocation) { + this.innerModel().withExtendedLocation(extendedLocation); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/LoadBalancersClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/LoadBalancersClientImpl.java new file mode 100644 index 0000000000000..1b7b3840dedf7 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/LoadBalancersClientImpl.java @@ -0,0 +1,1130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.vm.fluent.LoadBalancersClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.LoadBalancerInner; +import com.azure.resourcemanager.azurestackhci.vm.implementation.models.LoadBalancerListResult; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerTagsUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in LoadBalancersClient. + */ +public final class LoadBalancersClientImpl implements LoadBalancersClient { + /** + * The proxy service used to perform REST calls. + */ + private final LoadBalancersService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciVmMgmtClientImpl client; + + /** + * Initializes an instance of LoadBalancersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + LoadBalancersClientImpl(AzureStackHciVmMgmtClientImpl client) { + this.service + = RestProxy.create(LoadBalancersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciVmMgmtClientLoadBalancers to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciVmMgmtClientLoadBalancers") + public interface LoadBalancersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/loadBalancers/{loadBalancerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("loadBalancerName") String loadBalancerName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/loadBalancers/{loadBalancerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("loadBalancerName") String loadBalancerName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/loadBalancers/{loadBalancerName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("loadBalancerName") String loadBalancerName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") LoadBalancerInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/loadBalancers/{loadBalancerName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("loadBalancerName") String loadBalancerName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") LoadBalancerInner resource, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/loadBalancers/{loadBalancerName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateTags(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("loadBalancerName") String loadBalancerName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") LoadBalancerTagsUpdate properties, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/loadBalancers/{loadBalancerName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateTagsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("loadBalancerName") String loadBalancerName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") LoadBalancerTagsUpdate properties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/loadBalancers/{loadBalancerName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("loadBalancerName") String loadBalancerName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/loadBalancers/{loadBalancerName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("loadBalancerName") String loadBalancerName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/loadBalancers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/loadBalancers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/loadBalancers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/loadBalancers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAllNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listAllNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * The operation to get a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String loadBalancerName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, loadBalancerName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to get a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String loadBalancerName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, loadBalancerName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * The operation to get a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String loadBalancerName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, loadBalancerName, accept, context); + } + + /** + * The operation to get a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LoadBalancerInner getByResourceGroup(String resourceGroupName, String loadBalancerName) { + return getByResourceGroupWithResponse(resourceGroupName, loadBalancerName, Context.NONE).getValue(); + } + + /** + * The operation to create or update a loadBalancer. Please note some properties can be set only during LoadBalancer + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String loadBalancerName, LoadBalancerInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, loadBalancerName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to create or update a loadBalancer. Please note some properties can be set only during LoadBalancer + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String loadBalancerName, + LoadBalancerInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, loadBalancerName, contentType, accept, resource, + Context.NONE); + } + + /** + * The operation to create or update a loadBalancer. Please note some properties can be set only during LoadBalancer + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String loadBalancerName, + LoadBalancerInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, loadBalancerName, contentType, accept, resource, + context); + } + + /** + * The operation to create or update a loadBalancer. Please note some properties can be set only during LoadBalancer + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LoadBalancerInner> + beginCreateOrUpdateAsync(String resourceGroupName, String loadBalancerName, LoadBalancerInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, loadBalancerName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + LoadBalancerInner.class, LoadBalancerInner.class, this.client.getContext()); + } + + /** + * The operation to create or update a loadBalancer. Please note some properties can be set only during LoadBalancer + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LoadBalancerInner> beginCreateOrUpdate(String resourceGroupName, + String loadBalancerName, LoadBalancerInner resource) { + Response response = createOrUpdateWithResponse(resourceGroupName, loadBalancerName, resource); + return this.client.getLroResult(response, LoadBalancerInner.class, + LoadBalancerInner.class, Context.NONE); + } + + /** + * The operation to create or update a loadBalancer. Please note some properties can be set only during LoadBalancer + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LoadBalancerInner> beginCreateOrUpdate(String resourceGroupName, + String loadBalancerName, LoadBalancerInner resource, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, loadBalancerName, resource, context); + return this.client.getLroResult(response, LoadBalancerInner.class, + LoadBalancerInner.class, context); + } + + /** + * The operation to create or update a loadBalancer. Please note some properties can be set only during LoadBalancer + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String loadBalancerName, + LoadBalancerInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, loadBalancerName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to create or update a loadBalancer. Please note some properties can be set only during LoadBalancer + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LoadBalancerInner createOrUpdate(String resourceGroupName, String loadBalancerName, + LoadBalancerInner resource) { + return beginCreateOrUpdate(resourceGroupName, loadBalancerName, resource).getFinalResult(); + } + + /** + * The operation to create or update a loadBalancer. Please note some properties can be set only during LoadBalancer + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LoadBalancerInner createOrUpdate(String resourceGroupName, String loadBalancerName, + LoadBalancerInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, loadBalancerName, resource, context).getFinalResult(); + } + + /** + * Updates a loadBalancer tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateTagsWithResponseAsync(String resourceGroupName, + String loadBalancerName, LoadBalancerTagsUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, loadBalancerName, contentType, accept, properties, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a loadBalancer tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateTagsWithResponse(String resourceGroupName, String loadBalancerName, + LoadBalancerTagsUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateTagsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, loadBalancerName, contentType, accept, properties, + Context.NONE); + } + + /** + * Updates a loadBalancer tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateTagsWithResponse(String resourceGroupName, String loadBalancerName, + LoadBalancerTagsUpdate properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateTagsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, loadBalancerName, contentType, accept, properties, + context); + } + + /** + * Updates a loadBalancer tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LoadBalancerInner> beginUpdateTagsAsync(String resourceGroupName, + String loadBalancerName, LoadBalancerTagsUpdate properties) { + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, loadBalancerName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + LoadBalancerInner.class, LoadBalancerInner.class, this.client.getContext()); + } + + /** + * Updates a loadBalancer tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LoadBalancerInner> beginUpdateTags(String resourceGroupName, + String loadBalancerName, LoadBalancerTagsUpdate properties) { + Response response = updateTagsWithResponse(resourceGroupName, loadBalancerName, properties); + return this.client.getLroResult(response, LoadBalancerInner.class, + LoadBalancerInner.class, Context.NONE); + } + + /** + * Updates a loadBalancer tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LoadBalancerInner> beginUpdateTags(String resourceGroupName, + String loadBalancerName, LoadBalancerTagsUpdate properties, Context context) { + Response response + = updateTagsWithResponse(resourceGroupName, loadBalancerName, properties, context); + return this.client.getLroResult(response, LoadBalancerInner.class, + LoadBalancerInner.class, context); + } + + /** + * Updates a loadBalancer tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String loadBalancerName, + LoadBalancerTagsUpdate properties) { + return beginUpdateTagsAsync(resourceGroupName, loadBalancerName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a loadBalancer tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LoadBalancerInner updateTags(String resourceGroupName, String loadBalancerName, + LoadBalancerTagsUpdate properties) { + return beginUpdateTags(resourceGroupName, loadBalancerName, properties).getFinalResult(); + } + + /** + * Updates a loadBalancer tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LoadBalancerInner updateTags(String resourceGroupName, String loadBalancerName, + LoadBalancerTagsUpdate properties, Context context) { + return beginUpdateTags(resourceGroupName, loadBalancerName, properties, context).getFinalResult(); + } + + /** + * The operation to delete a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String loadBalancerName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, loadBalancerName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to delete a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String loadBalancerName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, loadBalancerName, Context.NONE); + } + + /** + * The operation to delete a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String loadBalancerName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, loadBalancerName, context); + } + + /** + * The operation to delete a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String loadBalancerName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, loadBalancerName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * The operation to delete a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String loadBalancerName) { + Response response = deleteWithResponse(resourceGroupName, loadBalancerName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * The operation to delete a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String loadBalancerName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, loadBalancerName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * The operation to delete a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String loadBalancerName) { + return beginDeleteAsync(resourceGroupName, loadBalancerName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to delete a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String loadBalancerName) { + beginDelete(resourceGroupName, loadBalancerName).getFinalResult(); + } + + /** + * The operation to delete a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String loadBalancerName, Context context) { + beginDelete(resourceGroupName, loadBalancerName, context).getFinalResult(); + } + + /** + * Lists all of the loadBalancers in the specified resource group. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all of the loadBalancers in the specified resource group. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the loadBalancers in the specified resource group. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the loadBalancers in the specified resource group. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the loadBalancers in the specified resource group. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * Lists all of the loadBalancers in the specified resource group. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Lists all of the loadBalancers in the specified subscription. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all of the loadBalancers in the specified subscription. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listAllNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the loadBalancers in the specified subscription. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the loadBalancers in the specified subscription. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the loadBalancers in the specified subscription. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listAllNextSinglePage(nextLink)); + } + + /** + * Lists all of the loadBalancers in the specified subscription. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listAllNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/LoadBalancersImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/LoadBalancersImpl.java new file mode 100644 index 0000000000000..509c4ea61accf --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/LoadBalancersImpl.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.vm.fluent.LoadBalancersClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.LoadBalancerInner; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancer; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancers; + +public final class LoadBalancersImpl implements LoadBalancers { + private static final ClientLogger LOGGER = new ClientLogger(LoadBalancersImpl.class); + + private final LoadBalancersClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager; + + public LoadBalancersImpl(LoadBalancersClient innerClient, + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String loadBalancerName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, loadBalancerName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LoadBalancerImpl(inner.getValue(), this.manager())); + } + + public LoadBalancer getByResourceGroup(String resourceGroupName, String loadBalancerName) { + LoadBalancerInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, loadBalancerName); + if (inner != null) { + return new LoadBalancerImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String loadBalancerName) { + this.serviceClient().delete(resourceGroupName, loadBalancerName); + } + + public void delete(String resourceGroupName, String loadBalancerName, Context context) { + this.serviceClient().delete(resourceGroupName, loadBalancerName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LoadBalancerImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LoadBalancerImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LoadBalancerImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LoadBalancerImpl(inner1, this.manager())); + } + + public LoadBalancer getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String loadBalancerName = ResourceManagerUtils.getValueFromIdByName(id, "loadBalancers"); + if (loadBalancerName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'loadBalancers'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, loadBalancerName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String loadBalancerName = ResourceManagerUtils.getValueFromIdByName(id, "loadBalancers"); + if (loadBalancerName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'loadBalancers'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, loadBalancerName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String loadBalancerName = ResourceManagerUtils.getValueFromIdByName(id, "loadBalancers"); + if (loadBalancerName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'loadBalancers'.", id))); + } + this.delete(resourceGroupName, loadBalancerName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String loadBalancerName = ResourceManagerUtils.getValueFromIdByName(id, "loadBalancers"); + if (loadBalancerName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'loadBalancers'.", id))); + } + this.delete(resourceGroupName, loadBalancerName, context); + } + + private LoadBalancersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager() { + return this.serviceManager; + } + + public LoadBalancerImpl define(String name) { + return new LoadBalancerImpl(name, this.manager()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NatGatewayImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NatGatewayImpl.java new file mode 100644 index 0000000000000..6af28825daae0 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NatGatewayImpl.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.NatGatewayInner; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.NatGateway; +import com.azure.resourcemanager.azurestackhci.vm.models.NatGatewayProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.NatGatewayTagsUpdate; +import java.util.Collections; +import java.util.Map; + +public final class NatGatewayImpl implements NatGateway, NatGateway.Definition, NatGateway.Update { + private NatGatewayInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public NatGatewayProperties properties() { + return this.innerModel().properties(); + } + + public ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public NatGatewayInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String natGatewayName; + + private NatGatewayTagsUpdate updateProperties; + + public NatGatewayImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public NatGateway create() { + this.innerObject = serviceManager.serviceClient() + .getNatGateways() + .createOrUpdate(resourceGroupName, natGatewayName, this.innerModel(), Context.NONE); + return this; + } + + public NatGateway create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getNatGateways() + .createOrUpdate(resourceGroupName, natGatewayName, this.innerModel(), context); + return this; + } + + NatGatewayImpl(String name, com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerObject = new NatGatewayInner(); + this.serviceManager = serviceManager; + this.natGatewayName = name; + } + + public NatGatewayImpl update() { + this.updateProperties = new NatGatewayTagsUpdate(); + return this; + } + + public NatGateway apply() { + this.innerObject = serviceManager.serviceClient() + .getNatGateways() + .updateTags(resourceGroupName, natGatewayName, updateProperties, Context.NONE); + return this; + } + + public NatGateway apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getNatGateways() + .updateTags(resourceGroupName, natGatewayName, updateProperties, context); + return this; + } + + NatGatewayImpl(NatGatewayInner innerObject, + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.natGatewayName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "natGateways"); + } + + public NatGateway refresh() { + this.innerObject = serviceManager.serviceClient() + .getNatGateways() + .getByResourceGroupWithResponse(resourceGroupName, natGatewayName, Context.NONE) + .getValue(); + return this; + } + + public NatGateway refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getNatGateways() + .getByResourceGroupWithResponse(resourceGroupName, natGatewayName, context) + .getValue(); + return this; + } + + public NatGatewayImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public NatGatewayImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public NatGatewayImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public NatGatewayImpl withProperties(NatGatewayProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public NatGatewayImpl withExtendedLocation(ExtendedLocation extendedLocation) { + this.innerModel().withExtendedLocation(extendedLocation); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NatGatewaysClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NatGatewaysClientImpl.java new file mode 100644 index 0000000000000..e850c21f9ce70 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NatGatewaysClientImpl.java @@ -0,0 +1,1119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.vm.fluent.NatGatewaysClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.NatGatewayInner; +import com.azure.resourcemanager.azurestackhci.vm.implementation.models.NatGatewayListResult; +import com.azure.resourcemanager.azurestackhci.vm.models.NatGatewayTagsUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in NatGatewaysClient. + */ +public final class NatGatewaysClientImpl implements NatGatewaysClient { + /** + * The proxy service used to perform REST calls. + */ + private final NatGatewaysService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciVmMgmtClientImpl client; + + /** + * Initializes an instance of NatGatewaysClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NatGatewaysClientImpl(AzureStackHciVmMgmtClientImpl client) { + this.service + = RestProxy.create(NatGatewaysService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciVmMgmtClientNatGateways to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciVmMgmtClientNatGateways") + public interface NatGatewaysService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways/{natGatewayName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("natGatewayName") String natGatewayName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways/{natGatewayName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("natGatewayName") String natGatewayName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways/{natGatewayName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("natGatewayName") String natGatewayName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NatGatewayInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways/{natGatewayName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("natGatewayName") String natGatewayName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NatGatewayInner resource, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways/{natGatewayName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateTags(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("natGatewayName") String natGatewayName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NatGatewayTagsUpdate properties, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways/{natGatewayName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateTagsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("natGatewayName") String natGatewayName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NatGatewayTagsUpdate properties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways/{natGatewayName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("natGatewayName") String natGatewayName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways/{natGatewayName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("natGatewayName") String natGatewayName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/natGateways") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/natGateways") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/natGateways") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAllNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listAllNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * The operation to get a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String natGatewayName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to get a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String natGatewayName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, natGatewayName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * The operation to get a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String natGatewayName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, accept, context); + } + + /** + * The operation to get a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NatGatewayInner getByResourceGroup(String resourceGroupName, String natGatewayName) { + return getByResourceGroupWithResponse(resourceGroupName, natGatewayName, Context.NONE).getValue(); + } + + /** + * The operation to create or update a natGateway. Please note some properties can be set only during NatGateway + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String natGatewayName, NatGatewayInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to create or update a natGateway. Please note some properties can be set only during NatGateway + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String natGatewayName, + NatGatewayInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, contentType, accept, resource, + Context.NONE); + } + + /** + * The operation to create or update a natGateway. Please note some properties can be set only during NatGateway + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String natGatewayName, + NatGatewayInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, contentType, accept, resource, context); + } + + /** + * The operation to create or update a natGateway. Please note some properties can be set only during NatGateway + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NatGatewayInner> beginCreateOrUpdateAsync(String resourceGroupName, + String natGatewayName, NatGatewayInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, natGatewayName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NatGatewayInner.class, NatGatewayInner.class, this.client.getContext()); + } + + /** + * The operation to create or update a natGateway. Please note some properties can be set only during NatGateway + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NatGatewayInner> beginCreateOrUpdate(String resourceGroupName, + String natGatewayName, NatGatewayInner resource) { + Response response = createOrUpdateWithResponse(resourceGroupName, natGatewayName, resource); + return this.client.getLroResult(response, NatGatewayInner.class, + NatGatewayInner.class, Context.NONE); + } + + /** + * The operation to create or update a natGateway. Please note some properties can be set only during NatGateway + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NatGatewayInner> beginCreateOrUpdate(String resourceGroupName, + String natGatewayName, NatGatewayInner resource, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, natGatewayName, resource, context); + return this.client.getLroResult(response, NatGatewayInner.class, + NatGatewayInner.class, context); + } + + /** + * The operation to create or update a natGateway. Please note some properties can be set only during NatGateway + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String natGatewayName, + NatGatewayInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, natGatewayName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to create or update a natGateway. Please note some properties can be set only during NatGateway + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NatGatewayInner createOrUpdate(String resourceGroupName, String natGatewayName, NatGatewayInner resource) { + return beginCreateOrUpdate(resourceGroupName, natGatewayName, resource).getFinalResult(); + } + + /** + * The operation to create or update a natGateway. Please note some properties can be set only during NatGateway + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NatGatewayInner createOrUpdate(String resourceGroupName, String natGatewayName, NatGatewayInner resource, + Context context) { + return beginCreateOrUpdate(resourceGroupName, natGatewayName, resource, context).getFinalResult(); + } + + /** + * Updates a natGateway tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateTagsWithResponseAsync(String resourceGroupName, + String natGatewayName, NatGatewayTagsUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, contentType, accept, properties, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a natGateway tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateTagsWithResponse(String resourceGroupName, String natGatewayName, + NatGatewayTagsUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateTagsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, contentType, accept, properties, + Context.NONE); + } + + /** + * Updates a natGateway tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateTagsWithResponse(String resourceGroupName, String natGatewayName, + NatGatewayTagsUpdate properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateTagsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, contentType, accept, properties, + context); + } + + /** + * Updates a natGateway tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NatGatewayInner> beginUpdateTagsAsync(String resourceGroupName, + String natGatewayName, NatGatewayTagsUpdate properties) { + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, natGatewayName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NatGatewayInner.class, NatGatewayInner.class, this.client.getContext()); + } + + /** + * Updates a natGateway tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NatGatewayInner> beginUpdateTags(String resourceGroupName, + String natGatewayName, NatGatewayTagsUpdate properties) { + Response response = updateTagsWithResponse(resourceGroupName, natGatewayName, properties); + return this.client.getLroResult(response, NatGatewayInner.class, + NatGatewayInner.class, Context.NONE); + } + + /** + * Updates a natGateway tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NatGatewayInner> beginUpdateTags(String resourceGroupName, + String natGatewayName, NatGatewayTagsUpdate properties, Context context) { + Response response = updateTagsWithResponse(resourceGroupName, natGatewayName, properties, context); + return this.client.getLroResult(response, NatGatewayInner.class, + NatGatewayInner.class, context); + } + + /** + * Updates a natGateway tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String natGatewayName, + NatGatewayTagsUpdate properties) { + return beginUpdateTagsAsync(resourceGroupName, natGatewayName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a natGateway tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NatGatewayInner updateTags(String resourceGroupName, String natGatewayName, + NatGatewayTagsUpdate properties) { + return beginUpdateTags(resourceGroupName, natGatewayName, properties).getFinalResult(); + } + + /** + * Updates a natGateway tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NatGatewayInner updateTags(String resourceGroupName, String natGatewayName, NatGatewayTagsUpdate properties, + Context context) { + return beginUpdateTags(resourceGroupName, natGatewayName, properties, context).getFinalResult(); + } + + /** + * The operation to delete a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String natGatewayName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to delete a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String natGatewayName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, Context.NONE); + } + + /** + * The operation to delete a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String natGatewayName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, natGatewayName, context); + } + + /** + * The operation to delete a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String natGatewayName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, natGatewayName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * The operation to delete a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String natGatewayName) { + Response response = deleteWithResponse(resourceGroupName, natGatewayName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * The operation to delete a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String natGatewayName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, natGatewayName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * The operation to delete a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String natGatewayName) { + return beginDeleteAsync(resourceGroupName, natGatewayName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to delete a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String natGatewayName) { + beginDelete(resourceGroupName, natGatewayName).getFinalResult(); + } + + /** + * The operation to delete a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String natGatewayName, Context context) { + beginDelete(resourceGroupName, natGatewayName, context).getFinalResult(); + } + + /** + * Lists all of the natGateways in the specified resource group. Use the nextLink property in the response to get + * the next page of NatGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all of the natGateways in the specified resource group. Use the nextLink property in the response to get + * the next page of NatGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the natGateways in the specified resource group. Use the nextLink property in the response to get + * the next page of NatGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the natGateways in the specified resource group. Use the nextLink property in the response to get + * the next page of NatGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the natGateways in the specified resource group. Use the nextLink property in the response to get + * the next page of NatGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * Lists all of the natGateways in the specified resource group. Use the nextLink property in the response to get + * the next page of NatGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Lists all of the natGateways in the specified subscription. Use the nextLink property in the response to get the + * next page of NatGateway. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all of the natGateways in the specified subscription. Use the nextLink property in the response to get the + * next page of NatGateway. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listAllNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the natGateways in the specified subscription. Use the nextLink property in the response to get the + * next page of NatGateway. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the natGateways in the specified subscription. Use the nextLink property in the response to get the + * next page of NatGateway. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the natGateways in the specified subscription. Use the nextLink property in the response to get the + * next page of NatGateway. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listAllNextSinglePage(nextLink)); + } + + /** + * Lists all of the natGateways in the specified subscription. Use the nextLink property in the response to get the + * next page of NatGateway. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listAllNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NatGatewaysImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NatGatewaysImpl.java new file mode 100644 index 0000000000000..647be470512db --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NatGatewaysImpl.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.vm.fluent.NatGatewaysClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.NatGatewayInner; +import com.azure.resourcemanager.azurestackhci.vm.models.NatGateway; +import com.azure.resourcemanager.azurestackhci.vm.models.NatGateways; + +public final class NatGatewaysImpl implements NatGateways { + private static final ClientLogger LOGGER = new ClientLogger(NatGatewaysImpl.class); + + private final NatGatewaysClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager; + + public NatGatewaysImpl(NatGatewaysClient innerClient, + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String natGatewayName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, natGatewayName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NatGatewayImpl(inner.getValue(), this.manager())); + } + + public NatGateway getByResourceGroup(String resourceGroupName, String natGatewayName) { + NatGatewayInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, natGatewayName); + if (inner != null) { + return new NatGatewayImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String natGatewayName) { + this.serviceClient().delete(resourceGroupName, natGatewayName); + } + + public void delete(String resourceGroupName, String natGatewayName, Context context) { + this.serviceClient().delete(resourceGroupName, natGatewayName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NatGatewayImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NatGatewayImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NatGatewayImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NatGatewayImpl(inner1, this.manager())); + } + + public NatGateway getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String natGatewayName = ResourceManagerUtils.getValueFromIdByName(id, "natGateways"); + if (natGatewayName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'natGateways'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, natGatewayName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String natGatewayName = ResourceManagerUtils.getValueFromIdByName(id, "natGateways"); + if (natGatewayName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'natGateways'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, natGatewayName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String natGatewayName = ResourceManagerUtils.getValueFromIdByName(id, "natGateways"); + if (natGatewayName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'natGateways'.", id))); + } + this.delete(resourceGroupName, natGatewayName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String natGatewayName = ResourceManagerUtils.getValueFromIdByName(id, "natGateways"); + if (natGatewayName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'natGateways'.", id))); + } + this.delete(resourceGroupName, natGatewayName, context); + } + + private NatGatewaysClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager() { + return this.serviceManager; + } + + public NatGatewayImpl define(String name) { + return new NatGatewayImpl(name, this.manager()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/OperationImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/OperationImpl.java new file mode 100644 index 0000000000000..8d8c52bdd7f52 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/OperationImpl.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.OperationInner; +import com.azure.resourcemanager.azurestackhci.vm.models.ActionType; +import com.azure.resourcemanager.azurestackhci.vm.models.Operation; +import com.azure.resourcemanager.azurestackhci.vm.models.OperationDisplay; +import com.azure.resourcemanager.azurestackhci.vm.models.Origin; + +public final class OperationImpl implements Operation { + private OperationInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager; + + OperationImpl(OperationInner innerObject, + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public Boolean isDataAction() { + return this.innerModel().isDataAction(); + } + + public OperationDisplay display() { + return this.innerModel().display(); + } + + public Origin origin() { + return this.innerModel().origin(); + } + + public ActionType actionType() { + return this.innerModel().actionType(); + } + + public OperationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/OperationStatusResultImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/OperationStatusResultImpl.java new file mode 100644 index 0000000000000..0ba72ac1d6707 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/OperationStatusResultImpl.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.azurestackhci.vm.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class OperationStatusResultImpl implements OperationStatusResult { + private OperationStatusResultInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager; + + OperationStatusResultImpl(OperationStatusResultInner innerObject, + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public OperationStatusResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/OperationsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/OperationsClientImpl.java new file mode 100644 index 0000000000000..38a60ad61202d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/OperationsClientImpl.java @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.azurestackhci.vm.fluent.OperationsClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.OperationInner; +import com.azure.resourcemanager.azurestackhci.vm.implementation.models.OperationListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ +public final class OperationsClientImpl implements OperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final OperationsService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciVmMgmtClientImpl client; + + /** + * Initializes an instance of OperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationsClientImpl(AzureStackHciVmMgmtClientImpl client) { + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciVmMgmtClientOperations to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciVmMgmtClientOperations") + public interface OperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.AzureStackHCI/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.AzureStackHCI/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List the operations for the provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the operations for the provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the operations for the provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List the operations for the provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/OperationsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/OperationsImpl.java new file mode 100644 index 0000000000000..689beef37b93b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/OperationsImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.vm.fluent.OperationsClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.OperationInner; +import com.azure.resourcemanager.azurestackhci.vm.models.Operation; +import com.azure.resourcemanager.azurestackhci.vm.models.Operations; + +public final class OperationsImpl implements Operations { + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); + + private final OperationsClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager; + + public OperationsImpl(OperationsClient innerClient, + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + } + + private OperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/PublicIPAddressImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/PublicIPAddressImpl.java new file mode 100644 index 0000000000000..2feee98aee3dc --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/PublicIPAddressImpl.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.PublicIPAddressInner; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddress; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressTagsUpdate; +import java.util.Collections; +import java.util.Map; + +public final class PublicIPAddressImpl implements PublicIPAddress, PublicIPAddress.Definition, PublicIPAddress.Update { + private PublicIPAddressInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public PublicIPAddressProperties properties() { + return this.innerModel().properties(); + } + + public ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public PublicIPAddressInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String publicIPAddressName; + + private PublicIPAddressTagsUpdate updateProperties; + + public PublicIPAddressImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public PublicIPAddress create() { + this.innerObject = serviceManager.serviceClient() + .getPublicIPAddresses() + .createOrUpdate(resourceGroupName, publicIPAddressName, this.innerModel(), Context.NONE); + return this; + } + + public PublicIPAddress create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPublicIPAddresses() + .createOrUpdate(resourceGroupName, publicIPAddressName, this.innerModel(), context); + return this; + } + + PublicIPAddressImpl(String name, com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerObject = new PublicIPAddressInner(); + this.serviceManager = serviceManager; + this.publicIPAddressName = name; + } + + public PublicIPAddressImpl update() { + this.updateProperties = new PublicIPAddressTagsUpdate(); + return this; + } + + public PublicIPAddress apply() { + this.innerObject = serviceManager.serviceClient() + .getPublicIPAddresses() + .updateTags(resourceGroupName, publicIPAddressName, updateProperties, Context.NONE); + return this; + } + + public PublicIPAddress apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPublicIPAddresses() + .updateTags(resourceGroupName, publicIPAddressName, updateProperties, context); + return this; + } + + PublicIPAddressImpl(PublicIPAddressInner innerObject, + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.publicIPAddressName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "publicIPAddresses"); + } + + public PublicIPAddress refresh() { + this.innerObject = serviceManager.serviceClient() + .getPublicIPAddresses() + .getByResourceGroupWithResponse(resourceGroupName, publicIPAddressName, Context.NONE) + .getValue(); + return this; + } + + public PublicIPAddress refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPublicIPAddresses() + .getByResourceGroupWithResponse(resourceGroupName, publicIPAddressName, context) + .getValue(); + return this; + } + + public PublicIPAddressImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public PublicIPAddressImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public PublicIPAddressImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public PublicIPAddressImpl withProperties(PublicIPAddressProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public PublicIPAddressImpl withExtendedLocation(ExtendedLocation extendedLocation) { + this.innerModel().withExtendedLocation(extendedLocation); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/PublicIPAddressesClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/PublicIPAddressesClientImpl.java new file mode 100644 index 0000000000000..8c26127aa724f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/PublicIPAddressesClientImpl.java @@ -0,0 +1,1129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.vm.fluent.PublicIPAddressesClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.PublicIPAddressInner; +import com.azure.resourcemanager.azurestackhci.vm.implementation.models.PublicIPAddressListResult; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressTagsUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PublicIPAddressesClient. + */ +public final class PublicIPAddressesClientImpl implements PublicIPAddressesClient { + /** + * The proxy service used to perform REST calls. + */ + private final PublicIPAddressesService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciVmMgmtClientImpl client; + + /** + * Initializes an instance of PublicIPAddressesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PublicIPAddressesClientImpl(AzureStackHciVmMgmtClientImpl client) { + this.service + = RestProxy.create(PublicIPAddressesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciVmMgmtClientPublicIPAddresses to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciVmMgmtClientPublicIPAddresses") + public interface PublicIPAddressesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/publicIPAddresses/{publicIPAddressName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("publicIPAddressName") String publicIPAddressName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/publicIPAddresses/{publicIPAddressName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("publicIPAddressName") String publicIPAddressName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/publicIPAddresses/{publicIPAddressName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("publicIPAddressName") String publicIPAddressName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PublicIPAddressInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/publicIPAddresses/{publicIPAddressName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("publicIPAddressName") String publicIPAddressName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PublicIPAddressInner resource, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/publicIPAddresses/{publicIPAddressName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateTags(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("publicIPAddressName") String publicIPAddressName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PublicIPAddressTagsUpdate properties, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/publicIPAddresses/{publicIPAddressName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateTagsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("publicIPAddressName") String publicIPAddressName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PublicIPAddressTagsUpdate properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/publicIPAddresses/{publicIPAddressName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("publicIPAddressName") String publicIPAddressName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/publicIPAddresses/{publicIPAddressName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("publicIPAddressName") String publicIPAddressName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/publicIPAddresses") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/publicIPAddresses") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/publicIPAddresses") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/publicIPAddresses") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAllNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listAllNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * The operation to get a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String publicIPAddressName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, publicIPAddressName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to get a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String publicIPAddressName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, publicIPAddressName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * The operation to get a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String publicIPAddressName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, publicIPAddressName, accept, context); + } + + /** + * The operation to get a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PublicIPAddressInner getByResourceGroup(String resourceGroupName, String publicIPAddressName) { + return getByResourceGroupWithResponse(resourceGroupName, publicIPAddressName, Context.NONE).getValue(); + } + + /** + * The operation to create or update a publicIPAddress. Please note some properties can be set only during PublicIP + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String publicIPAddressName, PublicIPAddressInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, publicIPAddressName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to create or update a publicIPAddress. Please note some properties can be set only during PublicIP + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String publicIPAddressName, + PublicIPAddressInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, publicIPAddressName, contentType, accept, resource, + Context.NONE); + } + + /** + * The operation to create or update a publicIPAddress. Please note some properties can be set only during PublicIP + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String publicIPAddressName, + PublicIPAddressInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, publicIPAddressName, contentType, accept, resource, + context); + } + + /** + * The operation to create or update a publicIPAddress. Please note some properties can be set only during PublicIP + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PublicIPAddressInner> + beginCreateOrUpdateAsync(String resourceGroupName, String publicIPAddressName, PublicIPAddressInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, publicIPAddressName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PublicIPAddressInner.class, PublicIPAddressInner.class, this.client.getContext()); + } + + /** + * The operation to create or update a publicIPAddress. Please note some properties can be set only during PublicIP + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PublicIPAddressInner> + beginCreateOrUpdate(String resourceGroupName, String publicIPAddressName, PublicIPAddressInner resource) { + Response response = createOrUpdateWithResponse(resourceGroupName, publicIPAddressName, resource); + return this.client.getLroResult(response, + PublicIPAddressInner.class, PublicIPAddressInner.class, Context.NONE); + } + + /** + * The operation to create or update a publicIPAddress. Please note some properties can be set only during PublicIP + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PublicIPAddressInner> beginCreateOrUpdate( + String resourceGroupName, String publicIPAddressName, PublicIPAddressInner resource, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, publicIPAddressName, resource, context); + return this.client.getLroResult(response, + PublicIPAddressInner.class, PublicIPAddressInner.class, context); + } + + /** + * The operation to create or update a publicIPAddress. Please note some properties can be set only during PublicIP + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String publicIPAddressName, + PublicIPAddressInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, publicIPAddressName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to create or update a publicIPAddress. Please note some properties can be set only during PublicIP + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PublicIPAddressInner createOrUpdate(String resourceGroupName, String publicIPAddressName, + PublicIPAddressInner resource) { + return beginCreateOrUpdate(resourceGroupName, publicIPAddressName, resource).getFinalResult(); + } + + /** + * The operation to create or update a publicIPAddress. Please note some properties can be set only during PublicIP + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PublicIPAddressInner createOrUpdate(String resourceGroupName, String publicIPAddressName, + PublicIPAddressInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, publicIPAddressName, resource, context).getFinalResult(); + } + + /** + * Updates a publicIPAddress tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateTagsWithResponseAsync(String resourceGroupName, + String publicIPAddressName, PublicIPAddressTagsUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, publicIPAddressName, contentType, accept, + properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a publicIPAddress tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateTagsWithResponse(String resourceGroupName, String publicIPAddressName, + PublicIPAddressTagsUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateTagsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, publicIPAddressName, contentType, accept, properties, + Context.NONE); + } + + /** + * Updates a publicIPAddress tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateTagsWithResponse(String resourceGroupName, String publicIPAddressName, + PublicIPAddressTagsUpdate properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateTagsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, publicIPAddressName, contentType, accept, properties, + context); + } + + /** + * Updates a publicIPAddress tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PublicIPAddressInner> beginUpdateTagsAsync( + String resourceGroupName, String publicIPAddressName, PublicIPAddressTagsUpdate properties) { + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, publicIPAddressName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PublicIPAddressInner.class, PublicIPAddressInner.class, this.client.getContext()); + } + + /** + * Updates a publicIPAddress tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PublicIPAddressInner> beginUpdateTags(String resourceGroupName, + String publicIPAddressName, PublicIPAddressTagsUpdate properties) { + Response response = updateTagsWithResponse(resourceGroupName, publicIPAddressName, properties); + return this.client.getLroResult(response, + PublicIPAddressInner.class, PublicIPAddressInner.class, Context.NONE); + } + + /** + * Updates a publicIPAddress tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PublicIPAddressInner> beginUpdateTags(String resourceGroupName, + String publicIPAddressName, PublicIPAddressTagsUpdate properties, Context context) { + Response response + = updateTagsWithResponse(resourceGroupName, publicIPAddressName, properties, context); + return this.client.getLroResult(response, + PublicIPAddressInner.class, PublicIPAddressInner.class, context); + } + + /** + * Updates a publicIPAddress tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String publicIPAddressName, + PublicIPAddressTagsUpdate properties) { + return beginUpdateTagsAsync(resourceGroupName, publicIPAddressName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a publicIPAddress tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PublicIPAddressInner updateTags(String resourceGroupName, String publicIPAddressName, + PublicIPAddressTagsUpdate properties) { + return beginUpdateTags(resourceGroupName, publicIPAddressName, properties).getFinalResult(); + } + + /** + * Updates a publicIPAddress tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PublicIPAddressInner updateTags(String resourceGroupName, String publicIPAddressName, + PublicIPAddressTagsUpdate properties, Context context) { + return beginUpdateTags(resourceGroupName, publicIPAddressName, properties, context).getFinalResult(); + } + + /** + * The operation to delete a publicIPAddresses. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String publicIPAddressName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, publicIPAddressName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to delete a publicIPAddresses. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String publicIPAddressName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, publicIPAddressName, Context.NONE); + } + + /** + * The operation to delete a publicIPAddresses. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String publicIPAddressName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, publicIPAddressName, context); + } + + /** + * The operation to delete a publicIPAddresses. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String publicIPAddressName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, publicIPAddressName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * The operation to delete a publicIPAddresses. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String publicIPAddressName) { + Response response = deleteWithResponse(resourceGroupName, publicIPAddressName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * The operation to delete a publicIPAddresses. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String publicIPAddressName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, publicIPAddressName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * The operation to delete a publicIPAddresses. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String publicIPAddressName) { + return beginDeleteAsync(resourceGroupName, publicIPAddressName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to delete a publicIPAddresses. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String publicIPAddressName) { + beginDelete(resourceGroupName, publicIPAddressName).getFinalResult(); + } + + /** + * The operation to delete a publicIPAddresses. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String publicIPAddressName, Context context) { + beginDelete(resourceGroupName, publicIPAddressName, context).getFinalResult(); + } + + /** + * Lists all of the publicIPAddresses in the specified resource group. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all of the publicIPAddresses in the specified resource group. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the publicIPAddresses in the specified resource group. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the publicIPAddresses in the specified resource group. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the publicIPAddresses in the specified resource group. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * Lists all of the publicIPAddresses in the specified resource group. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Lists all of the publicIPAddresses in the specified subscription. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all of the publicIPAddresses in the specified subscription. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listAllNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the publicIPAddresses in the specified subscription. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the publicIPAddresses in the specified subscription. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the publicIPAddresses in the specified subscription. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listAllNextSinglePage(nextLink)); + } + + /** + * Lists all of the publicIPAddresses in the specified subscription. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listAllNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/PublicIPAddressesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/PublicIPAddressesImpl.java new file mode 100644 index 0000000000000..d519d0fd6b71e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/PublicIPAddressesImpl.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.vm.fluent.PublicIPAddressesClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.PublicIPAddressInner; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddress; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddresses; + +public final class PublicIPAddressesImpl implements PublicIPAddresses { + private static final ClientLogger LOGGER = new ClientLogger(PublicIPAddressesImpl.class); + + private final PublicIPAddressesClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager; + + public PublicIPAddressesImpl(PublicIPAddressesClient innerClient, + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, + String publicIPAddressName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, publicIPAddressName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PublicIPAddressImpl(inner.getValue(), this.manager())); + } + + public PublicIPAddress getByResourceGroup(String resourceGroupName, String publicIPAddressName) { + PublicIPAddressInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, publicIPAddressName); + if (inner != null) { + return new PublicIPAddressImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String publicIPAddressName) { + this.serviceClient().delete(resourceGroupName, publicIPAddressName); + } + + public void delete(String resourceGroupName, String publicIPAddressName, Context context) { + this.serviceClient().delete(resourceGroupName, publicIPAddressName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PublicIPAddressImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PublicIPAddressImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PublicIPAddressImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PublicIPAddressImpl(inner1, this.manager())); + } + + public PublicIPAddress getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String publicIPAddressName = ResourceManagerUtils.getValueFromIdByName(id, "publicIPAddresses"); + if (publicIPAddressName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPAddresses'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, publicIPAddressName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String publicIPAddressName = ResourceManagerUtils.getValueFromIdByName(id, "publicIPAddresses"); + if (publicIPAddressName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPAddresses'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, publicIPAddressName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String publicIPAddressName = ResourceManagerUtils.getValueFromIdByName(id, "publicIPAddresses"); + if (publicIPAddressName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPAddresses'.", id))); + } + this.delete(resourceGroupName, publicIPAddressName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String publicIPAddressName = ResourceManagerUtils.getValueFromIdByName(id, "publicIPAddresses"); + if (publicIPAddressName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPAddresses'.", id))); + } + this.delete(resourceGroupName, publicIPAddressName, context); + } + + private PublicIPAddressesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager() { + return this.serviceManager; + } + + public PublicIPAddressImpl define(String name) { + return new PublicIPAddressImpl(name, this.manager()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/SnapshotImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/SnapshotImpl.java new file mode 100644 index 0000000000000..7dde9553b42a7 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/SnapshotImpl.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.SnapshotInner; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.Snapshot; +import com.azure.resourcemanager.azurestackhci.vm.models.SnapshotProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.SnapshotTagsUpdate; +import java.util.Collections; +import java.util.Map; + +public final class SnapshotImpl implements Snapshot, Snapshot.Definition, Snapshot.Update { + private SnapshotInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SnapshotProperties properties() { + return this.innerModel().properties(); + } + + public ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public SnapshotInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String snapshotName; + + private SnapshotTagsUpdate updateProperties; + + public SnapshotImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public Snapshot create() { + this.innerObject = serviceManager.serviceClient() + .getSnapshots() + .createOrUpdate(resourceGroupName, snapshotName, this.innerModel(), Context.NONE); + return this; + } + + public Snapshot create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSnapshots() + .createOrUpdate(resourceGroupName, snapshotName, this.innerModel(), context); + return this; + } + + SnapshotImpl(String name, com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerObject = new SnapshotInner(); + this.serviceManager = serviceManager; + this.snapshotName = name; + } + + public SnapshotImpl update() { + this.updateProperties = new SnapshotTagsUpdate(); + return this; + } + + public Snapshot apply() { + this.innerObject = serviceManager.serviceClient() + .getSnapshots() + .update(resourceGroupName, snapshotName, updateProperties, Context.NONE); + return this; + } + + public Snapshot apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSnapshots() + .update(resourceGroupName, snapshotName, updateProperties, context); + return this; + } + + SnapshotImpl(SnapshotInner innerObject, + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.snapshotName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "snapshots"); + } + + public Snapshot refresh() { + this.innerObject = serviceManager.serviceClient() + .getSnapshots() + .getByResourceGroupWithResponse(resourceGroupName, snapshotName, Context.NONE) + .getValue(); + return this; + } + + public Snapshot refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSnapshots() + .getByResourceGroupWithResponse(resourceGroupName, snapshotName, context) + .getValue(); + return this; + } + + public SnapshotImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public SnapshotImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public SnapshotImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public SnapshotImpl withProperties(SnapshotProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public SnapshotImpl withExtendedLocation(ExtendedLocation extendedLocation) { + this.innerModel().withExtendedLocation(extendedLocation); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/SnapshotsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/SnapshotsClientImpl.java new file mode 100644 index 0000000000000..0eb07657e4d2b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/SnapshotsClientImpl.java @@ -0,0 +1,1108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.vm.fluent.SnapshotsClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.SnapshotInner; +import com.azure.resourcemanager.azurestackhci.vm.implementation.models.SnapshotListResult; +import com.azure.resourcemanager.azurestackhci.vm.models.SnapshotTagsUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SnapshotsClient. + */ +public final class SnapshotsClientImpl implements SnapshotsClient { + /** + * The proxy service used to perform REST calls. + */ + private final SnapshotsService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciVmMgmtClientImpl client; + + /** + * Initializes an instance of SnapshotsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SnapshotsClientImpl(AzureStackHciVmMgmtClientImpl client) { + this.service + = RestProxy.create(SnapshotsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciVmMgmtClientSnapshots to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciVmMgmtClientSnapshots") + public interface SnapshotsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/snapshots/{snapshotName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("snapshotName") String snapshotName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/snapshots/{snapshotName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("snapshotName") String snapshotName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/snapshots/{snapshotName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("snapshotName") String snapshotName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SnapshotInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/snapshots/{snapshotName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("snapshotName") String snapshotName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SnapshotInner resource, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/snapshots/{snapshotName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("snapshotName") String snapshotName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SnapshotTagsUpdate properties, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/snapshots/{snapshotName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("snapshotName") String snapshotName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SnapshotTagsUpdate properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/snapshots/{snapshotName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("snapshotName") String snapshotName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/snapshots/{snapshotName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("snapshotName") String snapshotName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/snapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/snapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/snapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/snapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAllNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listAllNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String snapshotName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, snapshotName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String snapshotName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, snapshotName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String snapshotName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, snapshotName, accept, context); + } + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SnapshotInner getByResourceGroup(String resourceGroupName, String snapshotName) { + return getByResourceGroupWithResponse(resourceGroupName, snapshotName, Context.NONE).getValue(); + } + + /** + * The operation to create or update a snapshot. Please note some properties can be set only during snapshot + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the snapshot resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String snapshotName, SnapshotInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, snapshotName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to create or update a snapshot. Please note some properties can be set only during snapshot + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the snapshot resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String snapshotName, + SnapshotInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, snapshotName, contentType, accept, resource, + Context.NONE); + } + + /** + * The operation to create or update a snapshot. Please note some properties can be set only during snapshot + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the snapshot resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String snapshotName, + SnapshotInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, snapshotName, contentType, accept, resource, context); + } + + /** + * The operation to create or update a snapshot. Please note some properties can be set only during snapshot + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the snapshot resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SnapshotInner> beginCreateOrUpdateAsync(String resourceGroupName, + String snapshotName, SnapshotInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, snapshotName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SnapshotInner.class, SnapshotInner.class, this.client.getContext()); + } + + /** + * The operation to create or update a snapshot. Please note some properties can be set only during snapshot + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the snapshot resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SnapshotInner> beginCreateOrUpdate(String resourceGroupName, + String snapshotName, SnapshotInner resource) { + Response response = createOrUpdateWithResponse(resourceGroupName, snapshotName, resource); + return this.client.getLroResult(response, SnapshotInner.class, + SnapshotInner.class, Context.NONE); + } + + /** + * The operation to create or update a snapshot. Please note some properties can be set only during snapshot + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the snapshot resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SnapshotInner> beginCreateOrUpdate(String resourceGroupName, + String snapshotName, SnapshotInner resource, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, snapshotName, resource, context); + return this.client.getLroResult(response, SnapshotInner.class, + SnapshotInner.class, context); + } + + /** + * The operation to create or update a snapshot. Please note some properties can be set only during snapshot + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the snapshot resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String snapshotName, + SnapshotInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, snapshotName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to create or update a snapshot. Please note some properties can be set only during snapshot + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the snapshot resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SnapshotInner createOrUpdate(String resourceGroupName, String snapshotName, SnapshotInner resource) { + return beginCreateOrUpdate(resourceGroupName, snapshotName, resource).getFinalResult(); + } + + /** + * The operation to create or update a snapshot. Please note some properties can be set only during snapshot + * creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the snapshot resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SnapshotInner createOrUpdate(String resourceGroupName, String snapshotName, SnapshotInner resource, + Context context) { + return beginCreateOrUpdate(resourceGroupName, snapshotName, resource, context).getFinalResult(); + } + + /** + * The operation to update a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the snapshot resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String snapshotName, + SnapshotTagsUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, snapshotName, contentType, accept, properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to update a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the snapshot resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String snapshotName, + SnapshotTagsUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, snapshotName, contentType, accept, properties, + Context.NONE); + } + + /** + * The operation to update a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the snapshot resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String snapshotName, + SnapshotTagsUpdate properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, snapshotName, contentType, accept, properties, context); + } + + /** + * The operation to update a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the snapshot resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SnapshotInner> beginUpdateAsync(String resourceGroupName, + String snapshotName, SnapshotTagsUpdate properties) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, snapshotName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SnapshotInner.class, SnapshotInner.class, this.client.getContext()); + } + + /** + * The operation to update a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the snapshot resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SnapshotInner> beginUpdate(String resourceGroupName, + String snapshotName, SnapshotTagsUpdate properties) { + Response response = updateWithResponse(resourceGroupName, snapshotName, properties); + return this.client.getLroResult(response, SnapshotInner.class, + SnapshotInner.class, Context.NONE); + } + + /** + * The operation to update a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the snapshot resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SnapshotInner> beginUpdate(String resourceGroupName, + String snapshotName, SnapshotTagsUpdate properties, Context context) { + Response response = updateWithResponse(resourceGroupName, snapshotName, properties, context); + return this.client.getLroResult(response, SnapshotInner.class, + SnapshotInner.class, context); + } + + /** + * The operation to update a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the snapshot resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String snapshotName, + SnapshotTagsUpdate properties) { + return beginUpdateAsync(resourceGroupName, snapshotName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to update a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the snapshot resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SnapshotInner update(String resourceGroupName, String snapshotName, SnapshotTagsUpdate properties) { + return beginUpdate(resourceGroupName, snapshotName, properties).getFinalResult(); + } + + /** + * The operation to update a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the snapshot resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SnapshotInner update(String resourceGroupName, String snapshotName, SnapshotTagsUpdate properties, + Context context) { + return beginUpdate(resourceGroupName, snapshotName, properties, context).getFinalResult(); + } + + /** + * The operation to delete a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String snapshotName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, snapshotName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to delete a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String snapshotName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, snapshotName, Context.NONE); + } + + /** + * The operation to delete a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String snapshotName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, snapshotName, context); + } + + /** + * The operation to delete a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String snapshotName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, snapshotName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * The operation to delete a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String snapshotName) { + Response response = deleteWithResponse(resourceGroupName, snapshotName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * The operation to delete a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String snapshotName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, snapshotName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * The operation to delete a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String snapshotName) { + return beginDeleteAsync(resourceGroupName, snapshotName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to delete a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String snapshotName) { + beginDelete(resourceGroupName, snapshotName).getFinalResult(); + } + + /** + * The operation to delete a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String snapshotName, Context context) { + beginDelete(resourceGroupName, snapshotName, context).getFinalResult(); + } + + /** + * Lists all of the snapshots in the specified resource group. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all of the snapshots in the specified resource group. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the snapshots in the specified resource group. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the snapshots in the specified resource group. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the snapshots in the specified resource group. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * Lists all of the snapshots in the specified resource group. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Lists all of the snapshots in the specified subscription. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all of the snapshots in the specified subscription. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listAllNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the snapshots in the specified subscription. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the snapshots in the specified subscription. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the snapshots in the specified subscription. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listAllNextSinglePage(nextLink)); + } + + /** + * Lists all of the snapshots in the specified subscription. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listAllNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/SnapshotsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/SnapshotsImpl.java new file mode 100644 index 0000000000000..9a627fc1cf006 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/SnapshotsImpl.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.vm.fluent.SnapshotsClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.SnapshotInner; +import com.azure.resourcemanager.azurestackhci.vm.models.Snapshot; +import com.azure.resourcemanager.azurestackhci.vm.models.Snapshots; + +public final class SnapshotsImpl implements Snapshots { + private static final ClientLogger LOGGER = new ClientLogger(SnapshotsImpl.class); + + private final SnapshotsClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager; + + public SnapshotsImpl(SnapshotsClient innerClient, + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String snapshotName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, snapshotName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SnapshotImpl(inner.getValue(), this.manager())); + } + + public Snapshot getByResourceGroup(String resourceGroupName, String snapshotName) { + SnapshotInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, snapshotName); + if (inner != null) { + return new SnapshotImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String snapshotName) { + this.serviceClient().delete(resourceGroupName, snapshotName); + } + + public void delete(String resourceGroupName, String snapshotName, Context context) { + this.serviceClient().delete(resourceGroupName, snapshotName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public Snapshot getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "snapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, snapshotName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "snapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, snapshotName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "snapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); + } + this.delete(resourceGroupName, snapshotName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "snapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); + } + this.delete(resourceGroupName, snapshotName, context); + } + + private SnapshotsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager() { + return this.serviceManager; + } + + public SnapshotImpl define(String name) { + return new SnapshotImpl(name, this.manager()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualMachineInstancesClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualMachineInstancesClientImpl.java index 9fddf2dc23f17..77a7394595824 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualMachineInstancesClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualMachineInstancesClientImpl.java @@ -35,8 +35,10 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualMachineInstanceInner; import com.azure.resourcemanager.azurestackhci.vm.implementation.models.VirtualMachineInstanceListResult; +import com.azure.resourcemanager.azurestackhci.vm.models.PowerOffVirtualMachineOptions; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceUpdateRequest; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -242,6 +244,24 @@ Response saveSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam(value = "resourceUri", encoded = true) String resourceUri, Context context); + @Post("/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/powerOff") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> powerOff(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PowerOffVirtualMachineOptions body, Context context); + + @Post("/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/powerOff") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response powerOffSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PowerOffVirtualMachineOptions body, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -1564,6 +1584,169 @@ public void save(String resourceUri, Context context) { beginSave(resourceUri, context).getFinalResult(); } + /** + * The operation to power off a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> powerOffWithResponseAsync(String resourceUri, + PowerOffVirtualMachineOptions body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.powerOff(this.client.getEndpoint(), this.client.getApiVersion(), + resourceUri, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to power off a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response powerOffWithResponse(String resourceUri, PowerOffVirtualMachineOptions body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.powerOffSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, contentType, + accept, body, Context.NONE); + } + + /** + * The operation to power off a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response powerOffWithResponse(String resourceUri, PowerOffVirtualMachineOptions body, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.powerOffSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, contentType, + accept, body, context); + } + + /** + * The operation to power off a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> + beginPowerOffAsync(String resourceUri, PowerOffVirtualMachineOptions body) { + Mono>> mono = powerOffWithResponseAsync(resourceUri, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + this.client.getContext()); + } + + /** + * The operation to power off a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> + beginPowerOff(String resourceUri, PowerOffVirtualMachineOptions body) { + Response response = powerOffWithResponse(resourceUri, body); + return this.client.getLroResult(response, + OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + } + + /** + * The operation to power off a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> + beginPowerOff(String resourceUri, PowerOffVirtualMachineOptions body, Context context) { + Response response = powerOffWithResponse(resourceUri, body, context); + return this.client.getLroResult(response, + OperationStatusResultInner.class, OperationStatusResultInner.class, context); + } + + /** + * The operation to power off a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono powerOffAsync(String resourceUri, PowerOffVirtualMachineOptions body) { + return beginPowerOffAsync(resourceUri, body).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to power off a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner powerOff(String resourceUri, PowerOffVirtualMachineOptions body) { + return beginPowerOff(resourceUri, body).getFinalResult(); + } + + /** + * The operation to power off a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner powerOff(String resourceUri, PowerOffVirtualMachineOptions body, + Context context) { + return beginPowerOff(resourceUri, body, context).getFinalResult(); + } + /** * Get the next page of items. * diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualMachineInstancesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualMachineInstancesImpl.java index b9e7d33403bc6..00158b18eab48 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualMachineInstancesImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualMachineInstancesImpl.java @@ -10,7 +10,10 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualMachineInstanceInner; +import com.azure.resourcemanager.azurestackhci.vm.models.OperationStatusResult; +import com.azure.resourcemanager.azurestackhci.vm.models.PowerOffVirtualMachineOptions; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstance; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceUpdateRequest; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstances; @@ -139,6 +142,24 @@ public void save(String resourceUri, Context context) { this.serviceClient().save(resourceUri, context); } + public OperationStatusResult powerOff(String resourceUri, PowerOffVirtualMachineOptions body) { + OperationStatusResultInner inner = this.serviceClient().powerOff(resourceUri, body); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public OperationStatusResult powerOff(String resourceUri, PowerOffVirtualMachineOptions body, Context context) { + OperationStatusResultInner inner = this.serviceClient().powerOff(resourceUri, body, context); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + private VirtualMachineInstancesClient serviceClient() { return this.innerClient; } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworkImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworkImpl.java new file mode 100644 index 0000000000000..1a3f08a207ad2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworkImpl.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualNetworkInner; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetwork; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkTagsUpdate; +import java.util.Collections; +import java.util.Map; + +public final class VirtualNetworkImpl implements VirtualNetwork, VirtualNetwork.Definition, VirtualNetwork.Update { + private VirtualNetworkInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public VirtualNetworkProperties properties() { + return this.innerModel().properties(); + } + + public ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public VirtualNetworkInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String virtualNetworkName; + + private VirtualNetworkTagsUpdate updateProperties; + + public VirtualNetworkImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public VirtualNetwork create() { + this.innerObject = serviceManager.serviceClient() + .getVirtualNetworks() + .createOrUpdate(resourceGroupName, virtualNetworkName, this.innerModel(), Context.NONE); + return this; + } + + public VirtualNetwork create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getVirtualNetworks() + .createOrUpdate(resourceGroupName, virtualNetworkName, this.innerModel(), context); + return this; + } + + VirtualNetworkImpl(String name, com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerObject = new VirtualNetworkInner(); + this.serviceManager = serviceManager; + this.virtualNetworkName = name; + } + + public VirtualNetworkImpl update() { + this.updateProperties = new VirtualNetworkTagsUpdate(); + return this; + } + + public VirtualNetwork apply() { + this.innerObject = serviceManager.serviceClient() + .getVirtualNetworks() + .updateTags(resourceGroupName, virtualNetworkName, updateProperties, Context.NONE); + return this; + } + + public VirtualNetwork apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getVirtualNetworks() + .updateTags(resourceGroupName, virtualNetworkName, updateProperties, context); + return this; + } + + VirtualNetworkImpl(VirtualNetworkInner innerObject, + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.virtualNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "virtualNetworks"); + } + + public VirtualNetwork refresh() { + this.innerObject = serviceManager.serviceClient() + .getVirtualNetworks() + .getByResourceGroupWithResponse(resourceGroupName, virtualNetworkName, Context.NONE) + .getValue(); + return this; + } + + public VirtualNetwork refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getVirtualNetworks() + .getByResourceGroupWithResponse(resourceGroupName, virtualNetworkName, context) + .getValue(); + return this; + } + + public VirtualNetworkImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public VirtualNetworkImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public VirtualNetworkImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public VirtualNetworkImpl withProperties(VirtualNetworkProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public VirtualNetworkImpl withExtendedLocation(ExtendedLocation extendedLocation) { + this.innerModel().withExtendedLocation(extendedLocation); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworkSubnetImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworkSubnetImpl.java new file mode 100644 index 0000000000000..04defbc1e547a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworkSubnetImpl.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualNetworkSubnetInner; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnet; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetUpdateProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetUpdateRequest; + +public final class VirtualNetworkSubnetImpl + implements VirtualNetworkSubnet, VirtualNetworkSubnet.Definition, VirtualNetworkSubnet.Update { + private VirtualNetworkSubnetInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public VirtualNetworkSubnetProperties properties() { + return this.innerModel().properties(); + } + + public ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public VirtualNetworkSubnetInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String virtualNetworkName; + + private String subnetName; + + private VirtualNetworkSubnetUpdateRequest updateProperties; + + public VirtualNetworkSubnetImpl withExistingVirtualNetwork(String resourceGroupName, String virtualNetworkName) { + this.resourceGroupName = resourceGroupName; + this.virtualNetworkName = virtualNetworkName; + return this; + } + + public VirtualNetworkSubnet create() { + this.innerObject = serviceManager.serviceClient() + .getVirtualNetworkSubnets() + .createOrUpdate(resourceGroupName, virtualNetworkName, subnetName, this.innerModel(), Context.NONE); + return this; + } + + public VirtualNetworkSubnet create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getVirtualNetworkSubnets() + .createOrUpdate(resourceGroupName, virtualNetworkName, subnetName, this.innerModel(), context); + return this; + } + + VirtualNetworkSubnetImpl(String name, + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerObject = new VirtualNetworkSubnetInner(); + this.serviceManager = serviceManager; + this.subnetName = name; + } + + public VirtualNetworkSubnetImpl update() { + this.updateProperties = new VirtualNetworkSubnetUpdateRequest(); + return this; + } + + public VirtualNetworkSubnet apply() { + this.innerObject = serviceManager.serviceClient() + .getVirtualNetworkSubnets() + .update(resourceGroupName, virtualNetworkName, subnetName, updateProperties, Context.NONE); + return this; + } + + public VirtualNetworkSubnet apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getVirtualNetworkSubnets() + .update(resourceGroupName, virtualNetworkName, subnetName, updateProperties, context); + return this; + } + + VirtualNetworkSubnetImpl(VirtualNetworkSubnetInner innerObject, + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.virtualNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "virtualNetworks"); + this.subnetName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "subnets"); + } + + public VirtualNetworkSubnet refresh() { + this.innerObject = serviceManager.serviceClient() + .getVirtualNetworkSubnets() + .getWithResponse(resourceGroupName, virtualNetworkName, subnetName, Context.NONE) + .getValue(); + return this; + } + + public VirtualNetworkSubnet refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getVirtualNetworkSubnets() + .getWithResponse(resourceGroupName, virtualNetworkName, subnetName, context) + .getValue(); + return this; + } + + public VirtualNetworkSubnetImpl withProperties(VirtualNetworkSubnetProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public VirtualNetworkSubnetImpl withExtendedLocation(ExtendedLocation extendedLocation) { + this.innerModel().withExtendedLocation(extendedLocation); + return this; + } + + public VirtualNetworkSubnetImpl withProperties(VirtualNetworkSubnetUpdateProperties properties) { + this.updateProperties.withProperties(properties); + return this; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworkSubnetsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworkSubnetsClientImpl.java new file mode 100644 index 0000000000000..00783bc42c8ca --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworkSubnetsClientImpl.java @@ -0,0 +1,994 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworkSubnetsClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualNetworkSubnetInner; +import com.azure.resourcemanager.azurestackhci.vm.implementation.models.VirtualNetworkSubnetListResult; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetUpdateRequest; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in VirtualNetworkSubnetsClient. + */ +public final class VirtualNetworkSubnetsClientImpl implements VirtualNetworkSubnetsClient { + /** + * The proxy service used to perform REST calls. + */ + private final VirtualNetworkSubnetsService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciVmMgmtClientImpl client; + + /** + * Initializes an instance of VirtualNetworkSubnetsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + VirtualNetworkSubnetsClientImpl(AzureStackHciVmMgmtClientImpl client) { + this.service = RestProxy.create(VirtualNetworkSubnetsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciVmMgmtClientVirtualNetworkSubnets to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciVmMgmtClientVirtualNetworkSubnets") + public interface VirtualNetworkSubnetsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualNetworkName") String virtualNetworkName, @PathParam("subnetName") String subnetName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualNetworkName") String virtualNetworkName, @PathParam("subnetName") String subnetName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualNetworkName") String virtualNetworkName, @PathParam("subnetName") String subnetName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") VirtualNetworkSubnetInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualNetworkName") String virtualNetworkName, @PathParam("subnetName") String subnetName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") VirtualNetworkSubnetInner resource, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualNetworkName") String virtualNetworkName, @PathParam("subnetName") String subnetName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") VirtualNetworkSubnetUpdateRequest properties, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualNetworkName") String virtualNetworkName, @PathParam("subnetName") String subnetName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") VirtualNetworkSubnetUpdateRequest properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualNetworkName") String virtualNetworkName, @PathParam("subnetName") String subnetName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualNetworkName") String virtualNetworkName, @PathParam("subnetName") String subnetName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}/subnets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByVirtualNetwork(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualNetworkName") String virtualNetworkName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}/subnets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByVirtualNetworkSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualNetworkName") String virtualNetworkName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByVirtualNetworkNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByVirtualNetworkNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * The operation to get a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String virtualNetworkName, String subnetName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, subnetName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to get a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String virtualNetworkName, + String subnetName) { + return getWithResponseAsync(resourceGroupName, virtualNetworkName, subnetName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * The operation to get a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String virtualNetworkName, + String subnetName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, virtualNetworkName, subnetName, accept, context); + } + + /** + * The operation to get a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualNetworkSubnetInner get(String resourceGroupName, String virtualNetworkName, String subnetName) { + return getWithResponse(resourceGroupName, virtualNetworkName, subnetName, Context.NONE).getValue(); + } + + /** + * The operation to create or update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String virtualNetworkName, String subnetName, VirtualNetworkSubnetInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, subnetName, contentType, accept, + resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to create or update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String virtualNetworkName, + String subnetName, VirtualNetworkSubnetInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, subnetName, contentType, accept, + resource, Context.NONE); + } + + /** + * The operation to create or update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String virtualNetworkName, + String subnetName, VirtualNetworkSubnetInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, subnetName, contentType, accept, + resource, context); + } + + /** + * The operation to create or update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VirtualNetworkSubnetInner> beginCreateOrUpdateAsync( + String resourceGroupName, String virtualNetworkName, String subnetName, VirtualNetworkSubnetInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, virtualNetworkName, subnetName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualNetworkSubnetInner.class, VirtualNetworkSubnetInner.class, + this.client.getContext()); + } + + /** + * The operation to create or update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VirtualNetworkSubnetInner> beginCreateOrUpdate( + String resourceGroupName, String virtualNetworkName, String subnetName, VirtualNetworkSubnetInner resource) { + Response response + = createOrUpdateWithResponse(resourceGroupName, virtualNetworkName, subnetName, resource); + return this.client.getLroResult(response, + VirtualNetworkSubnetInner.class, VirtualNetworkSubnetInner.class, Context.NONE); + } + + /** + * The operation to create or update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VirtualNetworkSubnetInner> beginCreateOrUpdate( + String resourceGroupName, String virtualNetworkName, String subnetName, VirtualNetworkSubnetInner resource, + Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, virtualNetworkName, subnetName, resource, context); + return this.client.getLroResult(response, + VirtualNetworkSubnetInner.class, VirtualNetworkSubnetInner.class, context); + } + + /** + * The operation to create or update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, + String subnetName, VirtualNetworkSubnetInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, virtualNetworkName, subnetName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to create or update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualNetworkSubnetInner createOrUpdate(String resourceGroupName, String virtualNetworkName, + String subnetName, VirtualNetworkSubnetInner resource) { + return beginCreateOrUpdate(resourceGroupName, virtualNetworkName, subnetName, resource).getFinalResult(); + } + + /** + * The operation to create or update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualNetworkSubnetInner createOrUpdate(String resourceGroupName, String virtualNetworkName, + String subnetName, VirtualNetworkSubnetInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, virtualNetworkName, subnetName, resource, context) + .getFinalResult(); + } + + /** + * The operation to update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String virtualNetworkName, String subnetName, VirtualNetworkSubnetUpdateRequest properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, subnetName, contentType, accept, + properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String virtualNetworkName, + String subnetName, VirtualNetworkSubnetUpdateRequest properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, subnetName, contentType, accept, + properties, Context.NONE); + } + + /** + * The operation to update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String virtualNetworkName, + String subnetName, VirtualNetworkSubnetUpdateRequest properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, subnetName, contentType, accept, + properties, context); + } + + /** + * The operation to update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VirtualNetworkSubnetInner> beginUpdateAsync( + String resourceGroupName, String virtualNetworkName, String subnetName, + VirtualNetworkSubnetUpdateRequest properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, virtualNetworkName, subnetName, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualNetworkSubnetInner.class, VirtualNetworkSubnetInner.class, + this.client.getContext()); + } + + /** + * The operation to update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VirtualNetworkSubnetInner> beginUpdate( + String resourceGroupName, String virtualNetworkName, String subnetName, + VirtualNetworkSubnetUpdateRequest properties) { + Response response + = updateWithResponse(resourceGroupName, virtualNetworkName, subnetName, properties); + return this.client.getLroResult(response, + VirtualNetworkSubnetInner.class, VirtualNetworkSubnetInner.class, Context.NONE); + } + + /** + * The operation to update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VirtualNetworkSubnetInner> beginUpdate( + String resourceGroupName, String virtualNetworkName, String subnetName, + VirtualNetworkSubnetUpdateRequest properties, Context context) { + Response response + = updateWithResponse(resourceGroupName, virtualNetworkName, subnetName, properties, context); + return this.client.getLroResult(response, + VirtualNetworkSubnetInner.class, VirtualNetworkSubnetInner.class, context); + } + + /** + * The operation to update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String virtualNetworkName, + String subnetName, VirtualNetworkSubnetUpdateRequest properties) { + return beginUpdateAsync(resourceGroupName, virtualNetworkName, subnetName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualNetworkSubnetInner update(String resourceGroupName, String virtualNetworkName, String subnetName, + VirtualNetworkSubnetUpdateRequest properties) { + return beginUpdate(resourceGroupName, virtualNetworkName, subnetName, properties).getFinalResult(); + } + + /** + * The operation to update a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualNetworkSubnetInner update(String resourceGroupName, String virtualNetworkName, String subnetName, + VirtualNetworkSubnetUpdateRequest properties, Context context) { + return beginUpdate(resourceGroupName, virtualNetworkName, subnetName, properties, context).getFinalResult(); + } + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String virtualNetworkName, String subnetName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, subnetName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String virtualNetworkName, + String subnetName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, subnetName, Context.NONE); + } + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String virtualNetworkName, + String subnetName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, subnetName, context); + } + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String virtualNetworkName, + String subnetName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, virtualNetworkName, subnetName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualNetworkName, + String subnetName) { + Response response = deleteWithResponse(resourceGroupName, virtualNetworkName, subnetName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualNetworkName, + String subnetName, Context context) { + Response response = deleteWithResponse(resourceGroupName, virtualNetworkName, subnetName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + return beginDeleteAsync(resourceGroupName, virtualNetworkName, subnetName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String virtualNetworkName, String subnetName) { + beginDelete(resourceGroupName, virtualNetworkName, subnetName).getFinalResult(); + } + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String virtualNetworkName, String subnetName, Context context) { + beginDelete(resourceGroupName, virtualNetworkName, subnetName, context).getFinalResult(); + } + + /** + * Lists all of the virtual network subnets in a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkSubnet list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVirtualNetworkSinglePageAsync(String resourceGroupName, + String virtualNetworkName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByVirtualNetwork(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all of the virtual network subnets in a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkSubnet list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVirtualNetworkAsync(String resourceGroupName, + String virtualNetworkName) { + return new PagedFlux<>(() -> listByVirtualNetworkSinglePageAsync(resourceGroupName, virtualNetworkName), + nextLink -> listByVirtualNetworkNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the virtual network subnets in a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkSubnet list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVirtualNetworkSinglePage(String resourceGroupName, + String virtualNetworkName) { + final String accept = "application/json"; + Response res + = service.listByVirtualNetworkSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the virtual network subnets in a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkSubnet list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVirtualNetworkSinglePage(String resourceGroupName, + String virtualNetworkName, Context context) { + final String accept = "application/json"; + Response res + = service.listByVirtualNetworkSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the virtual network subnets in a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkSubnet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVirtualNetwork(String resourceGroupName, + String virtualNetworkName) { + return new PagedIterable<>(() -> listByVirtualNetworkSinglePage(resourceGroupName, virtualNetworkName), + nextLink -> listByVirtualNetworkNextSinglePage(nextLink)); + } + + /** + * Lists all of the virtual network subnets in a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkSubnet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVirtualNetwork(String resourceGroupName, + String virtualNetworkName, Context context) { + return new PagedIterable<>(() -> listByVirtualNetworkSinglePage(resourceGroupName, virtualNetworkName, context), + nextLink -> listByVirtualNetworkNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkSubnet list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVirtualNetworkNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByVirtualNetworkNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkSubnet list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVirtualNetworkNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByVirtualNetworkNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkSubnet list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVirtualNetworkNextSinglePage(String nextLink, + Context context) { + final String accept = "application/json"; + Response res + = service.listByVirtualNetworkNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworkSubnetsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworkSubnetsImpl.java new file mode 100644 index 0000000000000..173f73026c992 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworkSubnetsImpl.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworkSubnetsClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualNetworkSubnetInner; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnet; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnets; + +public final class VirtualNetworkSubnetsImpl implements VirtualNetworkSubnets { + private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkSubnetsImpl.class); + + private final VirtualNetworkSubnetsClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager; + + public VirtualNetworkSubnetsImpl(VirtualNetworkSubnetsClient innerClient, + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String virtualNetworkName, + String subnetName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, virtualNetworkName, subnetName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VirtualNetworkSubnetImpl(inner.getValue(), this.manager())); + } + + public VirtualNetworkSubnet get(String resourceGroupName, String virtualNetworkName, String subnetName) { + VirtualNetworkSubnetInner inner = this.serviceClient().get(resourceGroupName, virtualNetworkName, subnetName); + if (inner != null) { + return new VirtualNetworkSubnetImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String virtualNetworkName, String subnetName) { + this.serviceClient().delete(resourceGroupName, virtualNetworkName, subnetName); + } + + public void delete(String resourceGroupName, String virtualNetworkName, String subnetName, Context context) { + this.serviceClient().delete(resourceGroupName, virtualNetworkName, subnetName, context); + } + + public PagedIterable listByVirtualNetwork(String resourceGroupName, + String virtualNetworkName) { + PagedIterable inner + = this.serviceClient().listByVirtualNetwork(resourceGroupName, virtualNetworkName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkSubnetImpl(inner1, this.manager())); + } + + public PagedIterable listByVirtualNetwork(String resourceGroupName, String virtualNetworkName, + Context context) { + PagedIterable inner + = this.serviceClient().listByVirtualNetwork(resourceGroupName, virtualNetworkName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkSubnetImpl(inner1, this.manager())); + } + + public VirtualNetworkSubnet getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String virtualNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "virtualNetworks"); + if (virtualNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'virtualNetworks'.", id))); + } + String subnetName = ResourceManagerUtils.getValueFromIdByName(id, "subnets"); + if (subnetName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'subnets'.", id))); + } + return this.getWithResponse(resourceGroupName, virtualNetworkName, subnetName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String virtualNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "virtualNetworks"); + if (virtualNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'virtualNetworks'.", id))); + } + String subnetName = ResourceManagerUtils.getValueFromIdByName(id, "subnets"); + if (subnetName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'subnets'.", id))); + } + return this.getWithResponse(resourceGroupName, virtualNetworkName, subnetName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String virtualNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "virtualNetworks"); + if (virtualNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'virtualNetworks'.", id))); + } + String subnetName = ResourceManagerUtils.getValueFromIdByName(id, "subnets"); + if (subnetName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'subnets'.", id))); + } + this.delete(resourceGroupName, virtualNetworkName, subnetName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String virtualNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "virtualNetworks"); + if (virtualNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'virtualNetworks'.", id))); + } + String subnetName = ResourceManagerUtils.getValueFromIdByName(id, "subnets"); + if (subnetName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'subnets'.", id))); + } + this.delete(resourceGroupName, virtualNetworkName, subnetName, context); + } + + private VirtualNetworkSubnetsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager() { + return this.serviceManager; + } + + public VirtualNetworkSubnetImpl define(String name) { + return new VirtualNetworkSubnetImpl(name, this.manager()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworksClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworksClientImpl.java new file mode 100644 index 0000000000000..7f678963c34f3 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworksClientImpl.java @@ -0,0 +1,1132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworksClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualNetworkInner; +import com.azure.resourcemanager.azurestackhci.vm.implementation.models.VirtualNetworkListResult; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkTagsUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in VirtualNetworksClient. + */ +public final class VirtualNetworksClientImpl implements VirtualNetworksClient { + /** + * The proxy service used to perform REST calls. + */ + private final VirtualNetworksService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciVmMgmtClientImpl client; + + /** + * Initializes an instance of VirtualNetworksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + VirtualNetworksClientImpl(AzureStackHciVmMgmtClientImpl client) { + this.service + = RestProxy.create(VirtualNetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciVmMgmtClientVirtualNetworks to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureStackHciVmMgmtClientVirtualNetworks") + public interface VirtualNetworksService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualNetworkName") String virtualNetworkName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualNetworkName") String virtualNetworkName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualNetworkName") String virtualNetworkName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") VirtualNetworkInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualNetworkName") String virtualNetworkName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") VirtualNetworkInner resource, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateTags(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualNetworkName") String virtualNetworkName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") VirtualNetworkTagsUpdate properties, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateTagsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualNetworkName") String virtualNetworkName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") VirtualNetworkTagsUpdate properties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualNetworkName") String virtualNetworkName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks/{virtualNetworkName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualNetworkName") String virtualNetworkName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/virtualNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/virtualNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAllNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listAllNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * The operation to get a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String virtualNetworkName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to get a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String virtualNetworkName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, virtualNetworkName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * The operation to get a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String virtualNetworkName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, accept, context); + } + + /** + * The operation to get a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualNetworkInner getByResourceGroup(String resourceGroupName, String virtualNetworkName) { + return getByResourceGroupWithResponse(resourceGroupName, virtualNetworkName, Context.NONE).getValue(); + } + + /** + * The operation to create or update a virtual network. Please note some properties can be set only during + * virtualNetwork network creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String virtualNetworkName, VirtualNetworkInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to create or update a virtual network. Please note some properties can be set only during + * virtualNetwork network creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String virtualNetworkName, + VirtualNetworkInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, contentType, accept, resource, + Context.NONE); + } + + /** + * The operation to create or update a virtual network. Please note some properties can be set only during + * virtualNetwork network creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String virtualNetworkName, + VirtualNetworkInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, contentType, accept, resource, + context); + } + + /** + * The operation to create or update a virtual network. Please note some properties can be set only during + * virtualNetwork network creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VirtualNetworkInner> + beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, virtualNetworkName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VirtualNetworkInner.class, VirtualNetworkInner.class, this.client.getContext()); + } + + /** + * The operation to create or update a virtual network. Please note some properties can be set only during + * virtualNetwork network creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VirtualNetworkInner> + beginCreateOrUpdate(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner resource) { + Response response = createOrUpdateWithResponse(resourceGroupName, virtualNetworkName, resource); + return this.client.getLroResult(response, VirtualNetworkInner.class, + VirtualNetworkInner.class, Context.NONE); + } + + /** + * The operation to create or update a virtual network. Please note some properties can be set only during + * virtualNetwork network creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VirtualNetworkInner> beginCreateOrUpdate( + String resourceGroupName, String virtualNetworkName, VirtualNetworkInner resource, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, virtualNetworkName, resource, context); + return this.client.getLroResult(response, VirtualNetworkInner.class, + VirtualNetworkInner.class, context); + } + + /** + * The operation to create or update a virtual network. Please note some properties can be set only during + * virtualNetwork network creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, + VirtualNetworkInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, virtualNetworkName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to create or update a virtual network. Please note some properties can be set only during + * virtualNetwork network creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualNetworkInner createOrUpdate(String resourceGroupName, String virtualNetworkName, + VirtualNetworkInner resource) { + return beginCreateOrUpdate(resourceGroupName, virtualNetworkName, resource).getFinalResult(); + } + + /** + * The operation to create or update a virtual network. Please note some properties can be set only during + * virtualNetwork network creation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualNetworkInner createOrUpdate(String resourceGroupName, String virtualNetworkName, + VirtualNetworkInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, virtualNetworkName, resource, context).getFinalResult(); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateTagsWithResponseAsync(String resourceGroupName, + String virtualNetworkName, VirtualNetworkTagsUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, contentType, accept, properties, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateTagsWithResponse(String resourceGroupName, String virtualNetworkName, + VirtualNetworkTagsUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateTagsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, contentType, accept, properties, + Context.NONE); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateTagsWithResponse(String resourceGroupName, String virtualNetworkName, + VirtualNetworkTagsUpdate properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateTagsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, contentType, accept, properties, + context); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VirtualNetworkInner> + beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkName, VirtualNetworkTagsUpdate properties) { + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, virtualNetworkName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VirtualNetworkInner.class, VirtualNetworkInner.class, this.client.getContext()); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VirtualNetworkInner> beginUpdateTags(String resourceGroupName, + String virtualNetworkName, VirtualNetworkTagsUpdate properties) { + Response response = updateTagsWithResponse(resourceGroupName, virtualNetworkName, properties); + return this.client.getLroResult(response, VirtualNetworkInner.class, + VirtualNetworkInner.class, Context.NONE); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VirtualNetworkInner> beginUpdateTags(String resourceGroupName, + String virtualNetworkName, VirtualNetworkTagsUpdate properties, Context context) { + Response response + = updateTagsWithResponse(resourceGroupName, virtualNetworkName, properties, context); + return this.client.getLroResult(response, VirtualNetworkInner.class, + VirtualNetworkInner.class, context); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String virtualNetworkName, + VirtualNetworkTagsUpdate properties) { + return beginUpdateTagsAsync(resourceGroupName, virtualNetworkName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualNetworkInner updateTags(String resourceGroupName, String virtualNetworkName, + VirtualNetworkTagsUpdate properties) { + return beginUpdateTags(resourceGroupName, virtualNetworkName, properties).getFinalResult(); + } + + /** + * Updates a virtual network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualNetworkInner updateTags(String resourceGroupName, String virtualNetworkName, + VirtualNetworkTagsUpdate properties, Context context) { + return beginUpdateTags(resourceGroupName, virtualNetworkName, properties, context).getFinalResult(); + } + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String virtualNetworkName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String virtualNetworkName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, Context.NONE); + } + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String virtualNetworkName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, context); + } + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String virtualNetworkName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, virtualNetworkName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualNetworkName) { + Response response = deleteWithResponse(resourceGroupName, virtualNetworkName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualNetworkName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, virtualNetworkName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String virtualNetworkName) { + return beginDeleteAsync(resourceGroupName, virtualNetworkName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String virtualNetworkName) { + beginDelete(resourceGroupName, virtualNetworkName).getFinalResult(); + } + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String virtualNetworkName, Context context) { + beginDelete(resourceGroupName, virtualNetworkName, context).getFinalResult(); + } + + /** + * Lists all of the virtual networks in the specified resource group. Use the nextLink property in the response to + * get the next page of virtualNetwork networks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all of the virtual networks in the specified resource group. Use the nextLink property in the response to + * get the next page of virtualNetwork networks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the virtual networks in the specified resource group. Use the nextLink property in the response to + * get the next page of virtualNetwork networks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the virtual networks in the specified resource group. Use the nextLink property in the response to + * get the next page of virtualNetwork networks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the virtual networks in the specified resource group. Use the nextLink property in the response to + * get the next page of virtualNetwork networks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * Lists all of the virtual networks in the specified resource group. Use the nextLink property in the response to + * get the next page of virtualNetwork networks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Lists all of the virtual networks in the specified subscription. Use the nextLink property in the response to get + * the next page of virtualNetwork networks. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all of the virtual networks in the specified subscription. Use the nextLink property in the response to get + * the next page of virtualNetwork networks. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listAllNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the virtual networks in the specified subscription. Use the nextLink property in the response to get + * the next page of virtualNetwork networks. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the virtual networks in the specified subscription. Use the nextLink property in the response to get + * the next page of virtualNetwork networks. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the virtual networks in the specified subscription. Use the nextLink property in the response to get + * the next page of virtualNetwork networks. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listAllNextSinglePage(nextLink)); + } + + /** + * Lists all of the virtual networks in the specified subscription. Use the nextLink property in the response to get + * the next page of virtualNetwork networks. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listAllNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworksImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworksImpl.java new file mode 100644 index 0000000000000..8a45b4367a5ab --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworksImpl.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworksClient; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualNetworkInner; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetwork; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworks; + +public final class VirtualNetworksImpl implements VirtualNetworks { + private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworksImpl.class); + + private final VirtualNetworksClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager; + + public VirtualNetworksImpl(VirtualNetworksClient innerClient, + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String virtualNetworkName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, virtualNetworkName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VirtualNetworkImpl(inner.getValue(), this.manager())); + } + + public VirtualNetwork getByResourceGroup(String resourceGroupName, String virtualNetworkName) { + VirtualNetworkInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, virtualNetworkName); + if (inner != null) { + return new VirtualNetworkImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String virtualNetworkName) { + this.serviceClient().delete(resourceGroupName, virtualNetworkName); + } + + public void delete(String resourceGroupName, String virtualNetworkName, Context context) { + this.serviceClient().delete(resourceGroupName, virtualNetworkName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkImpl(inner1, this.manager())); + } + + public VirtualNetwork getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String virtualNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "virtualNetworks"); + if (virtualNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'virtualNetworks'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, virtualNetworkName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String virtualNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "virtualNetworks"); + if (virtualNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'virtualNetworks'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, virtualNetworkName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String virtualNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "virtualNetworks"); + if (virtualNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'virtualNetworks'.", id))); + } + this.delete(resourceGroupName, virtualNetworkName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String virtualNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "virtualNetworks"); + if (virtualNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'virtualNetworks'.", id))); + } + this.delete(resourceGroupName, virtualNetworkName, context); + } + + private VirtualNetworksClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager() { + return this.serviceManager; + } + + public VirtualNetworkImpl define(String name) { + return new VirtualNetworkImpl(name, this.manager()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/InboundRuleListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/InboundRuleListResult.java new file mode 100644 index 0000000000000..453fcb0c6afb1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/InboundRuleListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.InboundRuleInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a InboundRule list operation. + */ +@Immutable +public final class InboundRuleListResult implements JsonSerializable { + /* + * The InboundRule items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of InboundRuleListResult class. + */ + private InboundRuleListResult() { + } + + /** + * Get the value property: The InboundRule items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InboundRuleListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InboundRuleListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the InboundRuleListResult. + */ + public static InboundRuleListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InboundRuleListResult deserializedInboundRuleListResult = new InboundRuleListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> InboundRuleInner.fromJson(reader1)); + deserializedInboundRuleListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedInboundRuleListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedInboundRuleListResult; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/LoadBalancerListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/LoadBalancerListResult.java new file mode 100644 index 0000000000000..e127d6c9e78b4 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/LoadBalancerListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.LoadBalancerInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a LoadBalancer list operation. + */ +@Immutable +public final class LoadBalancerListResult implements JsonSerializable { + /* + * The LoadBalancer items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of LoadBalancerListResult class. + */ + private LoadBalancerListResult() { + } + + /** + * Get the value property: The LoadBalancer items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LoadBalancerListResult. + */ + public static LoadBalancerListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerListResult deserializedLoadBalancerListResult = new LoadBalancerListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> LoadBalancerInner.fromJson(reader1)); + deserializedLoadBalancerListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedLoadBalancerListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerListResult; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/NatGatewayListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/NatGatewayListResult.java new file mode 100644 index 0000000000000..2f5e972b4f194 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/NatGatewayListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.NatGatewayInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a NatGateway list operation. + */ +@Immutable +public final class NatGatewayListResult implements JsonSerializable { + /* + * The NatGateway items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NatGatewayListResult class. + */ + private NatGatewayListResult() { + } + + /** + * Get the value property: The NatGateway items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NatGatewayListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NatGatewayListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NatGatewayListResult. + */ + public static NatGatewayListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NatGatewayListResult deserializedNatGatewayListResult = new NatGatewayListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> NatGatewayInner.fromJson(reader1)); + deserializedNatGatewayListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNatGatewayListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNatGatewayListResult; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/OperationListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/OperationListResult.java new file mode 100644 index 0000000000000..9fa2fd70ba27a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/OperationListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.OperationInner; +import java.io.IOException; +import java.util.List; + +/** + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + * results. + */ +@Immutable +public final class OperationListResult implements JsonSerializable { + /* + * The Operation items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of OperationListResult class. + */ + private OperationListResult() { + } + + /** + * Get the value property: The Operation items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OperationListResult. + */ + public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationListResult deserializedOperationListResult = new OperationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); + deserializedOperationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOperationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationListResult; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/PublicIPAddressListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/PublicIPAddressListResult.java new file mode 100644 index 0000000000000..69b4d6c9cc111 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/PublicIPAddressListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.PublicIPAddressInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a PublicIPAddress list operation. + */ +@Immutable +public final class PublicIPAddressListResult implements JsonSerializable { + /* + * The PublicIPAddress items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of PublicIPAddressListResult class. + */ + private PublicIPAddressListResult() { + } + + /** + * Get the value property: The PublicIPAddress items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PublicIPAddressListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PublicIPAddressListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PublicIPAddressListResult. + */ + public static PublicIPAddressListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PublicIPAddressListResult deserializedPublicIPAddressListResult = new PublicIPAddressListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PublicIPAddressInner.fromJson(reader1)); + deserializedPublicIPAddressListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPublicIPAddressListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPublicIPAddressListResult; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/SnapshotListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/SnapshotListResult.java new file mode 100644 index 0000000000000..af12f1900a548 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/SnapshotListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.SnapshotInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a Snapshot list operation. + */ +@Immutable +public final class SnapshotListResult implements JsonSerializable { + /* + * The Snapshot items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of SnapshotListResult class. + */ + private SnapshotListResult() { + } + + /** + * Get the value property: The Snapshot items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SnapshotListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SnapshotListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SnapshotListResult. + */ + public static SnapshotListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SnapshotListResult deserializedSnapshotListResult = new SnapshotListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> SnapshotInner.fromJson(reader1)); + deserializedSnapshotListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSnapshotListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSnapshotListResult; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/VirtualNetworkListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/VirtualNetworkListResult.java new file mode 100644 index 0000000000000..4de4df6d98d16 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/VirtualNetworkListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualNetworkInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a VirtualNetwork list operation. + */ +@Immutable +public final class VirtualNetworkListResult implements JsonSerializable { + /* + * The VirtualNetwork items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of VirtualNetworkListResult class. + */ + private VirtualNetworkListResult() { + } + + /** + * Get the value property: The VirtualNetwork items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VirtualNetworkListResult. + */ + public static VirtualNetworkListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkListResult deserializedVirtualNetworkListResult = new VirtualNetworkListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> VirtualNetworkInner.fromJson(reader1)); + deserializedVirtualNetworkListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedVirtualNetworkListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkListResult; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/VirtualNetworkSubnetListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/VirtualNetworkSubnetListResult.java new file mode 100644 index 0000000000000..4ea1212b0867b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/VirtualNetworkSubnetListResult.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualNetworkSubnetInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a VirtualNetworkSubnet list operation. + */ +@Immutable +public final class VirtualNetworkSubnetListResult implements JsonSerializable { + /* + * The VirtualNetworkSubnet items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of VirtualNetworkSubnetListResult class. + */ + private VirtualNetworkSubnetListResult() { + } + + /** + * Get the value property: The VirtualNetworkSubnet items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkSubnetListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkSubnetListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VirtualNetworkSubnetListResult. + */ + public static VirtualNetworkSubnetListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkSubnetListResult deserializedVirtualNetworkSubnetListResult + = new VirtualNetworkSubnetListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> VirtualNetworkSubnetInner.fromJson(reader1)); + deserializedVirtualNetworkSubnetListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedVirtualNetworkSubnetListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkSubnetListResult; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ActionType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ActionType.java new file mode 100644 index 0000000000000..281cc4992043b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ActionType.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ +public final class ActionType extends ExpandableStringEnum { + /** + * Actions are for internal-only APIs. + */ + public static final ActionType INTERNAL = fromString("Internal"); + + /** + * Creates a new instance of ActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + + /** + * Creates or finds a ActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionType. + */ + public static ActionType fromString(String name) { + return fromString(name, ActionType.class); + } + + /** + * Gets known ActionType values. + * + * @return known ActionType values. + */ + public static Collection values() { + return values(ActionType.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/BackendAddressPool.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/BackendAddressPool.java new file mode 100644 index 0000000000000..b32d2a055f648 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/BackendAddressPool.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Backend address pool for the load balancer. + */ +@Fluent +public final class BackendAddressPool implements JsonSerializable { + /* + * name of the backend pool. + */ + private String name; + + /* + * properties for the backend pool + */ + private BackendAddressPoolProperties properties; + + /** + * Creates an instance of BackendAddressPool class. + */ + public BackendAddressPool() { + } + + /** + * Get the name property: name of the backend pool. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: name of the backend pool. + * + * @param name the name value to set. + * @return the BackendAddressPool object itself. + */ + public BackendAddressPool withName(String name) { + this.name = name; + return this; + } + + /** + * Get the properties property: properties for the backend pool. + * + * @return the properties value. + */ + public BackendAddressPoolProperties properties() { + return this.properties; + } + + /** + * Set the properties property: properties for the backend pool. + * + * @param properties the properties value to set. + * @return the BackendAddressPool object itself. + */ + public BackendAddressPool withProperties(BackendAddressPoolProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackendAddressPool from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackendAddressPool if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BackendAddressPool. + */ + public static BackendAddressPool fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackendAddressPool deserializedBackendAddressPool = new BackendAddressPool(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedBackendAddressPool.name = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedBackendAddressPool.properties = BackendAddressPoolProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedBackendAddressPool; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/BackendAddressPoolProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/BackendAddressPoolProperties.java new file mode 100644 index 0000000000000..cdfeb214097fb --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/BackendAddressPoolProperties.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Backend address pool for the load balancer. + */ +@Fluent +public final class BackendAddressPoolProperties implements JsonSerializable { + /* + * List of backend addresses for the backend pool + */ + private List loadBalancerBackendAddresses; + + /* + * Reference to the virtual network for this backend pool. Mutually exclusive with logicalNetwork + */ + private VirtualNetworkArmReference virtualNetwork; + + /* + * Reference to the logical network for this backend pool. Mutually exclusive with virtualNetwork + */ + private LogicalNetworkArmReference logicalNetwork; + + /** + * Creates an instance of BackendAddressPoolProperties class. + */ + public BackendAddressPoolProperties() { + } + + /** + * Get the loadBalancerBackendAddresses property: List of backend addresses for the backend pool. + * + * @return the loadBalancerBackendAddresses value. + */ + public List loadBalancerBackendAddresses() { + return this.loadBalancerBackendAddresses; + } + + /** + * Set the loadBalancerBackendAddresses property: List of backend addresses for the backend pool. + * + * @param loadBalancerBackendAddresses the loadBalancerBackendAddresses value to set. + * @return the BackendAddressPoolProperties object itself. + */ + public BackendAddressPoolProperties + withLoadBalancerBackendAddresses(List loadBalancerBackendAddresses) { + this.loadBalancerBackendAddresses = loadBalancerBackendAddresses; + return this; + } + + /** + * Get the virtualNetwork property: Reference to the virtual network for this backend pool. Mutually exclusive with + * logicalNetwork. + * + * @return the virtualNetwork value. + */ + public VirtualNetworkArmReference virtualNetwork() { + return this.virtualNetwork; + } + + /** + * Set the virtualNetwork property: Reference to the virtual network for this backend pool. Mutually exclusive with + * logicalNetwork. + * + * @param virtualNetwork the virtualNetwork value to set. + * @return the BackendAddressPoolProperties object itself. + */ + public BackendAddressPoolProperties withVirtualNetwork(VirtualNetworkArmReference virtualNetwork) { + this.virtualNetwork = virtualNetwork; + return this; + } + + /** + * Get the logicalNetwork property: Reference to the logical network for this backend pool. Mutually exclusive with + * virtualNetwork. + * + * @return the logicalNetwork value. + */ + public LogicalNetworkArmReference logicalNetwork() { + return this.logicalNetwork; + } + + /** + * Set the logicalNetwork property: Reference to the logical network for this backend pool. Mutually exclusive with + * virtualNetwork. + * + * @param logicalNetwork the logicalNetwork value to set. + * @return the BackendAddressPoolProperties object itself. + */ + public BackendAddressPoolProperties withLogicalNetwork(LogicalNetworkArmReference logicalNetwork) { + this.logicalNetwork = logicalNetwork; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("loadBalancerBackendAddresses", this.loadBalancerBackendAddresses, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("virtualNetwork", this.virtualNetwork); + jsonWriter.writeJsonField("logicalNetwork", this.logicalNetwork); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackendAddressPoolProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackendAddressPoolProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BackendAddressPoolProperties. + */ + public static BackendAddressPoolProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackendAddressPoolProperties deserializedBackendAddressPoolProperties = new BackendAddressPoolProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("loadBalancerBackendAddresses".equals(fieldName)) { + List loadBalancerBackendAddresses + = reader.readArray(reader1 -> LoadBalancerBackendAddress.fromJson(reader1)); + deserializedBackendAddressPoolProperties.loadBalancerBackendAddresses + = loadBalancerBackendAddresses; + } else if ("virtualNetwork".equals(fieldName)) { + deserializedBackendAddressPoolProperties.virtualNetwork + = VirtualNetworkArmReference.fromJson(reader); + } else if ("logicalNetwork".equals(fieldName)) { + deserializedBackendAddressPoolProperties.logicalNetwork + = LogicalNetworkArmReference.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedBackendAddressPoolProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/CreationData.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/CreationData.java new file mode 100644 index 0000000000000..8b2c1e5b0b28f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/CreationData.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Data used when creating a disk or snapshot. + */ +@Fluent +public final class CreationData implements JsonSerializable { + /* + * This enumerates the possible sources of a disk's creation + */ + private DiskCreateOption createOption; + + /* + * ARM ID of the source resource used for disk creation. Required when createOption is Copy + */ + private String sourceResourceId; + + /* + * Unique ID of the source resource used for disk creation. Read-only and not required for disk creation. + */ + private String sourceUniqueId; + + /** + * Creates an instance of CreationData class. + */ + public CreationData() { + } + + /** + * Get the createOption property: This enumerates the possible sources of a disk's creation. + * + * @return the createOption value. + */ + public DiskCreateOption createOption() { + return this.createOption; + } + + /** + * Set the createOption property: This enumerates the possible sources of a disk's creation. + * + * @param createOption the createOption value to set. + * @return the CreationData object itself. + */ + public CreationData withCreateOption(DiskCreateOption createOption) { + this.createOption = createOption; + return this; + } + + /** + * Get the sourceResourceId property: ARM ID of the source resource used for disk creation. Required when + * createOption is Copy. + * + * @return the sourceResourceId value. + */ + public String sourceResourceId() { + return this.sourceResourceId; + } + + /** + * Set the sourceResourceId property: ARM ID of the source resource used for disk creation. Required when + * createOption is Copy. + * + * @param sourceResourceId the sourceResourceId value to set. + * @return the CreationData object itself. + */ + public CreationData withSourceResourceId(String sourceResourceId) { + this.sourceResourceId = sourceResourceId; + return this; + } + + /** + * Get the sourceUniqueId property: Unique ID of the source resource used for disk creation. Read-only and not + * required for disk creation. + * + * @return the sourceUniqueId value. + */ + public String sourceUniqueId() { + return this.sourceUniqueId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("createOption", this.createOption == null ? null : this.createOption.toString()); + jsonWriter.writeStringField("sourceResourceId", this.sourceResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CreationData from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CreationData if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CreationData. + */ + public static CreationData fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CreationData deserializedCreationData = new CreationData(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("createOption".equals(fieldName)) { + deserializedCreationData.createOption = DiskCreateOption.fromString(reader.getString()); + } else if ("sourceResourceId".equals(fieldName)) { + deserializedCreationData.sourceResourceId = reader.getString(); + } else if ("sourceUniqueId".equals(fieldName)) { + deserializedCreationData.sourceUniqueId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCreationData; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/DiskCreateOption.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/DiskCreateOption.java new file mode 100644 index 0000000000000..c18330f35cbaa --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/DiskCreateOption.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Disk creation option values [Copy, Empty]. + */ +public final class DiskCreateOption extends ExpandableStringEnum { + /** + * Create a disk by copying from a source resource. + */ + public static final DiskCreateOption COPY = fromString("Copy"); + + /** + * Create an empty disk. + */ + public static final DiskCreateOption EMPTY = fromString("Empty"); + + /** + * Creates a new instance of DiskCreateOption value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DiskCreateOption() { + } + + /** + * Creates or finds a DiskCreateOption from its string representation. + * + * @param name a name to look for. + * @return the corresponding DiskCreateOption. + */ + public static DiskCreateOption fromString(String name) { + return fromString(name, DiskCreateOption.class); + } + + /** + * Gets known DiskCreateOption values. + * + * @return known DiskCreateOption values. + */ + public static Collection values() { + return values(DiskCreateOption.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricConnectionHealthEnum.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricConnectionHealthEnum.java new file mode 100644 index 0000000000000..6dbb9e6d3e584 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricConnectionHealthEnum.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Fabric connection health state type. + */ +public final class FabricConnectionHealthEnum extends ExpandableStringEnum { + /** + * Fabric connection health state - healthy type. + */ + public static final FabricConnectionHealthEnum HEALTHY = fromString("Healthy"); + + /** + * Fabric connection health state - warning type. + */ + public static final FabricConnectionHealthEnum WARNING = fromString("Warning"); + + /** + * Fabric connection health state - error type. + */ + public static final FabricConnectionHealthEnum ERROR = fromString("Error"); + + /** + * Fabric connection health state - unknown type. + */ + public static final FabricConnectionHealthEnum UNKNOWN = fromString("Unknown"); + + /** + * Creates a new instance of FabricConnectionHealthEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FabricConnectionHealthEnum() { + } + + /** + * Creates or finds a FabricConnectionHealthEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding FabricConnectionHealthEnum. + */ + public static FabricConnectionHealthEnum fromString(String name) { + return fromString(name, FabricConnectionHealthEnum.class); + } + + /** + * Gets known FabricConnectionHealthEnum values. + * + * @return known FabricConnectionHealthEnum values. + */ + public static Collection values() { + return values(FabricConnectionHealthEnum.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricIntegrationStateEnum.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricIntegrationStateEnum.java new file mode 100644 index 0000000000000..dd9c279341d4c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricIntegrationStateEnum.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Fabric integration state type. + */ +public final class FabricIntegrationStateEnum extends ExpandableStringEnum { + /** + * Fabric integration state - connected type. + */ + public static final FabricIntegrationStateEnum CONNECTED = fromString("Connected"); + + /** + * Fabric integration state - disconnected type. + */ + public static final FabricIntegrationStateEnum DISCONNECTED = fromString("Disconnected"); + + /** + * Fabric integration state - misconfigured type. + */ + public static final FabricIntegrationStateEnum MISCONFIGURED = fromString("Misconfigured"); + + /** + * Fabric integration state - notapplicable type. + */ + public static final FabricIntegrationStateEnum NOT_APPLICABLE = fromString("NotApplicable"); + + /** + * Fabric integration state - connecting type. + */ + public static final FabricIntegrationStateEnum CONNECTING = fromString("Connecting"); + + /** + * Creates a new instance of FabricIntegrationStateEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FabricIntegrationStateEnum() { + } + + /** + * Creates or finds a FabricIntegrationStateEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding FabricIntegrationStateEnum. + */ + public static FabricIntegrationStateEnum fromString(String name) { + return fromString(name, FabricIntegrationStateEnum.class); + } + + /** + * Gets known FabricIntegrationStateEnum values. + * + * @return known FabricIntegrationStateEnum values. + */ + public static Collection values() { + return values(FabricIntegrationStateEnum.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricIntegrationStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricIntegrationStatus.java new file mode 100644 index 0000000000000..8762747752613 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricIntegrationStatus.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Enhanced fabric integration status with detailed health monitoring and connectivity state. + */ +@Immutable +public final class FabricIntegrationStatus implements JsonSerializable { + /* + * Current fabric integration state. + */ + private FabricIntegrationStateEnum state; + + /* + * Health status of the fabric connection. + */ + private FabricConnectionHealthEnum health; + + /* + * Timestamp of the last fabric health check as ISO 8601 string + */ + private OffsetDateTime lastChecked; + + /* + * Type of fabric resource referenced. + */ + private FabricResourceTypeEnum resourceType; + + /* + * Issues raised by fabric + */ + private List issues; + + /** + * Creates an instance of FabricIntegrationStatus class. + */ + private FabricIntegrationStatus() { + } + + /** + * Get the state property: Current fabric integration state. + * + * @return the state value. + */ + public FabricIntegrationStateEnum state() { + return this.state; + } + + /** + * Get the health property: Health status of the fabric connection. + * + * @return the health value. + */ + public FabricConnectionHealthEnum health() { + return this.health; + } + + /** + * Get the lastChecked property: Timestamp of the last fabric health check as ISO 8601 string. + * + * @return the lastChecked value. + */ + public OffsetDateTime lastChecked() { + return this.lastChecked; + } + + /** + * Get the resourceType property: Type of fabric resource referenced. + * + * @return the resourceType value. + */ + public FabricResourceTypeEnum resourceType() { + return this.resourceType; + } + + /** + * Get the issues property: Issues raised by fabric. + * + * @return the issues value. + */ + public List issues() { + return this.issues; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FabricIntegrationStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FabricIntegrationStatus if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the FabricIntegrationStatus. + */ + public static FabricIntegrationStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FabricIntegrationStatus deserializedFabricIntegrationStatus = new FabricIntegrationStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedFabricIntegrationStatus.state + = FabricIntegrationStateEnum.fromString(reader.getString()); + } else if ("health".equals(fieldName)) { + deserializedFabricIntegrationStatus.health + = FabricConnectionHealthEnum.fromString(reader.getString()); + } else if ("lastChecked".equals(fieldName)) { + deserializedFabricIntegrationStatus.lastChecked = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("resourceType".equals(fieldName)) { + deserializedFabricIntegrationStatus.resourceType + = FabricResourceTypeEnum.fromString(reader.getString()); + } else if ("issues".equals(fieldName)) { + List issues = reader.readArray(reader1 -> FabricIssue.fromJson(reader1)); + deserializedFabricIntegrationStatus.issues = issues; + } else { + reader.skipChildren(); + } + } + + return deserializedFabricIntegrationStatus; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricIssue.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricIssue.java new file mode 100644 index 0000000000000..ed7440e3af04c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricIssue.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Issues exposed by managed network fabric. + */ +@Immutable +public final class FabricIssue implements JsonSerializable { + /* + * Specific error/warning code. + */ + private String code; + + /* + * issue severity + */ + private String severity; + + /* + * Description of the issue + */ + private String message; + + /* + * specific property or resource that has the issue + */ + private String target; + + /* + * Timestamp of the issue as ISO 8601 string + */ + private OffsetDateTime timestamp; + + /** + * Creates an instance of FabricIssue class. + */ + private FabricIssue() { + } + + /** + * Get the code property: Specific error/warning code. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Get the severity property: issue severity. + * + * @return the severity value. + */ + public String severity() { + return this.severity; + } + + /** + * Get the message property: Description of the issue. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Get the target property: specific property or resource that has the issue. + * + * @return the target value. + */ + public String target() { + return this.target; + } + + /** + * Get the timestamp property: Timestamp of the issue as ISO 8601 string. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.timestamp; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FabricIssue from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FabricIssue if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the FabricIssue. + */ + public static FabricIssue fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FabricIssue deserializedFabricIssue = new FabricIssue(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + deserializedFabricIssue.code = reader.getString(); + } else if ("severity".equals(fieldName)) { + deserializedFabricIssue.severity = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedFabricIssue.message = reader.getString(); + } else if ("target".equals(fieldName)) { + deserializedFabricIssue.target = reader.getString(); + } else if ("timestamp".equals(fieldName)) { + deserializedFabricIssue.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedFabricIssue; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricResourceTypeEnum.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricResourceTypeEnum.java new file mode 100644 index 0000000000000..37acbf0c57d63 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricResourceTypeEnum.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Fabric resource type. + */ +public final class FabricResourceTypeEnum extends ExpandableStringEnum { + /** + * Fabric resource of L2IsolationDomain type. + */ + public static final FabricResourceTypeEnum L2ISOLATION_DOMAIN = fromString("L2IsolationDomain"); + + /** + * Fabric resource of L3InternalNetwork type. + */ + public static final FabricResourceTypeEnum L3INTERNAL_NETWORK = fromString("L3InternalNetwork"); + + /** + * Creates a new instance of FabricResourceTypeEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FabricResourceTypeEnum() { + } + + /** + * Creates or finds a FabricResourceTypeEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding FabricResourceTypeEnum. + */ + public static FabricResourceTypeEnum fromString(String name) { + return fromString(name, FabricResourceTypeEnum.class); + } + + /** + * Gets known FabricResourceTypeEnum values. + * + * @return known FabricResourceTypeEnum values. + */ + public static Collection values() { + return values(FabricResourceTypeEnum.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FrontendIPConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FrontendIPConfiguration.java new file mode 100644 index 0000000000000..ecd496c33144d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FrontendIPConfiguration.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * FrontendIP Configuration object for a load balancer. + */ +@Fluent +public final class FrontendIPConfiguration implements JsonSerializable { + /* + * name for the frontend IP configuration. + */ + private String name; + + /* + * properties for this frontendIPConfiguration + */ + private FrontendIPConfigurationProperties properties; + + /** + * Creates an instance of FrontendIPConfiguration class. + */ + public FrontendIPConfiguration() { + } + + /** + * Get the name property: name for the frontend IP configuration. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: name for the frontend IP configuration. + * + * @param name the name value to set. + * @return the FrontendIPConfiguration object itself. + */ + public FrontendIPConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * Get the properties property: properties for this frontendIPConfiguration. + * + * @return the properties value. + */ + public FrontendIPConfigurationProperties properties() { + return this.properties; + } + + /** + * Set the properties property: properties for this frontendIPConfiguration. + * + * @param properties the properties value to set. + * @return the FrontendIPConfiguration object itself. + */ + public FrontendIPConfiguration withProperties(FrontendIPConfigurationProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FrontendIPConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FrontendIPConfiguration if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FrontendIPConfiguration. + */ + public static FrontendIPConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FrontendIPConfiguration deserializedFrontendIPConfiguration = new FrontendIPConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedFrontendIPConfiguration.name = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedFrontendIPConfiguration.properties = FrontendIPConfigurationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFrontendIPConfiguration; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FrontendIPConfigurationProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FrontendIPConfigurationProperties.java new file mode 100644 index 0000000000000..57af3af66d52f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FrontendIPConfigurationProperties.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * FrontendIP Configuration object for a load balancer. + */ +@Fluent +public final class FrontendIPConfigurationProperties implements JsonSerializable { + /* + * Private IP Address that was allocated (dynamic) or is to be allocated (static) from the subnet. + */ + private String privateIPAddress; + + /* + * privateIPAllocationMethod - set to Static for requesting a specific IP + */ + private IpAllocationMethodEnum privateIPAllocationMethod; + + /* + * subnet - the subnet from which to allocate the private IP + */ + private VirtualNetworkSubnetArmReference subnet; + + /* + * Public IP + */ + private PublicIPAddressArmReference publicIPAddress; + + /** + * Creates an instance of FrontendIPConfigurationProperties class. + */ + public FrontendIPConfigurationProperties() { + } + + /** + * Get the privateIPAddress property: Private IP Address that was allocated (dynamic) or is to be allocated (static) + * from the subnet. + * + * @return the privateIPAddress value. + */ + public String privateIPAddress() { + return this.privateIPAddress; + } + + /** + * Set the privateIPAddress property: Private IP Address that was allocated (dynamic) or is to be allocated (static) + * from the subnet. + * + * @param privateIPAddress the privateIPAddress value to set. + * @return the FrontendIPConfigurationProperties object itself. + */ + public FrontendIPConfigurationProperties withPrivateIPAddress(String privateIPAddress) { + this.privateIPAddress = privateIPAddress; + return this; + } + + /** + * Get the privateIPAllocationMethod property: privateIPAllocationMethod - set to Static for requesting a specific + * IP. + * + * @return the privateIPAllocationMethod value. + */ + public IpAllocationMethodEnum privateIPAllocationMethod() { + return this.privateIPAllocationMethod; + } + + /** + * Set the privateIPAllocationMethod property: privateIPAllocationMethod - set to Static for requesting a specific + * IP. + * + * @param privateIPAllocationMethod the privateIPAllocationMethod value to set. + * @return the FrontendIPConfigurationProperties object itself. + */ + public FrontendIPConfigurationProperties + withPrivateIPAllocationMethod(IpAllocationMethodEnum privateIPAllocationMethod) { + this.privateIPAllocationMethod = privateIPAllocationMethod; + return this; + } + + /** + * Get the subnet property: subnet - the subnet from which to allocate the private IP. + * + * @return the subnet value. + */ + public VirtualNetworkSubnetArmReference subnet() { + return this.subnet; + } + + /** + * Set the subnet property: subnet - the subnet from which to allocate the private IP. + * + * @param subnet the subnet value to set. + * @return the FrontendIPConfigurationProperties object itself. + */ + public FrontendIPConfigurationProperties withSubnet(VirtualNetworkSubnetArmReference subnet) { + this.subnet = subnet; + return this; + } + + /** + * Get the publicIPAddress property: Public IP. + * + * @return the publicIPAddress value. + */ + public PublicIPAddressArmReference publicIPAddress() { + return this.publicIPAddress; + } + + /** + * Set the publicIPAddress property: Public IP. + * + * @param publicIPAddress the publicIPAddress value to set. + * @return the FrontendIPConfigurationProperties object itself. + */ + public FrontendIPConfigurationProperties withPublicIPAddress(PublicIPAddressArmReference publicIPAddress) { + this.publicIPAddress = publicIPAddress; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("privateIPAddress", this.privateIPAddress); + jsonWriter.writeStringField("privateIPAllocationMethod", + this.privateIPAllocationMethod == null ? null : this.privateIPAllocationMethod.toString()); + jsonWriter.writeJsonField("subnet", this.subnet); + jsonWriter.writeJsonField("publicIPAddress", this.publicIPAddress); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FrontendIPConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FrontendIPConfigurationProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the FrontendIPConfigurationProperties. + */ + public static FrontendIPConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FrontendIPConfigurationProperties deserializedFrontendIPConfigurationProperties + = new FrontendIPConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("privateIPAddress".equals(fieldName)) { + deserializedFrontendIPConfigurationProperties.privateIPAddress = reader.getString(); + } else if ("privateIPAllocationMethod".equals(fieldName)) { + deserializedFrontendIPConfigurationProperties.privateIPAllocationMethod + = IpAllocationMethodEnum.fromString(reader.getString()); + } else if ("subnet".equals(fieldName)) { + deserializedFrontendIPConfigurationProperties.subnet + = VirtualNetworkSubnetArmReference.fromJson(reader); + } else if ("publicIPAddress".equals(fieldName)) { + deserializedFrontendIPConfigurationProperties.publicIPAddress + = PublicIPAddressArmReference.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFrontendIPConfigurationProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageProperties.java index 9b9ee9f64ff1c..e3d9a7919efe3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageProperties.java @@ -41,11 +41,6 @@ public final class GalleryImageProperties implements JsonSerializable virtualMachineGPUs; + /* + * Dynamic memory config for day-2 updates and static-to-dynamic conversion of the virtual machine instance. + */ + private VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig dynamicMemoryConfig; + /** * Creates an instance of HardwareProfileUpdate class. */ @@ -124,6 +129,29 @@ public HardwareProfileUpdate withVirtualMachineGPUs( return this; } + /** + * Get the dynamicMemoryConfig property: Dynamic memory config for day-2 updates and static-to-dynamic conversion of + * the virtual machine instance. + * + * @return the dynamicMemoryConfig value. + */ + public VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig dynamicMemoryConfig() { + return this.dynamicMemoryConfig; + } + + /** + * Set the dynamicMemoryConfig property: Dynamic memory config for day-2 updates and static-to-dynamic conversion of + * the virtual machine instance. + * + * @param dynamicMemoryConfig the dynamicMemoryConfig value to set. + * @return the HardwareProfileUpdate object itself. + */ + public HardwareProfileUpdate withDynamicMemoryConfig( + VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig dynamicMemoryConfig) { + this.dynamicMemoryConfig = dynamicMemoryConfig; + return this; + } + /** * {@inheritDoc} */ @@ -135,6 +163,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeNumberField("memoryMB", this.memoryMB); jsonWriter.writeArrayField("virtualMachineGPUs", this.virtualMachineGPUs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("dynamicMemoryConfig", this.dynamicMemoryConfig); return jsonWriter.writeEndObject(); } @@ -164,6 +193,9 @@ public static HardwareProfileUpdate fromJson(JsonReader jsonReader) throws IOExc = reader.readArray(reader1 -> VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU .fromJson(reader1)); deserializedHardwareProfileUpdate.virtualMachineGPUs = virtualMachineGPUs; + } else if ("dynamicMemoryConfig".equals(fieldName)) { + deserializedHardwareProfileUpdate.dynamicMemoryConfig + = VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/HyperVGeneration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/HyperVGeneration.java index 55872560d0379..f1af18b25985e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/HyperVGeneration.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/HyperVGeneration.java @@ -21,6 +21,11 @@ public final class HyperVGeneration extends ExpandableStringEnum { + /* + * The Azure Resource ID of an IPConfiguration resource + */ + private String resourceId; + + /** + * Creates an instance of IPConfigurationArmReference class. + */ + public IPConfigurationArmReference() { + } + + /** + * Get the resourceId property: The Azure Resource ID of an IPConfiguration resource. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The Azure Resource ID of an IPConfiguration resource. + * + * @param resourceId the resourceId value to set. + * @return the IPConfigurationArmReference object itself. + */ + public IPConfigurationArmReference withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IPConfigurationArmReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IPConfigurationArmReference if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the IPConfigurationArmReference. + */ + public static IPConfigurationArmReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IPConfigurationArmReference deserializedIPConfigurationArmReference = new IPConfigurationArmReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedIPConfigurationArmReference.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIPConfigurationArmReference; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ImageArmReference.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ImageArmReference.java index 4dd7f0036acb3..1f26fe8b7ab29 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ImageArmReference.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ImageArmReference.java @@ -12,12 +12,12 @@ import java.io.IOException; /** - * The ARM ID for a Gallery Image. + * The Azure Resource ID for a Gallery Image. */ @Fluent public final class ImageArmReference implements JsonSerializable { /* - * The ARM ID for an image resource used by the virtual machine instance. + * The Azure Resource ID for an image resource used by the virtual machine instance. */ private String id; @@ -28,7 +28,7 @@ public ImageArmReference() { } /** - * Get the id property: The ARM ID for an image resource used by the virtual machine instance. + * Get the id property: The Azure Resource ID for an image resource used by the virtual machine instance. * * @return the id value. */ @@ -37,7 +37,7 @@ public String id() { } /** - * Set the id property: The ARM ID for an image resource used by the virtual machine instance. + * Set the id property: The Azure Resource ID for an image resource used by the virtual machine instance. * * @param id the id value to set. * @return the ImageArmReference object itself. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundNATRuleProtocol.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundNATRuleProtocol.java new file mode 100644 index 0000000000000..aced72b033878 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundNATRuleProtocol.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Protocol for inbound NAT rules. + */ +public final class InboundNATRuleProtocol extends ExpandableStringEnum { + /** + * TCP - load balance only tcp traffic. + */ + public static final InboundNATRuleProtocol TCP = fromString("Tcp"); + + /** + * Udp - load balance only UDP traffic. + */ + public static final InboundNATRuleProtocol UDP = fromString("Udp"); + + /** + * Creates a new instance of InboundNATRuleProtocol value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InboundNATRuleProtocol() { + } + + /** + * Creates or finds a InboundNATRuleProtocol from its string representation. + * + * @param name a name to look for. + * @return the corresponding InboundNATRuleProtocol. + */ + public static InboundNATRuleProtocol fromString(String name) { + return fromString(name, InboundNATRuleProtocol.class); + } + + /** + * Gets known InboundNATRuleProtocol values. + * + * @return known InboundNATRuleProtocol values. + */ + public static Collection values() { + return values(InboundNATRuleProtocol.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRule.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRule.java new file mode 100644 index 0000000000000..b9579b60a3943 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRule.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.InboundRuleInner; + +/** + * An immutable client-side representation of InboundRule. + */ +public interface InboundRule { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + InboundRuleProperties properties(); + + /** + * Gets the extendedLocation property: The extendedLocation of the resource. + * + * @return the extendedLocation value. + */ + ExtendedLocation extendedLocation(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.vm.fluent.models.InboundRuleInner object. + * + * @return the inner object. + */ + InboundRuleInner innerModel(); + + /** + * The entirety of the InboundRule definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The InboundRule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the InboundRule definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the InboundRule definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, natGatewayName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @return the next definition stage. + */ + WithCreate withExistingNatGateway(String resourceGroupName, String natGatewayName); + } + + /** + * The stage of the InboundRule definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties, DefinitionStages.WithExtendedLocation { + /** + * Executes the create request. + * + * @return the created resource. + */ + InboundRule create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + InboundRule create(Context context); + } + + /** + * The stage of the InboundRule definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(InboundRuleProperties properties); + } + + /** + * The stage of the InboundRule definition allowing to specify extendedLocation. + */ + interface WithExtendedLocation { + /** + * Specifies the extendedLocation property: The extendedLocation of the resource.. + * + * @param extendedLocation The extendedLocation of the resource. + * @return the next definition stage. + */ + WithCreate withExtendedLocation(ExtendedLocation extendedLocation); + } + } + + /** + * Begins update for the InboundRule resource. + * + * @return the stage of resource update. + */ + InboundRule.Update update(); + + /** + * The template for InboundRule update. + */ + interface Update extends UpdateStages.WithProperties, UpdateStages.WithExtendedLocation { + /** + * Executes the update request. + * + * @return the updated resource. + */ + InboundRule apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + InboundRule apply(Context context); + } + + /** + * The InboundRule update stages. + */ + interface UpdateStages { + /** + * The stage of the InboundRule update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(InboundRuleProperties properties); + } + + /** + * The stage of the InboundRule update allowing to specify extendedLocation. + */ + interface WithExtendedLocation { + /** + * Specifies the extendedLocation property: The extendedLocation of the resource.. + * + * @param extendedLocation The extendedLocation of the resource. + * @return the next definition stage. + */ + Update withExtendedLocation(ExtendedLocation extendedLocation); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + InboundRule refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + InboundRule refresh(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRuleProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRuleProperties.java new file mode 100644 index 0000000000000..28b16e33486bb --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRuleProperties.java @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Inbound rule properties - extends InboundNATRuleProperties with additional status tracking. + */ +@Fluent +public final class InboundRuleProperties implements JsonSerializable { + /* + * Protocol for the NAT rule + */ + private InboundNATRuleProtocol protocol; + + /* + * Frontend Port for the inbound rule + */ + private int frontendPort; + + /* + * backend Port for the inbound rule + */ + private int backendPort; + + /* + * IP configuration for the target backend. + */ + private IPConfigurationArmReference backendIPConfiguration; + + /* + * Public IP Address for this NAT rule + */ + private PublicIPAddressArmReference publicIPAddress; + + /* + * Provisioning state of the inbound rule + */ + private ProvisioningStateEnum provisioningState; + + /* + * The observed state of Inbound Rule + */ + private InboundRuleStatus status; + + /** + * Creates an instance of InboundRuleProperties class. + */ + public InboundRuleProperties() { + } + + /** + * Get the protocol property: Protocol for the NAT rule. + * + * @return the protocol value. + */ + public InboundNATRuleProtocol protocol() { + return this.protocol; + } + + /** + * Set the protocol property: Protocol for the NAT rule. + * + * @param protocol the protocol value to set. + * @return the InboundRuleProperties object itself. + */ + public InboundRuleProperties withProtocol(InboundNATRuleProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the frontendPort property: Frontend Port for the inbound rule. + * + * @return the frontendPort value. + */ + public int frontendPort() { + return this.frontendPort; + } + + /** + * Set the frontendPort property: Frontend Port for the inbound rule. + * + * @param frontendPort the frontendPort value to set. + * @return the InboundRuleProperties object itself. + */ + public InboundRuleProperties withFrontendPort(int frontendPort) { + this.frontendPort = frontendPort; + return this; + } + + /** + * Get the backendPort property: backend Port for the inbound rule. + * + * @return the backendPort value. + */ + public int backendPort() { + return this.backendPort; + } + + /** + * Set the backendPort property: backend Port for the inbound rule. + * + * @param backendPort the backendPort value to set. + * @return the InboundRuleProperties object itself. + */ + public InboundRuleProperties withBackendPort(int backendPort) { + this.backendPort = backendPort; + return this; + } + + /** + * Get the backendIPConfiguration property: IP configuration for the target backend. + * + * @return the backendIPConfiguration value. + */ + public IPConfigurationArmReference backendIPConfiguration() { + return this.backendIPConfiguration; + } + + /** + * Set the backendIPConfiguration property: IP configuration for the target backend. + * + * @param backendIPConfiguration the backendIPConfiguration value to set. + * @return the InboundRuleProperties object itself. + */ + public InboundRuleProperties withBackendIPConfiguration(IPConfigurationArmReference backendIPConfiguration) { + this.backendIPConfiguration = backendIPConfiguration; + return this; + } + + /** + * Get the publicIPAddress property: Public IP Address for this NAT rule. + * + * @return the publicIPAddress value. + */ + public PublicIPAddressArmReference publicIPAddress() { + return this.publicIPAddress; + } + + /** + * Set the publicIPAddress property: Public IP Address for this NAT rule. + * + * @param publicIPAddress the publicIPAddress value to set. + * @return the InboundRuleProperties object itself. + */ + public InboundRuleProperties withPublicIPAddress(PublicIPAddressArmReference publicIPAddress) { + this.publicIPAddress = publicIPAddress; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the inbound rule. + * + * @return the provisioningState value. + */ + public ProvisioningStateEnum provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: The observed state of Inbound Rule. + * + * @return the status value. + */ + public InboundRuleStatus status() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("protocol", this.protocol == null ? null : this.protocol.toString()); + jsonWriter.writeIntField("frontendPort", this.frontendPort); + jsonWriter.writeIntField("backendPort", this.backendPort); + jsonWriter.writeJsonField("backendIPConfiguration", this.backendIPConfiguration); + jsonWriter.writeJsonField("publicIPAddress", this.publicIPAddress); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InboundRuleProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InboundRuleProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the InboundRuleProperties. + */ + public static InboundRuleProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InboundRuleProperties deserializedInboundRuleProperties = new InboundRuleProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("protocol".equals(fieldName)) { + deserializedInboundRuleProperties.protocol = InboundNATRuleProtocol.fromString(reader.getString()); + } else if ("frontendPort".equals(fieldName)) { + deserializedInboundRuleProperties.frontendPort = reader.getInt(); + } else if ("backendPort".equals(fieldName)) { + deserializedInboundRuleProperties.backendPort = reader.getInt(); + } else if ("backendIPConfiguration".equals(fieldName)) { + deserializedInboundRuleProperties.backendIPConfiguration + = IPConfigurationArmReference.fromJson(reader); + } else if ("publicIPAddress".equals(fieldName)) { + deserializedInboundRuleProperties.publicIPAddress = PublicIPAddressArmReference.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedInboundRuleProperties.provisioningState + = ProvisioningStateEnum.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedInboundRuleProperties.status = InboundRuleStatus.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInboundRuleProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRuleStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRuleStatus.java new file mode 100644 index 0000000000000..dbfcf0dc4757a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRuleStatus.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The observed state of inbound rule. + */ +@Immutable +public final class InboundRuleStatus implements JsonSerializable { + /* + * InboundRule provisioning error code + */ + private String errorCode; + + /* + * Descriptive error message + */ + private String errorMessage; + + /* + * InboundRule provisioning status + */ + private InboundRuleStatusProvisioningStatus provisioningStatus; + + /** + * Creates an instance of InboundRuleStatus class. + */ + private InboundRuleStatus() { + } + + /** + * Get the errorCode property: InboundRule provisioning error code. + * + * @return the errorCode value. + */ + public String errorCode() { + return this.errorCode; + } + + /** + * Get the errorMessage property: Descriptive error message. + * + * @return the errorMessage value. + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Get the provisioningStatus property: InboundRule provisioning status. + * + * @return the provisioningStatus value. + */ + public InboundRuleStatusProvisioningStatus provisioningStatus() { + return this.provisioningStatus; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("errorCode", this.errorCode); + jsonWriter.writeStringField("errorMessage", this.errorMessage); + jsonWriter.writeJsonField("provisioningStatus", this.provisioningStatus); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InboundRuleStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InboundRuleStatus if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the InboundRuleStatus. + */ + public static InboundRuleStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InboundRuleStatus deserializedInboundRuleStatus = new InboundRuleStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("errorCode".equals(fieldName)) { + deserializedInboundRuleStatus.errorCode = reader.getString(); + } else if ("errorMessage".equals(fieldName)) { + deserializedInboundRuleStatus.errorMessage = reader.getString(); + } else if ("provisioningStatus".equals(fieldName)) { + deserializedInboundRuleStatus.provisioningStatus + = InboundRuleStatusProvisioningStatus.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInboundRuleStatus; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRuleStatusProvisioningStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRuleStatusProvisioningStatus.java new file mode 100644 index 0000000000000..30855aa15bdb9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRuleStatusProvisioningStatus.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Provisioning status of Inbound Rule. + */ +@Immutable +public final class InboundRuleStatusProvisioningStatus + implements JsonSerializable { + /* + * The ID of the operation performed on the inbound rule + */ + private String operationId; + + /* + * The status of the operation performed on the inbound rule [Succeeded, Failed, InProgress] + */ + private Status status; + + /** + * Creates an instance of InboundRuleStatusProvisioningStatus class. + */ + private InboundRuleStatusProvisioningStatus() { + } + + /** + * Get the operationId property: The ID of the operation performed on the inbound rule. + * + * @return the operationId value. + */ + public String operationId() { + return this.operationId; + } + + /** + * Get the status property: The status of the operation performed on the inbound rule [Succeeded, Failed, + * InProgress]. + * + * @return the status value. + */ + public Status status() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("operationId", this.operationId); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InboundRuleStatusProvisioningStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InboundRuleStatusProvisioningStatus if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InboundRuleStatusProvisioningStatus. + */ + public static InboundRuleStatusProvisioningStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InboundRuleStatusProvisioningStatus deserializedInboundRuleStatusProvisioningStatus + = new InboundRuleStatusProvisioningStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operationId".equals(fieldName)) { + deserializedInboundRuleStatusProvisioningStatus.operationId = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedInboundRuleStatusProvisioningStatus.status = Status.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedInboundRuleStatusProvisioningStatus; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRules.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRules.java new file mode 100644 index 0000000000000..4855835288cad --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRules.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of InboundRules. + */ +public interface InboundRules { + /** + * The operation to get an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the inbound rule resource definition along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String natGatewayName, String inboundRuleName, + Context context); + + /** + * The operation to get an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the inbound rule resource definition. + */ + InboundRule get(String resourceGroupName, String natGatewayName, String inboundRuleName); + + /** + * The operation to delete an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String natGatewayName, String inboundRuleName); + + /** + * The operation to delete an inbound rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param inboundRuleName Name of the inbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String natGatewayName, String inboundRuleName, Context context); + + /** + * Lists all of the inbound rules in the specified NAT gateway. Use the nextLink property in the response to get the + * next page of inbound rules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InboundRule list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByNatGateway(String resourceGroupName, String natGatewayName); + + /** + * Lists all of the inbound rules in the specified NAT gateway. Use the nextLink property in the response to get the + * next page of inbound rules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a InboundRule list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByNatGateway(String resourceGroupName, String natGatewayName, Context context); + + /** + * The operation to get an inbound rule. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the inbound rule resource definition along with {@link Response}. + */ + InboundRule getById(String id); + + /** + * The operation to get an inbound rule. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the inbound rule resource definition along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * The operation to delete an inbound rule. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * The operation to delete an inbound rule. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new InboundRule resource. + * + * @param name resource name. + * @return the first stage of the new InboundRule definition. + */ + InboundRule.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancer.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancer.java new file mode 100644 index 0000000000000..2be07039360bb --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancer.java @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.LoadBalancerInner; +import java.util.Map; + +/** + * An immutable client-side representation of LoadBalancer. + */ +public interface LoadBalancer { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + LoadBalancerProperties properties(); + + /** + * Gets the extendedLocation property: The extendedLocation of the resource. + * + * @return the extendedLocation value. + */ + ExtendedLocation extendedLocation(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.vm.fluent.models.LoadBalancerInner object. + * + * @return the inner object. + */ + LoadBalancerInner innerModel(); + + /** + * The entirety of the LoadBalancer definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The LoadBalancer definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the LoadBalancer definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the LoadBalancer definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the LoadBalancer definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the LoadBalancer definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithExtendedLocation { + /** + * Executes the create request. + * + * @return the created resource. + */ + LoadBalancer create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + LoadBalancer create(Context context); + } + + /** + * The stage of the LoadBalancer definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the LoadBalancer definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(LoadBalancerProperties properties); + } + + /** + * The stage of the LoadBalancer definition allowing to specify extendedLocation. + */ + interface WithExtendedLocation { + /** + * Specifies the extendedLocation property: The extendedLocation of the resource.. + * + * @param extendedLocation The extendedLocation of the resource. + * @return the next definition stage. + */ + WithCreate withExtendedLocation(ExtendedLocation extendedLocation); + } + } + + /** + * Begins update for the LoadBalancer resource. + * + * @return the stage of resource update. + */ + LoadBalancer.Update update(); + + /** + * The template for LoadBalancer update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + LoadBalancer apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + LoadBalancer apply(Context context); + } + + /** + * The LoadBalancer update stages. + */ + interface UpdateStages { + /** + * The stage of the LoadBalancer update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + LoadBalancer refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + LoadBalancer refresh(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerBackendAddress.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerBackendAddress.java new file mode 100644 index 0000000000000..acefd3cf3dcc3 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerBackendAddress.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * LoadBalancer Backend Address. + */ +@Fluent +public final class LoadBalancerBackendAddress implements JsonSerializable { + /* + * name of the backend address + */ + private String name; + + /* + * backend address properties + */ + private LoadBalancerBackendAddressProperties properties; + + /** + * Creates an instance of LoadBalancerBackendAddress class. + */ + public LoadBalancerBackendAddress() { + } + + /** + * Get the name property: name of the backend address. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: name of the backend address. + * + * @param name the name value to set. + * @return the LoadBalancerBackendAddress object itself. + */ + public LoadBalancerBackendAddress withName(String name) { + this.name = name; + return this; + } + + /** + * Get the properties property: backend address properties. + * + * @return the properties value. + */ + public LoadBalancerBackendAddressProperties properties() { + return this.properties; + } + + /** + * Set the properties property: backend address properties. + * + * @param properties the properties value to set. + * @return the LoadBalancerBackendAddress object itself. + */ + public LoadBalancerBackendAddress withProperties(LoadBalancerBackendAddressProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerBackendAddress from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerBackendAddress if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LoadBalancerBackendAddress. + */ + public static LoadBalancerBackendAddress fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerBackendAddress deserializedLoadBalancerBackendAddress = new LoadBalancerBackendAddress(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedLoadBalancerBackendAddress.name = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedLoadBalancerBackendAddress.properties + = LoadBalancerBackendAddressProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerBackendAddress; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerBackendAddressAdminState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerBackendAddressAdminState.java new file mode 100644 index 0000000000000..45dbe92f44376 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerBackendAddressAdminState.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Backend Address Admin states. + */ +public final class LoadBalancerBackendAddressAdminState + extends ExpandableStringEnum { + /** + * Up - forced admin state up. + */ + public static final LoadBalancerBackendAddressAdminState UP = fromString("Up"); + + /** + * Down - forced admin state down. + */ + public static final LoadBalancerBackendAddressAdminState DOWN = fromString("Down"); + + /** + * Creates a new instance of LoadBalancerBackendAddressAdminState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LoadBalancerBackendAddressAdminState() { + } + + /** + * Creates or finds a LoadBalancerBackendAddressAdminState from its string representation. + * + * @param name a name to look for. + * @return the corresponding LoadBalancerBackendAddressAdminState. + */ + public static LoadBalancerBackendAddressAdminState fromString(String name) { + return fromString(name, LoadBalancerBackendAddressAdminState.class); + } + + /** + * Gets known LoadBalancerBackendAddressAdminState values. + * + * @return known LoadBalancerBackendAddressAdminState values. + */ + public static Collection values() { + return values(LoadBalancerBackendAddressAdminState.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerBackendAddressPoolReference.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerBackendAddressPoolReference.java new file mode 100644 index 0000000000000..b90a8df1f4f5a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerBackendAddressPoolReference.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reference to a LoadBalancer backend address pool reference. + */ +@Fluent +public final class LoadBalancerBackendAddressPoolReference + implements JsonSerializable { + /* + * name of the backend address pool + */ + private String name; + + /** + * Creates an instance of LoadBalancerBackendAddressPoolReference class. + */ + public LoadBalancerBackendAddressPoolReference() { + } + + /** + * Get the name property: name of the backend address pool. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: name of the backend address pool. + * + * @param name the name value to set. + * @return the LoadBalancerBackendAddressPoolReference object itself. + */ + public LoadBalancerBackendAddressPoolReference withName(String name) { + this.name = name; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerBackendAddressPoolReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerBackendAddressPoolReference if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LoadBalancerBackendAddressPoolReference. + */ + public static LoadBalancerBackendAddressPoolReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerBackendAddressPoolReference deserializedLoadBalancerBackendAddressPoolReference + = new LoadBalancerBackendAddressPoolReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedLoadBalancerBackendAddressPoolReference.name = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerBackendAddressPoolReference; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerBackendAddressProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerBackendAddressProperties.java new file mode 100644 index 0000000000000..b3d7ae8c793ce --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerBackendAddressProperties.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * LoadBalancer Backend Address properties. + */ +@Fluent +public final class LoadBalancerBackendAddressProperties + implements JsonSerializable { + /* + * admin state - if set to false, the address is removed from the pool + */ + private LoadBalancerBackendAddressAdminState adminState; + + /* + * IP address of the backend target. Populated automatically from the referenced IP configuration. + */ + private String ipAddress; + + /* + * Reference to the subnet containing the backend address. Populated automatically from the referenced IP + * configuration. Mutually exclusive with logicalNetwork. + */ + private VirtualNetworkSubnetArmReference subnet; + + /* + * Reference to the virtual network containing the backend address. Populated automatically from the referenced IP + * configuration. Mutually exclusive with logicalNetwork. + */ + private VirtualNetworkArmReference virtualNetwork; + + /* + * Reference to the logical network containing this backend address. Populated automatically from the referenced IP + * configuration. Mutually exclusive with subnet and virtualNetwork. + */ + private LogicalNetworkArmReference logicalNetwork; + + /* + * Nic Based backend-ip association + */ + private IPConfigurationArmReference networkInterfaceIPConfiguration; + + /** + * Creates an instance of LoadBalancerBackendAddressProperties class. + */ + public LoadBalancerBackendAddressProperties() { + } + + /** + * Get the adminState property: admin state - if set to false, the address is removed from the pool. + * + * @return the adminState value. + */ + public LoadBalancerBackendAddressAdminState adminState() { + return this.adminState; + } + + /** + * Set the adminState property: admin state - if set to false, the address is removed from the pool. + * + * @param adminState the adminState value to set. + * @return the LoadBalancerBackendAddressProperties object itself. + */ + public LoadBalancerBackendAddressProperties withAdminState(LoadBalancerBackendAddressAdminState adminState) { + this.adminState = adminState; + return this; + } + + /** + * Get the ipAddress property: IP address of the backend target. Populated automatically from the referenced IP + * configuration. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Get the subnet property: Reference to the subnet containing the backend address. Populated automatically from the + * referenced IP configuration. Mutually exclusive with logicalNetwork. + * + * @return the subnet value. + */ + public VirtualNetworkSubnetArmReference subnet() { + return this.subnet; + } + + /** + * Get the virtualNetwork property: Reference to the virtual network containing the backend address. Populated + * automatically from the referenced IP configuration. Mutually exclusive with logicalNetwork. + * + * @return the virtualNetwork value. + */ + public VirtualNetworkArmReference virtualNetwork() { + return this.virtualNetwork; + } + + /** + * Get the logicalNetwork property: Reference to the logical network containing this backend address. Populated + * automatically from the referenced IP configuration. Mutually exclusive with subnet and virtualNetwork. + * + * @return the logicalNetwork value. + */ + public LogicalNetworkArmReference logicalNetwork() { + return this.logicalNetwork; + } + + /** + * Get the networkInterfaceIPConfiguration property: Nic Based backend-ip association. + * + * @return the networkInterfaceIPConfiguration value. + */ + public IPConfigurationArmReference networkInterfaceIPConfiguration() { + return this.networkInterfaceIPConfiguration; + } + + /** + * Set the networkInterfaceIPConfiguration property: Nic Based backend-ip association. + * + * @param networkInterfaceIPConfiguration the networkInterfaceIPConfiguration value to set. + * @return the LoadBalancerBackendAddressProperties object itself. + */ + public LoadBalancerBackendAddressProperties + withNetworkInterfaceIPConfiguration(IPConfigurationArmReference networkInterfaceIPConfiguration) { + this.networkInterfaceIPConfiguration = networkInterfaceIPConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("adminState", this.adminState == null ? null : this.adminState.toString()); + jsonWriter.writeJsonField("networkInterfaceIPConfiguration", this.networkInterfaceIPConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerBackendAddressProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerBackendAddressProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LoadBalancerBackendAddressProperties. + */ + public static LoadBalancerBackendAddressProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerBackendAddressProperties deserializedLoadBalancerBackendAddressProperties + = new LoadBalancerBackendAddressProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("adminState".equals(fieldName)) { + deserializedLoadBalancerBackendAddressProperties.adminState + = LoadBalancerBackendAddressAdminState.fromString(reader.getString()); + } else if ("ipAddress".equals(fieldName)) { + deserializedLoadBalancerBackendAddressProperties.ipAddress = reader.getString(); + } else if ("subnet".equals(fieldName)) { + deserializedLoadBalancerBackendAddressProperties.subnet + = VirtualNetworkSubnetArmReference.fromJson(reader); + } else if ("virtualNetwork".equals(fieldName)) { + deserializedLoadBalancerBackendAddressProperties.virtualNetwork + = VirtualNetworkArmReference.fromJson(reader); + } else if ("logicalNetwork".equals(fieldName)) { + deserializedLoadBalancerBackendAddressProperties.logicalNetwork + = LogicalNetworkArmReference.fromJson(reader); + } else if ("networkInterfaceIPConfiguration".equals(fieldName)) { + deserializedLoadBalancerBackendAddressProperties.networkInterfaceIPConfiguration + = IPConfigurationArmReference.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerBackendAddressProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerFrontendIPConfigurationReference.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerFrontendIPConfigurationReference.java new file mode 100644 index 0000000000000..7d7bc93007a1a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerFrontendIPConfigurationReference.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reference to a LoadBalancer Frontend IPConfiguration. + */ +@Fluent +public final class LoadBalancerFrontendIPConfigurationReference + implements JsonSerializable { + /* + * name of the frontnedIPConfiguration + */ + private String name; + + /** + * Creates an instance of LoadBalancerFrontendIPConfigurationReference class. + */ + public LoadBalancerFrontendIPConfigurationReference() { + } + + /** + * Get the name property: name of the frontnedIPConfiguration. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: name of the frontnedIPConfiguration. + * + * @param name the name value to set. + * @return the LoadBalancerFrontendIPConfigurationReference object itself. + */ + public LoadBalancerFrontendIPConfigurationReference withName(String name) { + this.name = name; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerFrontendIPConfigurationReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerFrontendIPConfigurationReference if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LoadBalancerFrontendIPConfigurationReference. + */ + public static LoadBalancerFrontendIPConfigurationReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerFrontendIPConfigurationReference deserializedLoadBalancerFrontendIPConfigurationReference + = new LoadBalancerFrontendIPConfigurationReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedLoadBalancerFrontendIPConfigurationReference.name = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerFrontendIPConfigurationReference; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerProbeProtocol.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerProbeProtocol.java new file mode 100644 index 0000000000000..1fb87a8eaabca --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerProbeProtocol.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Protocol for health probes. + */ +public final class LoadBalancerProbeProtocol extends ExpandableStringEnum { + /** + * TCP - TCP port checking. + */ + public static final LoadBalancerProbeProtocol TCP = fromString("Tcp"); + + /** + * HTTP - HTTP request. + */ + public static final LoadBalancerProbeProtocol HTTP = fromString("Http"); + + /** + * Creates a new instance of LoadBalancerProbeProtocol value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LoadBalancerProbeProtocol() { + } + + /** + * Creates or finds a LoadBalancerProbeProtocol from its string representation. + * + * @param name a name to look for. + * @return the corresponding LoadBalancerProbeProtocol. + */ + public static LoadBalancerProbeProtocol fromString(String name) { + return fromString(name, LoadBalancerProbeProtocol.class); + } + + /** + * Gets known LoadBalancerProbeProtocol values. + * + * @return known LoadBalancerProbeProtocol values. + */ + public static Collection values() { + return values(LoadBalancerProbeProtocol.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerProbeReference.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerProbeReference.java new file mode 100644 index 0000000000000..8afd514728486 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerProbeReference.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reference to a LoadBalancer health probe. + */ +@Fluent +public final class LoadBalancerProbeReference implements JsonSerializable { + /* + * name of the health probe + */ + private String name; + + /** + * Creates an instance of LoadBalancerProbeReference class. + */ + public LoadBalancerProbeReference() { + } + + /** + * Get the name property: name of the health probe. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: name of the health probe. + * + * @param name the name value to set. + * @return the LoadBalancerProbeReference object itself. + */ + public LoadBalancerProbeReference withName(String name) { + this.name = name; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerProbeReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerProbeReference if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LoadBalancerProbeReference. + */ + public static LoadBalancerProbeReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerProbeReference deserializedLoadBalancerProbeReference = new LoadBalancerProbeReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedLoadBalancerProbeReference.name = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerProbeReference; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerProperties.java new file mode 100644 index 0000000000000..cd4a9fd4b1290 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerProperties.java @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Load Balancer resource properties. + */ +@Fluent +public final class LoadBalancerProperties implements JsonSerializable { + /* + * Frontend IPs for the loadbalancer. + */ + private List frontendIPConfigurations; + + /* + * backendAddressPools for the loadbalancer + */ + private List backendAddressPools; + + /* + * load balancer rules + */ + private List loadBalancingRules; + + /* + * load balancer health probes + */ + private List probes; + + /* + * Provisioning state of the Load Balancer + */ + private ProvisioningStateEnum provisioningState; + + /* + * observed state of the load balancer + */ + private LoadBalancerStatus status; + + /** + * Creates an instance of LoadBalancerProperties class. + */ + public LoadBalancerProperties() { + } + + /** + * Get the frontendIPConfigurations property: Frontend IPs for the loadbalancer. + * + * @return the frontendIPConfigurations value. + */ + public List frontendIPConfigurations() { + return this.frontendIPConfigurations; + } + + /** + * Set the frontendIPConfigurations property: Frontend IPs for the loadbalancer. + * + * @param frontendIPConfigurations the frontendIPConfigurations value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withFrontendIPConfigurations(List frontendIPConfigurations) { + this.frontendIPConfigurations = frontendIPConfigurations; + return this; + } + + /** + * Get the backendAddressPools property: backendAddressPools for the loadbalancer. + * + * @return the backendAddressPools value. + */ + public List backendAddressPools() { + return this.backendAddressPools; + } + + /** + * Set the backendAddressPools property: backendAddressPools for the loadbalancer. + * + * @param backendAddressPools the backendAddressPools value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withBackendAddressPools(List backendAddressPools) { + this.backendAddressPools = backendAddressPools; + return this; + } + + /** + * Get the loadBalancingRules property: load balancer rules. + * + * @return the loadBalancingRules value. + */ + public List loadBalancingRules() { + return this.loadBalancingRules; + } + + /** + * Set the loadBalancingRules property: load balancer rules. + * + * @param loadBalancingRules the loadBalancingRules value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withLoadBalancingRules(List loadBalancingRules) { + this.loadBalancingRules = loadBalancingRules; + return this; + } + + /** + * Get the probes property: load balancer health probes. + * + * @return the probes value. + */ + public List probes() { + return this.probes; + } + + /** + * Set the probes property: load balancer health probes. + * + * @param probes the probes value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withProbes(List probes) { + this.probes = probes; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the Load Balancer. + * + * @return the provisioningState value. + */ + public ProvisioningStateEnum provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: observed state of the load balancer. + * + * @return the status value. + */ + public LoadBalancerStatus status() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("frontendIPConfigurations", this.frontendIPConfigurations, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("backendAddressPools", this.backendAddressPools, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("loadBalancingRules", this.loadBalancingRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("probes", this.probes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LoadBalancerProperties. + */ + public static LoadBalancerProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerProperties deserializedLoadBalancerProperties = new LoadBalancerProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("frontendIPConfigurations".equals(fieldName)) { + List frontendIPConfigurations + = reader.readArray(reader1 -> FrontendIPConfiguration.fromJson(reader1)); + deserializedLoadBalancerProperties.frontendIPConfigurations = frontendIPConfigurations; + } else if ("backendAddressPools".equals(fieldName)) { + List backendAddressPools + = reader.readArray(reader1 -> BackendAddressPool.fromJson(reader1)); + deserializedLoadBalancerProperties.backendAddressPools = backendAddressPools; + } else if ("loadBalancingRules".equals(fieldName)) { + List loadBalancingRules + = reader.readArray(reader1 -> LoadBalancerRule.fromJson(reader1)); + deserializedLoadBalancerProperties.loadBalancingRules = loadBalancingRules; + } else if ("probes".equals(fieldName)) { + List probes = reader.readArray(reader1 -> Probe.fromJson(reader1)); + deserializedLoadBalancerProperties.probes = probes; + } else if ("provisioningState".equals(fieldName)) { + deserializedLoadBalancerProperties.provisioningState + = ProvisioningStateEnum.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedLoadBalancerProperties.status = LoadBalancerStatus.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerRule.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerRule.java new file mode 100644 index 0000000000000..d31b1c130d486 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerRule.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * LoadBalancer Rules. + */ +@Fluent +public final class LoadBalancerRule implements JsonSerializable { + /* + * name of the load balancer rule + */ + private String name; + + /* + * load balancer rule properties + */ + private LoadBalancerRuleProperties properties; + + /** + * Creates an instance of LoadBalancerRule class. + */ + public LoadBalancerRule() { + } + + /** + * Get the name property: name of the load balancer rule. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: name of the load balancer rule. + * + * @param name the name value to set. + * @return the LoadBalancerRule object itself. + */ + public LoadBalancerRule withName(String name) { + this.name = name; + return this; + } + + /** + * Get the properties property: load balancer rule properties. + * + * @return the properties value. + */ + public LoadBalancerRuleProperties properties() { + return this.properties; + } + + /** + * Set the properties property: load balancer rule properties. + * + * @param properties the properties value to set. + * @return the LoadBalancerRule object itself. + */ + public LoadBalancerRule withProperties(LoadBalancerRuleProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerRule if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LoadBalancerRule. + */ + public static LoadBalancerRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerRule deserializedLoadBalancerRule = new LoadBalancerRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedLoadBalancerRule.name = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedLoadBalancerRule.properties = LoadBalancerRuleProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerRule; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerRuleProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerRuleProperties.java new file mode 100644 index 0000000000000..a861b1b35d484 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerRuleProperties.java @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Properties for LoadBalancerRules. + */ +@Fluent +public final class LoadBalancerRuleProperties implements JsonSerializable { + /* + * arm reference to frontend IP being used by this LB + */ + private LoadBalancerFrontendIPConfigurationReference frontendIPConfiguration; + + /* + * arm reference to backend pool being used by ths pool + */ + private LoadBalancerBackendAddressPoolReference backendAddressPool; + + /* + * Frontend port to accept connections + */ + private int frontendPort; + + /* + * backendPort to forward connections + */ + private int backendPort; + + /* + * IP Protocol that the rule must load-balance + */ + private LoadBalancerRuleTransportProtocol protocol; + + /* + * Reference for the health probe for this connection + */ + private LoadBalancerProbeReference probe; + + /* + * SessionPersistence: Default (5-tuple), SourceIP(2-tuple), sourceIPProtocol(3-tuple) + */ + private LoadBalancerRuleSessionPersistenceType loadDistribution; + + /* + * Time for which connections are preserved before being torn down. + */ + private Integer idleTimeoutInMinutes; + + /** + * Creates an instance of LoadBalancerRuleProperties class. + */ + public LoadBalancerRuleProperties() { + } + + /** + * Get the frontendIPConfiguration property: arm reference to frontend IP being used by this LB. + * + * @return the frontendIPConfiguration value. + */ + public LoadBalancerFrontendIPConfigurationReference frontendIPConfiguration() { + return this.frontendIPConfiguration; + } + + /** + * Set the frontendIPConfiguration property: arm reference to frontend IP being used by this LB. + * + * @param frontendIPConfiguration the frontendIPConfiguration value to set. + * @return the LoadBalancerRuleProperties object itself. + */ + public LoadBalancerRuleProperties + withFrontendIPConfiguration(LoadBalancerFrontendIPConfigurationReference frontendIPConfiguration) { + this.frontendIPConfiguration = frontendIPConfiguration; + return this; + } + + /** + * Get the backendAddressPool property: arm reference to backend pool being used by ths pool. + * + * @return the backendAddressPool value. + */ + public LoadBalancerBackendAddressPoolReference backendAddressPool() { + return this.backendAddressPool; + } + + /** + * Set the backendAddressPool property: arm reference to backend pool being used by ths pool. + * + * @param backendAddressPool the backendAddressPool value to set. + * @return the LoadBalancerRuleProperties object itself. + */ + public LoadBalancerRuleProperties + withBackendAddressPool(LoadBalancerBackendAddressPoolReference backendAddressPool) { + this.backendAddressPool = backendAddressPool; + return this; + } + + /** + * Get the frontendPort property: Frontend port to accept connections. + * + * @return the frontendPort value. + */ + public int frontendPort() { + return this.frontendPort; + } + + /** + * Set the frontendPort property: Frontend port to accept connections. + * + * @param frontendPort the frontendPort value to set. + * @return the LoadBalancerRuleProperties object itself. + */ + public LoadBalancerRuleProperties withFrontendPort(int frontendPort) { + this.frontendPort = frontendPort; + return this; + } + + /** + * Get the backendPort property: backendPort to forward connections. + * + * @return the backendPort value. + */ + public int backendPort() { + return this.backendPort; + } + + /** + * Set the backendPort property: backendPort to forward connections. + * + * @param backendPort the backendPort value to set. + * @return the LoadBalancerRuleProperties object itself. + */ + public LoadBalancerRuleProperties withBackendPort(int backendPort) { + this.backendPort = backendPort; + return this; + } + + /** + * Get the protocol property: IP Protocol that the rule must load-balance. + * + * @return the protocol value. + */ + public LoadBalancerRuleTransportProtocol protocol() { + return this.protocol; + } + + /** + * Set the protocol property: IP Protocol that the rule must load-balance. + * + * @param protocol the protocol value to set. + * @return the LoadBalancerRuleProperties object itself. + */ + public LoadBalancerRuleProperties withProtocol(LoadBalancerRuleTransportProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the probe property: Reference for the health probe for this connection. + * + * @return the probe value. + */ + public LoadBalancerProbeReference probe() { + return this.probe; + } + + /** + * Set the probe property: Reference for the health probe for this connection. + * + * @param probe the probe value to set. + * @return the LoadBalancerRuleProperties object itself. + */ + public LoadBalancerRuleProperties withProbe(LoadBalancerProbeReference probe) { + this.probe = probe; + return this; + } + + /** + * Get the loadDistribution property: SessionPersistence: Default (5-tuple), SourceIP(2-tuple), + * sourceIPProtocol(3-tuple). + * + * @return the loadDistribution value. + */ + public LoadBalancerRuleSessionPersistenceType loadDistribution() { + return this.loadDistribution; + } + + /** + * Set the loadDistribution property: SessionPersistence: Default (5-tuple), SourceIP(2-tuple), + * sourceIPProtocol(3-tuple). + * + * @param loadDistribution the loadDistribution value to set. + * @return the LoadBalancerRuleProperties object itself. + */ + public LoadBalancerRuleProperties withLoadDistribution(LoadBalancerRuleSessionPersistenceType loadDistribution) { + this.loadDistribution = loadDistribution; + return this; + } + + /** + * Get the idleTimeoutInMinutes property: Time for which connections are preserved before being torn down. + * + * @return the idleTimeoutInMinutes value. + */ + public Integer idleTimeoutInMinutes() { + return this.idleTimeoutInMinutes; + } + + /** + * Set the idleTimeoutInMinutes property: Time for which connections are preserved before being torn down. + * + * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set. + * @return the LoadBalancerRuleProperties object itself. + */ + public LoadBalancerRuleProperties withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { + this.idleTimeoutInMinutes = idleTimeoutInMinutes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("frontendIPConfiguration", this.frontendIPConfiguration); + jsonWriter.writeJsonField("backendAddressPool", this.backendAddressPool); + jsonWriter.writeIntField("frontendPort", this.frontendPort); + jsonWriter.writeIntField("backendPort", this.backendPort); + jsonWriter.writeStringField("protocol", this.protocol == null ? null : this.protocol.toString()); + jsonWriter.writeJsonField("probe", this.probe); + jsonWriter.writeStringField("loadDistribution", + this.loadDistribution == null ? null : this.loadDistribution.toString()); + jsonWriter.writeNumberField("idleTimeoutInMinutes", this.idleTimeoutInMinutes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerRuleProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerRuleProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LoadBalancerRuleProperties. + */ + public static LoadBalancerRuleProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerRuleProperties deserializedLoadBalancerRuleProperties = new LoadBalancerRuleProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("frontendIPConfiguration".equals(fieldName)) { + deserializedLoadBalancerRuleProperties.frontendIPConfiguration + = LoadBalancerFrontendIPConfigurationReference.fromJson(reader); + } else if ("backendAddressPool".equals(fieldName)) { + deserializedLoadBalancerRuleProperties.backendAddressPool + = LoadBalancerBackendAddressPoolReference.fromJson(reader); + } else if ("frontendPort".equals(fieldName)) { + deserializedLoadBalancerRuleProperties.frontendPort = reader.getInt(); + } else if ("backendPort".equals(fieldName)) { + deserializedLoadBalancerRuleProperties.backendPort = reader.getInt(); + } else if ("protocol".equals(fieldName)) { + deserializedLoadBalancerRuleProperties.protocol + = LoadBalancerRuleTransportProtocol.fromString(reader.getString()); + } else if ("probe".equals(fieldName)) { + deserializedLoadBalancerRuleProperties.probe = LoadBalancerProbeReference.fromJson(reader); + } else if ("loadDistribution".equals(fieldName)) { + deserializedLoadBalancerRuleProperties.loadDistribution + = LoadBalancerRuleSessionPersistenceType.fromString(reader.getString()); + } else if ("idleTimeoutInMinutes".equals(fieldName)) { + deserializedLoadBalancerRuleProperties.idleTimeoutInMinutes + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerRuleProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerRuleSessionPersistenceType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerRuleSessionPersistenceType.java new file mode 100644 index 0000000000000..f3646e7d2ffcb --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerRuleSessionPersistenceType.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Type of session persistence [Default, SourceIP, SourceIPProtocol]. + */ +public final class LoadBalancerRuleSessionPersistenceType + extends ExpandableStringEnum { + /** + * Default - 5-tuple hashing. + */ + public static final LoadBalancerRuleSessionPersistenceType DEFAULT = fromString("Default"); + + /** + * Source IP - 2-tuple hashing looking at src-dst ip. + */ + public static final LoadBalancerRuleSessionPersistenceType SOURCE_IP = fromString("SourceIP"); + + /** + * SourceIPProtocol - 3-tuple hashing looking at src-dst ip and ip protocol. + */ + public static final LoadBalancerRuleSessionPersistenceType SOURCE_IPPROTOCOL = fromString("SourceIPProtocol"); + + /** + * Creates a new instance of LoadBalancerRuleSessionPersistenceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LoadBalancerRuleSessionPersistenceType() { + } + + /** + * Creates or finds a LoadBalancerRuleSessionPersistenceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding LoadBalancerRuleSessionPersistenceType. + */ + public static LoadBalancerRuleSessionPersistenceType fromString(String name) { + return fromString(name, LoadBalancerRuleSessionPersistenceType.class); + } + + /** + * Gets known LoadBalancerRuleSessionPersistenceType values. + * + * @return known LoadBalancerRuleSessionPersistenceType values. + */ + public static Collection values() { + return values(LoadBalancerRuleSessionPersistenceType.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerRuleTransportProtocol.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerRuleTransportProtocol.java new file mode 100644 index 0000000000000..8c3edba757ee6 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerRuleTransportProtocol.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Protocol for load balancing rules. + */ +public final class LoadBalancerRuleTransportProtocol extends ExpandableStringEnum { + /** + * TCP - load balance only tcp traffic. + */ + public static final LoadBalancerRuleTransportProtocol TCP = fromString("Tcp"); + + /** + * Udp - load balance only UDP traffic. + */ + public static final LoadBalancerRuleTransportProtocol UDP = fromString("Udp"); + + /** + * All - load balance all UDP and TCP traffic. + */ + public static final LoadBalancerRuleTransportProtocol ALL = fromString("All"); + + /** + * Creates a new instance of LoadBalancerRuleTransportProtocol value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LoadBalancerRuleTransportProtocol() { + } + + /** + * Creates or finds a LoadBalancerRuleTransportProtocol from its string representation. + * + * @param name a name to look for. + * @return the corresponding LoadBalancerRuleTransportProtocol. + */ + public static LoadBalancerRuleTransportProtocol fromString(String name) { + return fromString(name, LoadBalancerRuleTransportProtocol.class); + } + + /** + * Gets known LoadBalancerRuleTransportProtocol values. + * + * @return known LoadBalancerRuleTransportProtocol values. + */ + public static Collection values() { + return values(LoadBalancerRuleTransportProtocol.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerStatus.java new file mode 100644 index 0000000000000..05422dcda9a15 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerStatus.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The observed status of the virtual network. + */ +@Immutable +public final class LoadBalancerStatus implements JsonSerializable { + /* + * LoadBalancer provisioning error code + */ + private String errorCode; + + /* + * Descriptive error message + */ + private String errorMessage; + + /* + * virtual network provisioning status + */ + private LoadBalancerStatusProvisioningStatus provisioningStatus; + + /** + * Creates an instance of LoadBalancerStatus class. + */ + private LoadBalancerStatus() { + } + + /** + * Get the errorCode property: LoadBalancer provisioning error code. + * + * @return the errorCode value. + */ + public String errorCode() { + return this.errorCode; + } + + /** + * Get the errorMessage property: Descriptive error message. + * + * @return the errorMessage value. + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Get the provisioningStatus property: virtual network provisioning status. + * + * @return the provisioningStatus value. + */ + public LoadBalancerStatusProvisioningStatus provisioningStatus() { + return this.provisioningStatus; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("errorCode", this.errorCode); + jsonWriter.writeStringField("errorMessage", this.errorMessage); + jsonWriter.writeJsonField("provisioningStatus", this.provisioningStatus); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerStatus if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the LoadBalancerStatus. + */ + public static LoadBalancerStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerStatus deserializedLoadBalancerStatus = new LoadBalancerStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("errorCode".equals(fieldName)) { + deserializedLoadBalancerStatus.errorCode = reader.getString(); + } else if ("errorMessage".equals(fieldName)) { + deserializedLoadBalancerStatus.errorMessage = reader.getString(); + } else if ("provisioningStatus".equals(fieldName)) { + deserializedLoadBalancerStatus.provisioningStatus + = LoadBalancerStatusProvisioningStatus.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerStatus; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerStatusProvisioningStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerStatusProvisioningStatus.java new file mode 100644 index 0000000000000..fc9fed5a16b61 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerStatusProvisioningStatus.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Status of load balancer operations. + */ +@Immutable +public final class LoadBalancerStatusProvisioningStatus + implements JsonSerializable { + /* + * The ID of the operation performed on the load balancer + */ + private String operationId; + + /* + * The status of the operation performed on the loadbalancer [Succeeded, Failed, InProgress] + */ + private Status status; + + /** + * Creates an instance of LoadBalancerStatusProvisioningStatus class. + */ + private LoadBalancerStatusProvisioningStatus() { + } + + /** + * Get the operationId property: The ID of the operation performed on the load balancer. + * + * @return the operationId value. + */ + public String operationId() { + return this.operationId; + } + + /** + * Get the status property: The status of the operation performed on the loadbalancer [Succeeded, Failed, + * InProgress]. + * + * @return the status value. + */ + public Status status() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("operationId", this.operationId); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerStatusProvisioningStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerStatusProvisioningStatus if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LoadBalancerStatusProvisioningStatus. + */ + public static LoadBalancerStatusProvisioningStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerStatusProvisioningStatus deserializedLoadBalancerStatusProvisioningStatus + = new LoadBalancerStatusProvisioningStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operationId".equals(fieldName)) { + deserializedLoadBalancerStatusProvisioningStatus.operationId = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedLoadBalancerStatusProvisioningStatus.status = Status.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerStatusProvisioningStatus; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerTagsUpdate.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerTagsUpdate.java new file mode 100644 index 0000000000000..f742b30a891cf --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerTagsUpdate.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for updating tags in LoadBalancer resources. + */ +@Fluent +public final class LoadBalancerTagsUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /** + * Creates an instance of LoadBalancerTagsUpdate class. + */ + public LoadBalancerTagsUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the LoadBalancerTagsUpdate object itself. + */ + public LoadBalancerTagsUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerTagsUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerTagsUpdate if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the LoadBalancerTagsUpdate. + */ + public static LoadBalancerTagsUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerTagsUpdate deserializedLoadBalancerTagsUpdate = new LoadBalancerTagsUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedLoadBalancerTagsUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerTagsUpdate; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancers.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancers.java new file mode 100644 index 0000000000000..25b35c34b9f03 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancers.java @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of LoadBalancers. + */ +public interface LoadBalancers { + /** + * The operation to get a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String loadBalancerName, + Context context); + + /** + * The operation to get a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition. + */ + LoadBalancer getByResourceGroup(String resourceGroupName, String loadBalancerName); + + /** + * The operation to delete a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String loadBalancerName); + + /** + * The operation to delete a loadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param loadBalancerName Name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String loadBalancerName, Context context); + + /** + * Lists all of the loadBalancers in the specified resource group. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all of the loadBalancers in the specified resource group. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Lists all of the loadBalancers in the specified subscription. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Lists all of the loadBalancers in the specified subscription. Use the nextLink property in the response to get + * the next page of LoadBalancer. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LoadBalancer list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * The operation to get a loadBalancer. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition along with {@link Response}. + */ + LoadBalancer getById(String id); + + /** + * The operation to get a loadBalancer. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the LoadBalancer resource definition along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * The operation to delete a loadBalancer. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * The operation to delete a loadBalancer. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new LoadBalancer resource. + * + * @param name resource name. + * @return the first stage of the new LoadBalancer definition. + */ + LoadBalancer.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkArmReference.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkArmReference.java index 27fba42a10a39..cbc2a355f2f2b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkArmReference.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkArmReference.java @@ -12,12 +12,12 @@ import java.io.IOException; /** - * The ARM ID for a Logical Network. + * The Azure Resource ID for a Logical Network. */ @Fluent public final class LogicalNetworkArmReference implements JsonSerializable { /* - * The ARM ID for a Logical Network. + * The Azure Resource ID for a Logical Network. */ private String id; @@ -28,7 +28,7 @@ public LogicalNetworkArmReference() { } /** - * Get the id property: The ARM ID for a Logical Network. + * Get the id property: The Azure Resource ID for a Logical Network. * * @return the id value. */ @@ -37,7 +37,7 @@ public String id() { } /** - * Set the id property: The ARM ID for a Logical Network. + * Set the id property: The Azure Resource ID for a Logical Network. * * @param id the id value to set. * @return the LogicalNetworkArmReference object itself. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkProperties.java index fe5732fc89985..aa18c13f4f132 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkProperties.java @@ -23,6 +23,12 @@ public final class LogicalNetworkProperties implements JsonSerializable writer.writeJson(element)); jsonWriter.writeStringField("vmSwitchName", this.vmSwitchName); return jsonWriter.writeEndObject(); @@ -173,6 +203,9 @@ public static LogicalNetworkProperties fromJson(JsonReader jsonReader) throws IO if ("dhcpOptions".equals(fieldName)) { deserializedLogicalNetworkProperties.dhcpOptions = LogicalNetworkPropertiesDhcpOptions.fromJson(reader); + } else if ("fabricNetworkConfiguration".equals(fieldName)) { + deserializedLogicalNetworkProperties.fabricNetworkConfiguration + = ManagedNetworkFabricArmReference.fromJson(reader); } else if ("subnets".equals(fieldName)) { List subnets = reader.readArray(reader1 -> Subnet.fromJson(reader1)); deserializedLogicalNetworkProperties.subnets = subnets; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkStatus.java index 23823951e38fe..872af33775d5d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkStatus.java @@ -31,6 +31,11 @@ public final class LogicalNetworkStatus implements JsonSerializable { + /* + * The Azure Resource ID for a Managed Network Fabric L2ISD or L3ISD internal network + */ + private String resourceId; + + /** + * Creates an instance of ManagedNetworkFabricArmReference class. + */ + public ManagedNetworkFabricArmReference() { + } + + /** + * Get the resourceId property: The Azure Resource ID for a Managed Network Fabric L2ISD or L3ISD internal network. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The Azure Resource ID for a Managed Network Fabric L2ISD or L3ISD internal network. + * + * @param resourceId the resourceId value to set. + * @return the ManagedNetworkFabricArmReference object itself. + */ + public ManagedNetworkFabricArmReference withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedNetworkFabricArmReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedNetworkFabricArmReference if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedNetworkFabricArmReference. + */ + public static ManagedNetworkFabricArmReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedNetworkFabricArmReference deserializedManagedNetworkFabricArmReference + = new ManagedNetworkFabricArmReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedManagedNetworkFabricArmReference.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedNetworkFabricArmReference; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGateway.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGateway.java new file mode 100644 index 0000000000000..f3e7d15a4f3d4 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGateway.java @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.NatGatewayInner; +import java.util.Map; + +/** + * An immutable client-side representation of NatGateway. + */ +public interface NatGateway { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + NatGatewayProperties properties(); + + /** + * Gets the extendedLocation property: The extendedLocation of the resource. + * + * @return the extendedLocation value. + */ + ExtendedLocation extendedLocation(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.vm.fluent.models.NatGatewayInner object. + * + * @return the inner object. + */ + NatGatewayInner innerModel(); + + /** + * The entirety of the NatGateway definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The NatGateway definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the NatGateway definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the NatGateway definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the NatGateway definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the NatGateway definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithExtendedLocation { + /** + * Executes the create request. + * + * @return the created resource. + */ + NatGateway create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + NatGateway create(Context context); + } + + /** + * The stage of the NatGateway definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the NatGateway definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(NatGatewayProperties properties); + } + + /** + * The stage of the NatGateway definition allowing to specify extendedLocation. + */ + interface WithExtendedLocation { + /** + * Specifies the extendedLocation property: The extendedLocation of the resource.. + * + * @param extendedLocation The extendedLocation of the resource. + * @return the next definition stage. + */ + WithCreate withExtendedLocation(ExtendedLocation extendedLocation); + } + } + + /** + * Begins update for the NatGateway resource. + * + * @return the stage of resource update. + */ + NatGateway.Update update(); + + /** + * The template for NatGateway update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + NatGateway apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + NatGateway apply(Context context); + } + + /** + * The NatGateway update stages. + */ + interface UpdateStages { + /** + * The stage of the NatGateway update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + NatGateway refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + NatGateway refresh(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayArmReference.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayArmReference.java new file mode 100644 index 0000000000000..0533ba524ba92 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayArmReference.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ARM ID for a Network Security Group. + */ +@Fluent +public final class NatGatewayArmReference implements JsonSerializable { + /* + * The ARM ID for a Network Security Group. + */ + private String resourceId; + + /** + * Creates an instance of NatGatewayArmReference class. + */ + public NatGatewayArmReference() { + } + + /** + * Get the resourceId property: The ARM ID for a Network Security Group. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The ARM ID for a Network Security Group. + * + * @param resourceId the resourceId value to set. + * @return the NatGatewayArmReference object itself. + */ + public NatGatewayArmReference withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NatGatewayArmReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NatGatewayArmReference if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the NatGatewayArmReference. + */ + public static NatGatewayArmReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NatGatewayArmReference deserializedNatGatewayArmReference = new NatGatewayArmReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedNatGatewayArmReference.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNatGatewayArmReference; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayProperties.java new file mode 100644 index 0000000000000..45ea638530662 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayProperties.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Nat Gateway resource properties. + */ +@Fluent +public final class NatGatewayProperties implements JsonSerializable { + /* + * List of public ip addresses that the gateway can use for NAT. + */ + private List publicIPAddresses; + + /* + * List of subnets associated with the nat gateway. These can only be vnet subnets and must be from the same vnet + */ + private List subnets; + + /* + * Provisioning state of the public IP + */ + private ProvisioningStateEnum provisioningState; + + /* + * The observed state of Nat Gateway + */ + private NatGatewayStatus status; + + /** + * Creates an instance of NatGatewayProperties class. + */ + public NatGatewayProperties() { + } + + /** + * Get the publicIPAddresses property: List of public ip addresses that the gateway can use for NAT. + * + * @return the publicIPAddresses value. + */ + public List publicIPAddresses() { + return this.publicIPAddresses; + } + + /** + * Set the publicIPAddresses property: List of public ip addresses that the gateway can use for NAT. + * + * @param publicIPAddresses the publicIPAddresses value to set. + * @return the NatGatewayProperties object itself. + */ + public NatGatewayProperties withPublicIPAddresses(List publicIPAddresses) { + this.publicIPAddresses = publicIPAddresses; + return this; + } + + /** + * Get the subnets property: List of subnets associated with the nat gateway. These can only be vnet subnets and + * must be from the same vnet. + * + * @return the subnets value. + */ + public List subnets() { + return this.subnets; + } + + /** + * Get the provisioningState property: Provisioning state of the public IP. + * + * @return the provisioningState value. + */ + public ProvisioningStateEnum provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: The observed state of Nat Gateway. + * + * @return the status value. + */ + public NatGatewayStatus status() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("publicIPAddresses", this.publicIPAddresses, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NatGatewayProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NatGatewayProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the NatGatewayProperties. + */ + public static NatGatewayProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NatGatewayProperties deserializedNatGatewayProperties = new NatGatewayProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicIPAddresses".equals(fieldName)) { + List publicIPAddresses + = reader.readArray(reader1 -> PublicIPAddressArmReference.fromJson(reader1)); + deserializedNatGatewayProperties.publicIPAddresses = publicIPAddresses; + } else if ("subnets".equals(fieldName)) { + List subnets + = reader.readArray(reader1 -> VirtualNetworkSubnetArmReference.fromJson(reader1)); + deserializedNatGatewayProperties.subnets = subnets; + } else if ("provisioningState".equals(fieldName)) { + deserializedNatGatewayProperties.provisioningState + = ProvisioningStateEnum.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedNatGatewayProperties.status = NatGatewayStatus.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNatGatewayProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayStatus.java new file mode 100644 index 0000000000000..c6b02d8ad7b79 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayStatus.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Nat Gateway resource status. + */ +@Immutable +public final class NatGatewayStatus implements JsonSerializable { + /* + * NatGateway provisioning error code + */ + private String errorCode; + + /* + * Descriptive error message + */ + private String errorMessage; + + /* + * NatGateway provisioning status + */ + private NatGatewayStatusProvisioningStatus provisioningStatus; + + /** + * Creates an instance of NatGatewayStatus class. + */ + private NatGatewayStatus() { + } + + /** + * Get the errorCode property: NatGateway provisioning error code. + * + * @return the errorCode value. + */ + public String errorCode() { + return this.errorCode; + } + + /** + * Get the errorMessage property: Descriptive error message. + * + * @return the errorMessage value. + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Get the provisioningStatus property: NatGateway provisioning status. + * + * @return the provisioningStatus value. + */ + public NatGatewayStatusProvisioningStatus provisioningStatus() { + return this.provisioningStatus; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("errorCode", this.errorCode); + jsonWriter.writeStringField("errorMessage", this.errorMessage); + jsonWriter.writeJsonField("provisioningStatus", this.provisioningStatus); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NatGatewayStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NatGatewayStatus if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the NatGatewayStatus. + */ + public static NatGatewayStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NatGatewayStatus deserializedNatGatewayStatus = new NatGatewayStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("errorCode".equals(fieldName)) { + deserializedNatGatewayStatus.errorCode = reader.getString(); + } else if ("errorMessage".equals(fieldName)) { + deserializedNatGatewayStatus.errorMessage = reader.getString(); + } else if ("provisioningStatus".equals(fieldName)) { + deserializedNatGatewayStatus.provisioningStatus + = NatGatewayStatusProvisioningStatus.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNatGatewayStatus; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayStatusProvisioningStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayStatusProvisioningStatus.java new file mode 100644 index 0000000000000..89e1821718c86 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayStatusProvisioningStatus.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Provisioning status of Nat Gateway. + */ +@Immutable +public final class NatGatewayStatusProvisioningStatus implements JsonSerializable { + /* + * The ID of the operation performed on the nat gateway + */ + private String operationId; + + /* + * The status of the operation performed on the nat gateway [Succeeded, Failed, InProgress] + */ + private Status status; + + /** + * Creates an instance of NatGatewayStatusProvisioningStatus class. + */ + private NatGatewayStatusProvisioningStatus() { + } + + /** + * Get the operationId property: The ID of the operation performed on the nat gateway. + * + * @return the operationId value. + */ + public String operationId() { + return this.operationId; + } + + /** + * Get the status property: The status of the operation performed on the nat gateway [Succeeded, Failed, + * InProgress]. + * + * @return the status value. + */ + public Status status() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("operationId", this.operationId); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NatGatewayStatusProvisioningStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NatGatewayStatusProvisioningStatus if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NatGatewayStatusProvisioningStatus. + */ + public static NatGatewayStatusProvisioningStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NatGatewayStatusProvisioningStatus deserializedNatGatewayStatusProvisioningStatus + = new NatGatewayStatusProvisioningStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operationId".equals(fieldName)) { + deserializedNatGatewayStatusProvisioningStatus.operationId = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedNatGatewayStatusProvisioningStatus.status = Status.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNatGatewayStatusProvisioningStatus; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayTagsUpdate.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayTagsUpdate.java new file mode 100644 index 0000000000000..05ebf043e51e3 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayTagsUpdate.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for updating tags in NatGateway resources. + */ +@Fluent +public final class NatGatewayTagsUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /** + * Creates an instance of NatGatewayTagsUpdate class. + */ + public NatGatewayTagsUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the NatGatewayTagsUpdate object itself. + */ + public NatGatewayTagsUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NatGatewayTagsUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NatGatewayTagsUpdate if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the NatGatewayTagsUpdate. + */ + public static NatGatewayTagsUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NatGatewayTagsUpdate deserializedNatGatewayTagsUpdate = new NatGatewayTagsUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedNatGatewayTagsUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedNatGatewayTagsUpdate; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGateways.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGateways.java new file mode 100644 index 0000000000000..385b707c0adfc --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGateways.java @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of NatGateways. + */ +public interface NatGateways { + /** + * The operation to get a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String natGatewayName, + Context context); + + /** + * The operation to get a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition. + */ + NatGateway getByResourceGroup(String resourceGroupName, String natGatewayName); + + /** + * The operation to delete a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String natGatewayName); + + /** + * The operation to delete a natGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param natGatewayName Name of the nat gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String natGatewayName, Context context); + + /** + * Lists all of the natGateways in the specified resource group. Use the nextLink property in the response to get + * the next page of NatGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all of the natGateways in the specified resource group. Use the nextLink property in the response to get + * the next page of NatGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Lists all of the natGateways in the specified subscription. Use the nextLink property in the response to get the + * next page of NatGateway. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Lists all of the natGateways in the specified subscription. Use the nextLink property in the response to get the + * next page of NatGateway. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NatGateway list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * The operation to get a natGateway. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition along with {@link Response}. + */ + NatGateway getById(String id); + + /** + * The operation to get a natGateway. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NatGateway resource definition along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * The operation to delete a natGateway. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * The operation to delete a natGateway. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new NatGateway resource. + * + * @param name resource name. + * @return the first stage of the new NatGateway definition. + */ + NatGateway.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfaceArmReference.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfaceArmReference.java index ab3c849bb6865..fee0c3801ef0f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfaceArmReference.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfaceArmReference.java @@ -12,12 +12,12 @@ import java.io.IOException; /** - * The ARM ID for a Network Interface. + * The Azure Resource ID for a Network Interface. */ @Fluent public final class NetworkInterfaceArmReference implements JsonSerializable { /* - * The ARM ID for a Network Interface. + * The Azure Resource ID for a Network Interface. */ private String id; @@ -28,7 +28,7 @@ public NetworkInterfaceArmReference() { } /** - * Get the id property: The ARM ID for a Network Interface. + * Get the id property: The Azure Resource ID for a Network Interface. * * @return the id value. */ @@ -37,7 +37,7 @@ public String id() { } /** - * Set the id property: The ARM ID for a Network Interface. + * Set the id property: The Azure Resource ID for a Network Interface. * * @param id the id value to set. * @return the NetworkInterfaceArmReference object itself. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfaceProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfaceProperties.java index 7a90983f6c747..df6adcd115e28 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfaceProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfaceProperties.java @@ -52,6 +52,13 @@ public final class NetworkInterfaceProperties implements JsonSerializable { /* - * The ARM ID for a Network Security Group. + * The Azure Resource ID for a Network Security Group. */ private String id; @@ -28,7 +28,7 @@ public NetworkSecurityGroupArmReference() { } /** - * Get the id property: The ARM ID for a Network Security Group. + * Get the id property: The Azure Resource ID for a Network Security Group. * * @return the id value. */ @@ -37,7 +37,7 @@ public String id() { } /** - * Set the id property: The ARM ID for a Network Security Group. + * Set the id property: The Azure Resource ID for a Network Security Group. * * @param id the id value to set. * @return the NetworkSecurityGroupArmReference object itself. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Operation.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Operation.java new file mode 100644 index 0000000000000..05f97d8d69545 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Operation.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.OperationInner; + +/** + * An immutable client-side representation of Operation. + */ +public interface Operation { + /** + * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * + * @return the name value. + */ + String name(); + + /** + * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for Azure Resource Manager/control-plane operations. + * + * @return the isDataAction value. + */ + Boolean isDataAction(); + + /** + * Gets the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + OperationDisplay display(); + + /** + * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + Origin origin(); + + /** + * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. + * + * @return the actionType value. + */ + ActionType actionType(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.vm.fluent.models.OperationInner object. + * + * @return the inner object. + */ + OperationInner innerModel(); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OperationDisplay.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OperationDisplay.java new file mode 100644 index 0000000000000..707a694e78054 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OperationDisplay.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Localized display information for an operation. + */ +@Immutable +public final class OperationDisplay implements JsonSerializable { + /* + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or + * "Microsoft Compute". + */ + private String provider; + + /* + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or + * "Job Schedule Collections". + */ + private String resource; + + /* + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. + * "Create or Update Virtual Machine", "Restart Virtual Machine". + */ + private String operation; + + /* + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + */ + private String description; + + /** + * Creates an instance of OperationDisplay class. + */ + private OperationDisplay() { + } + + /** + * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring + * Insights" or "Microsoft Compute". + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. + * "Virtual Machines" or "Job Schedule Collections". + * + * @return the resource value. + */ + public String resource() { + return this.resource; + } + + /** + * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. + * "Create or Update Virtual Machine", "Restart Virtual Machine". + * + * @return the operation value. + */ + public String operation() { + return this.operation; + } + + /** + * Get the description property: The short, localized friendly description of the operation; suitable for tool tips + * and detailed views. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationDisplay from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationDisplay. + */ + public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationDisplay deserializedOperationDisplay = new OperationDisplay(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedOperationDisplay.provider = reader.getString(); + } else if ("resource".equals(fieldName)) { + deserializedOperationDisplay.resource = reader.getString(); + } else if ("operation".equals(fieldName)) { + deserializedOperationDisplay.operation = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedOperationDisplay.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationDisplay; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OperationStatusResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OperationStatusResult.java new file mode 100644 index 0000000000000..81013e634cffc --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OperationStatusResult.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.OperationStatusResultInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of OperationStatusResult. + */ +public interface OperationStatusResult { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.vm.fluent.models.OperationStatusResultInner object. + * + * @return the inner object. + */ + OperationStatusResultInner innerModel(); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OperationStepResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OperationStepResult.java new file mode 100644 index 0000000000000..52205932ddc1f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OperationStepResult.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The observed result of a step in a resource operation. + */ +@Immutable +public final class OperationStepResult implements JsonSerializable { + /* + * The stable identifier of the step, unique within the operation. + */ + private String name; + + /* + * The current status of the step. + */ + private Status status; + + /* + * Additional information about the step, such as the reason for a failure. + */ + private String message; + + /* + * The time the step completed, in UTC. Omitted while the step is in progress. + */ + private OffsetDateTime completedTime; + + /** + * Creates an instance of OperationStepResult class. + */ + private OperationStepResult() { + } + + /** + * Get the name property: The stable identifier of the step, unique within the operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: The current status of the step. + * + * @return the status value. + */ + public Status status() { + return this.status; + } + + /** + * Get the message property: Additional information about the step, such as the reason for a failure. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Get the completedTime property: The time the step completed, in UTC. Omitted while the step is in progress. + * + * @return the completedTime value. + */ + public OffsetDateTime completedTime() { + return this.completedTime; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("message", this.message); + jsonWriter.writeStringField("completedTime", + this.completedTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.completedTime)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationStepResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationStepResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OperationStepResult. + */ + public static OperationStepResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationStepResult deserializedOperationStepResult = new OperationStepResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedOperationStepResult.name = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedOperationStepResult.status = Status.fromString(reader.getString()); + } else if ("message".equals(fieldName)) { + deserializedOperationStepResult.message = reader.getString(); + } else if ("completedTime".equals(fieldName)) { + deserializedOperationStepResult.completedTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationStepResult; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Operations.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Operations.java new file mode 100644 index 0000000000000..fbe7c8f150146 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Operations.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of Operations. + */ +public interface Operations { + /** + * List the operations for the provider. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Origin.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Origin.java new file mode 100644 index 0000000000000..9fecfab6d9931 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Origin.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value + * is "user,system". + */ +public final class Origin extends ExpandableStringEnum { + /** + * Indicates the operation is initiated by a user. + */ + public static final Origin USER = fromString("user"); + + /** + * Indicates the operation is initiated by a system. + */ + public static final Origin SYSTEM = fromString("system"); + + /** + * Indicates the operation is initiated by a user or system. + */ + public static final Origin USER_SYSTEM = fromString("user,system"); + + /** + * Creates a new instance of Origin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Origin() { + } + + /** + * Creates or finds a Origin from its string representation. + * + * @param name a name to look for. + * @return the corresponding Origin. + */ + public static Origin fromString(String name) { + return fromString(name, Origin.class); + } + + /** + * Gets known Origin values. + * + * @return known Origin values. + */ + public static Collection values() { + return values(Origin.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PowerOffVirtualMachineOptions.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PowerOffVirtualMachineOptions.java new file mode 100644 index 0000000000000..407a4b3b3543a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PowerOffVirtualMachineOptions.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The operation gracefully shuts down a virtual machine by requesting the operating system to shut down. The virtual + * machine can be restarted with the same provisioned resources. To force an immediate shut down, see the skipShutdown + * flag. + */ +@Fluent +public final class PowerOffVirtualMachineOptions implements JsonSerializable { + /* + * Indicates whether to perform an immediate shut down. When set to true, the VM is forcefully shut down. If not + * specified, the default value is false, and the operation attempts a graceful shut down of the VM. + */ + private Boolean skipShutdown; + + /** + * Creates an instance of PowerOffVirtualMachineOptions class. + */ + public PowerOffVirtualMachineOptions() { + } + + /** + * Get the skipShutdown property: Indicates whether to perform an immediate shut down. When set to true, the VM is + * forcefully shut down. If not specified, the default value is false, and the operation attempts a graceful shut + * down of the VM. + * + * @return the skipShutdown value. + */ + public Boolean skipShutdown() { + return this.skipShutdown; + } + + /** + * Set the skipShutdown property: Indicates whether to perform an immediate shut down. When set to true, the VM is + * forcefully shut down. If not specified, the default value is false, and the operation attempts a graceful shut + * down of the VM. + * + * @param skipShutdown the skipShutdown value to set. + * @return the PowerOffVirtualMachineOptions object itself. + */ + public PowerOffVirtualMachineOptions withSkipShutdown(Boolean skipShutdown) { + this.skipShutdown = skipShutdown; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("skipShutdown", this.skipShutdown); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PowerOffVirtualMachineOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PowerOffVirtualMachineOptions if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PowerOffVirtualMachineOptions. + */ + public static PowerOffVirtualMachineOptions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PowerOffVirtualMachineOptions deserializedPowerOffVirtualMachineOptions + = new PowerOffVirtualMachineOptions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("skipShutdown".equals(fieldName)) { + deserializedPowerOffVirtualMachineOptions.skipShutdown = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedPowerOffVirtualMachineOptions; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Probe.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Probe.java new file mode 100644 index 0000000000000..eb200bd54ff89 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Probe.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Load balancer health probes. + */ +@Fluent +public final class Probe implements JsonSerializable { + /* + * name of the load balancer health probe + */ + private String name; + + /* + * load balancer rule properties + */ + private ProbeProperties properties; + + /** + * Creates an instance of Probe class. + */ + public Probe() { + } + + /** + * Get the name property: name of the load balancer health probe. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: name of the load balancer health probe. + * + * @param name the name value to set. + * @return the Probe object itself. + */ + public Probe withName(String name) { + this.name = name; + return this; + } + + /** + * Get the properties property: load balancer rule properties. + * + * @return the properties value. + */ + public ProbeProperties properties() { + return this.properties; + } + + /** + * Set the properties property: load balancer rule properties. + * + * @param properties the properties value to set. + * @return the Probe object itself. + */ + public Probe withProperties(ProbeProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Probe from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Probe if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the Probe. + */ + public static Probe fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Probe deserializedProbe = new Probe(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedProbe.name = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedProbe.properties = ProbeProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedProbe; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ProbeProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ProbeProperties.java new file mode 100644 index 0000000000000..244f33ffded6e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ProbeProperties.java @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * properties for LoadBalancer health probes. + */ +@Fluent +public final class ProbeProperties implements JsonSerializable { + /* + * Protocol for this probe: Can be Tcp or Http - Diverges from Azure where Https is also an option + */ + private LoadBalancerProbeProtocol protocol; + + /* + * Port on the backend address to probe + */ + private int port; + + /* + * For http probes, specify the request path e.g. /health + */ + private String requestPath; + + /* + * Probe interval in seconds (5-300) default 15 + */ + private Integer intervalInSeconds; + + /* + * number of consecutive probe failures before marking unhealthy (1-20) default 2 + */ + private Integer numberOfProbes; + + /** + * Creates an instance of ProbeProperties class. + */ + public ProbeProperties() { + } + + /** + * Get the protocol property: Protocol for this probe: Can be Tcp or Http - Diverges from Azure where Https is also + * an option. + * + * @return the protocol value. + */ + public LoadBalancerProbeProtocol protocol() { + return this.protocol; + } + + /** + * Set the protocol property: Protocol for this probe: Can be Tcp or Http - Diverges from Azure where Https is also + * an option. + * + * @param protocol the protocol value to set. + * @return the ProbeProperties object itself. + */ + public ProbeProperties withProtocol(LoadBalancerProbeProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the port property: Port on the backend address to probe. + * + * @return the port value. + */ + public int port() { + return this.port; + } + + /** + * Set the port property: Port on the backend address to probe. + * + * @param port the port value to set. + * @return the ProbeProperties object itself. + */ + public ProbeProperties withPort(int port) { + this.port = port; + return this; + } + + /** + * Get the requestPath property: For http probes, specify the request path e.g. /health. + * + * @return the requestPath value. + */ + public String requestPath() { + return this.requestPath; + } + + /** + * Set the requestPath property: For http probes, specify the request path e.g. /health. + * + * @param requestPath the requestPath value to set. + * @return the ProbeProperties object itself. + */ + public ProbeProperties withRequestPath(String requestPath) { + this.requestPath = requestPath; + return this; + } + + /** + * Get the intervalInSeconds property: Probe interval in seconds (5-300) default 15. + * + * @return the intervalInSeconds value. + */ + public Integer intervalInSeconds() { + return this.intervalInSeconds; + } + + /** + * Set the intervalInSeconds property: Probe interval in seconds (5-300) default 15. + * + * @param intervalInSeconds the intervalInSeconds value to set. + * @return the ProbeProperties object itself. + */ + public ProbeProperties withIntervalInSeconds(Integer intervalInSeconds) { + this.intervalInSeconds = intervalInSeconds; + return this; + } + + /** + * Get the numberOfProbes property: number of consecutive probe failures before marking unhealthy (1-20) default 2. + * + * @return the numberOfProbes value. + */ + public Integer numberOfProbes() { + return this.numberOfProbes; + } + + /** + * Set the numberOfProbes property: number of consecutive probe failures before marking unhealthy (1-20) default 2. + * + * @param numberOfProbes the numberOfProbes value to set. + * @return the ProbeProperties object itself. + */ + public ProbeProperties withNumberOfProbes(Integer numberOfProbes) { + this.numberOfProbes = numberOfProbes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("protocol", this.protocol == null ? null : this.protocol.toString()); + jsonWriter.writeIntField("port", this.port); + jsonWriter.writeStringField("requestPath", this.requestPath); + jsonWriter.writeNumberField("intervalInSeconds", this.intervalInSeconds); + jsonWriter.writeNumberField("numberOfProbes", this.numberOfProbes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProbeProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProbeProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ProbeProperties. + */ + public static ProbeProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProbeProperties deserializedProbeProperties = new ProbeProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("protocol".equals(fieldName)) { + deserializedProbeProperties.protocol = LoadBalancerProbeProtocol.fromString(reader.getString()); + } else if ("port".equals(fieldName)) { + deserializedProbeProperties.port = reader.getInt(); + } else if ("requestPath".equals(fieldName)) { + deserializedProbeProperties.requestPath = reader.getString(); + } else if ("intervalInSeconds".equals(fieldName)) { + deserializedProbeProperties.intervalInSeconds = reader.getNullable(JsonReader::getInt); + } else if ("numberOfProbes".equals(fieldName)) { + deserializedProbeProperties.numberOfProbes = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedProbeProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddress.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddress.java new file mode 100644 index 0000000000000..b3b3e8ea786de --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddress.java @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.PublicIPAddressInner; +import java.util.Map; + +/** + * An immutable client-side representation of PublicIPAddress. + */ +public interface PublicIPAddress { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + PublicIPAddressProperties properties(); + + /** + * Gets the extendedLocation property: The extendedLocation of the resource. + * + * @return the extendedLocation value. + */ + ExtendedLocation extendedLocation(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.vm.fluent.models.PublicIPAddressInner object. + * + * @return the inner object. + */ + PublicIPAddressInner innerModel(); + + /** + * The entirety of the PublicIPAddress definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The PublicIPAddress definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the PublicIPAddress definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the PublicIPAddress definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the PublicIPAddress definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the PublicIPAddress definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithExtendedLocation { + /** + * Executes the create request. + * + * @return the created resource. + */ + PublicIPAddress create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PublicIPAddress create(Context context); + } + + /** + * The stage of the PublicIPAddress definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the PublicIPAddress definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(PublicIPAddressProperties properties); + } + + /** + * The stage of the PublicIPAddress definition allowing to specify extendedLocation. + */ + interface WithExtendedLocation { + /** + * Specifies the extendedLocation property: The extendedLocation of the resource.. + * + * @param extendedLocation The extendedLocation of the resource. + * @return the next definition stage. + */ + WithCreate withExtendedLocation(ExtendedLocation extendedLocation); + } + } + + /** + * Begins update for the PublicIPAddress resource. + * + * @return the stage of resource update. + */ + PublicIPAddress.Update update(); + + /** + * The template for PublicIPAddress update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PublicIPAddress apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PublicIPAddress apply(Context context); + } + + /** + * The PublicIPAddress update stages. + */ + interface UpdateStages { + /** + * The stage of the PublicIPAddress update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PublicIPAddress refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PublicIPAddress refresh(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddressArmReference.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddressArmReference.java new file mode 100644 index 0000000000000..649fd849c7c8d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddressArmReference.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Azure Resource ID of a Public IP resource. + */ +@Fluent +public final class PublicIPAddressArmReference implements JsonSerializable { + /* + * The Azure Resource ID of a Public IP resource + */ + private String resourceId; + + /** + * Creates an instance of PublicIPAddressArmReference class. + */ + public PublicIPAddressArmReference() { + } + + /** + * Get the resourceId property: The Azure Resource ID of a Public IP resource. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The Azure Resource ID of a Public IP resource. + * + * @param resourceId the resourceId value to set. + * @return the PublicIPAddressArmReference object itself. + */ + public PublicIPAddressArmReference withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PublicIPAddressArmReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PublicIPAddressArmReference if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PublicIPAddressArmReference. + */ + public static PublicIPAddressArmReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PublicIPAddressArmReference deserializedPublicIPAddressArmReference = new PublicIPAddressArmReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedPublicIPAddressArmReference.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPublicIPAddressArmReference; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddressProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddressProperties.java new file mode 100644 index 0000000000000..a0100aac81e8c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddressProperties.java @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Public IP Properties resource. + */ +@Fluent +public final class PublicIPAddressProperties implements JsonSerializable { + /* + * Whether the public IP is v4 or v6. Defaults to IPv4 + */ + private PublicIPAddressType publicIPAddressVersion; + + /* + * ipAllocationScope: Azure Reference to a particular IP Pool (ALM) or a LogicalNetwork (ALL) for allocating public + * IP + */ + private String ipAllocationScope; + + /* + * IP Address. This is static. If the user specifies, we allocate that otherwise allocate from logical network + * address space. + */ + private String ipAddress; + + /* + * network interface or LoadBalancer frontendIPconfiguration using this public IP + */ + private IPConfigurationArmReference ipConfiguration; + + /* + * natGateway using this public IP + */ + private NatGatewayArmReference natGateway; + + /* + * Provisioning state of the public IP + */ + private ProvisioningStateEnum provisioningState; + + /** + * Creates an instance of PublicIPAddressProperties class. + */ + public PublicIPAddressProperties() { + } + + /** + * Get the publicIPAddressVersion property: Whether the public IP is v4 or v6. Defaults to IPv4. + * + * @return the publicIPAddressVersion value. + */ + public PublicIPAddressType publicIPAddressVersion() { + return this.publicIPAddressVersion; + } + + /** + * Set the publicIPAddressVersion property: Whether the public IP is v4 or v6. Defaults to IPv4. + * + * @param publicIPAddressVersion the publicIPAddressVersion value to set. + * @return the PublicIPAddressProperties object itself. + */ + public PublicIPAddressProperties withPublicIPAddressVersion(PublicIPAddressType publicIPAddressVersion) { + this.publicIPAddressVersion = publicIPAddressVersion; + return this; + } + + /** + * Get the ipAllocationScope property: ipAllocationScope: Azure Reference to a particular IP Pool (ALM) or a + * LogicalNetwork (ALL) for allocating public IP. + * + * @return the ipAllocationScope value. + */ + public String ipAllocationScope() { + return this.ipAllocationScope; + } + + /** + * Set the ipAllocationScope property: ipAllocationScope: Azure Reference to a particular IP Pool (ALM) or a + * LogicalNetwork (ALL) for allocating public IP. + * + * @param ipAllocationScope the ipAllocationScope value to set. + * @return the PublicIPAddressProperties object itself. + */ + public PublicIPAddressProperties withIpAllocationScope(String ipAllocationScope) { + this.ipAllocationScope = ipAllocationScope; + return this; + } + + /** + * Get the ipAddress property: IP Address. This is static. If the user specifies, we allocate that otherwise + * allocate from logical network address space. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the ipAddress property: IP Address. This is static. If the user specifies, we allocate that otherwise + * allocate from logical network address space. + * + * @param ipAddress the ipAddress value to set. + * @return the PublicIPAddressProperties object itself. + */ + public PublicIPAddressProperties withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the ipConfiguration property: network interface or LoadBalancer frontendIPconfiguration using this public IP. + * + * @return the ipConfiguration value. + */ + public IPConfigurationArmReference ipConfiguration() { + return this.ipConfiguration; + } + + /** + * Get the natGateway property: natGateway using this public IP. + * + * @return the natGateway value. + */ + public NatGatewayArmReference natGateway() { + return this.natGateway; + } + + /** + * Get the provisioningState property: Provisioning state of the public IP. + * + * @return the provisioningState value. + */ + public ProvisioningStateEnum provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("publicIPAddressVersion", + this.publicIPAddressVersion == null ? null : this.publicIPAddressVersion.toString()); + jsonWriter.writeStringField("ipAllocationScope", this.ipAllocationScope); + jsonWriter.writeStringField("ipAddress", this.ipAddress); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PublicIPAddressProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PublicIPAddressProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PublicIPAddressProperties. + */ + public static PublicIPAddressProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PublicIPAddressProperties deserializedPublicIPAddressProperties = new PublicIPAddressProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicIPAddressVersion".equals(fieldName)) { + deserializedPublicIPAddressProperties.publicIPAddressVersion + = PublicIPAddressType.fromString(reader.getString()); + } else if ("ipAllocationScope".equals(fieldName)) { + deserializedPublicIPAddressProperties.ipAllocationScope = reader.getString(); + } else if ("ipAddress".equals(fieldName)) { + deserializedPublicIPAddressProperties.ipAddress = reader.getString(); + } else if ("ipConfiguration".equals(fieldName)) { + deserializedPublicIPAddressProperties.ipConfiguration + = IPConfigurationArmReference.fromJson(reader); + } else if ("natGateway".equals(fieldName)) { + deserializedPublicIPAddressProperties.natGateway = NatGatewayArmReference.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedPublicIPAddressProperties.provisioningState + = ProvisioningStateEnum.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPublicIPAddressProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddressTagsUpdate.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddressTagsUpdate.java new file mode 100644 index 0000000000000..a25f66da200ab --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddressTagsUpdate.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for updating tags in PublicIPAddress resources. + */ +@Fluent +public final class PublicIPAddressTagsUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /** + * Creates an instance of PublicIPAddressTagsUpdate class. + */ + public PublicIPAddressTagsUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the PublicIPAddressTagsUpdate object itself. + */ + public PublicIPAddressTagsUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PublicIPAddressTagsUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PublicIPAddressTagsUpdate if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PublicIPAddressTagsUpdate. + */ + public static PublicIPAddressTagsUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PublicIPAddressTagsUpdate deserializedPublicIPAddressTagsUpdate = new PublicIPAddressTagsUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPublicIPAddressTagsUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedPublicIPAddressTagsUpdate; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddressType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddressType.java new file mode 100644 index 0000000000000..5ade1ad1242fa --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddressType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Type of public IP addresses. + */ +public final class PublicIPAddressType extends ExpandableStringEnum { + /** + * IPv4 IP Address. + */ + public static final PublicIPAddressType IPV4 = fromString("IPv4"); + + /** + * IPv6 IP Address. + */ + public static final PublicIPAddressType IPV6 = fromString("IPv6"); + + /** + * Creates a new instance of PublicIPAddressType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PublicIPAddressType() { + } + + /** + * Creates or finds a PublicIPAddressType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PublicIPAddressType. + */ + public static PublicIPAddressType fromString(String name) { + return fromString(name, PublicIPAddressType.class); + } + + /** + * Gets known PublicIPAddressType values. + * + * @return known PublicIPAddressType values. + */ + public static Collection values() { + return values(PublicIPAddressType.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddresses.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddresses.java new file mode 100644 index 0000000000000..1eabbe8d66037 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddresses.java @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of PublicIPAddresses. + */ +public interface PublicIPAddresses { + /** + * The operation to get a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String publicIPAddressName, + Context context); + + /** + * The operation to get a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition. + */ + PublicIPAddress getByResourceGroup(String resourceGroupName, String publicIPAddressName); + + /** + * The operation to delete a publicIPAddresses. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String publicIPAddressName); + + /** + * The operation to delete a publicIPAddresses. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPAddressName Name of the public IP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String publicIPAddressName, Context context); + + /** + * Lists all of the publicIPAddresses in the specified resource group. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all of the publicIPAddresses in the specified resource group. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Lists all of the publicIPAddresses in the specified subscription. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Lists all of the publicIPAddresses in the specified subscription. Use the nextLink property in the response to + * get the next page of PublicIP. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a PublicIPAddress list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * The operation to get a virtual network. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition along with {@link Response}. + */ + PublicIPAddress getById(String id); + + /** + * The operation to get a virtual network. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the publicIP resource definition along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * The operation to delete a publicIPAddresses. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * The operation to delete a publicIPAddresses. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new PublicIPAddress resource. + * + * @param name resource name. + * @return the first stage of the new PublicIPAddress definition. + */ + PublicIPAddress.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Snapshot.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Snapshot.java new file mode 100644 index 0000000000000..3cb02ec3936d6 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Snapshot.java @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.SnapshotInner; +import java.util.Map; + +/** + * An immutable client-side representation of Snapshot. + */ +public interface Snapshot { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + SnapshotProperties properties(); + + /** + * Gets the extendedLocation property: The extendedLocation of the resource. + * + * @return the extendedLocation value. + */ + ExtendedLocation extendedLocation(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.vm.fluent.models.SnapshotInner object. + * + * @return the inner object. + */ + SnapshotInner innerModel(); + + /** + * The entirety of the Snapshot definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The Snapshot definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Snapshot definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the Snapshot definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the Snapshot definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the Snapshot definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithExtendedLocation { + /** + * Executes the create request. + * + * @return the created resource. + */ + Snapshot create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Snapshot create(Context context); + } + + /** + * The stage of the Snapshot definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the Snapshot definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(SnapshotProperties properties); + } + + /** + * The stage of the Snapshot definition allowing to specify extendedLocation. + */ + interface WithExtendedLocation { + /** + * Specifies the extendedLocation property: The extendedLocation of the resource.. + * + * @param extendedLocation The extendedLocation of the resource. + * @return the next definition stage. + */ + WithCreate withExtendedLocation(ExtendedLocation extendedLocation); + } + } + + /** + * Begins update for the Snapshot resource. + * + * @return the stage of resource update. + */ + Snapshot.Update update(); + + /** + * The template for Snapshot update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Snapshot apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Snapshot apply(Context context); + } + + /** + * The Snapshot update stages. + */ + interface UpdateStages { + /** + * The stage of the Snapshot update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Snapshot refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Snapshot refresh(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SnapshotProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SnapshotProperties.java new file mode 100644 index 0000000000000..c15895bf84e47 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SnapshotProperties.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Properties under the snapshot resource. + */ +@Fluent +public final class SnapshotProperties implements JsonSerializable { + /* + * Data used when creating a snapshot + */ + private CreationData creationData; + + /* + * The time when the snapshot was created. + */ + private OffsetDateTime timeCreated; + + /* + * The size of the disk in bytes. + */ + private Long diskSizeBytes; + + /* + * Unique identifier for the snapshot. + */ + private String uniqueId; + + /* + * Provisioning state of the snapshot. + */ + private ProvisioningStateEnum provisioningState; + + /* + * The observed state of snapshots + */ + private SnapshotStatus status; + + /** + * Creates an instance of SnapshotProperties class. + */ + public SnapshotProperties() { + } + + /** + * Get the creationData property: Data used when creating a snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.creationData; + } + + /** + * Set the creationData property: Data used when creating a snapshot. + * + * @param creationData the creationData value to set. + * @return the SnapshotProperties object itself. + */ + public SnapshotProperties withCreationData(CreationData creationData) { + this.creationData = creationData; + return this; + } + + /** + * Get the timeCreated property: The time when the snapshot was created. + * + * @return the timeCreated value. + */ + public OffsetDateTime timeCreated() { + return this.timeCreated; + } + + /** + * Get the diskSizeBytes property: The size of the disk in bytes. + * + * @return the diskSizeBytes value. + */ + public Long diskSizeBytes() { + return this.diskSizeBytes; + } + + /** + * Get the uniqueId property: Unique identifier for the snapshot. + * + * @return the uniqueId value. + */ + public String uniqueId() { + return this.uniqueId; + } + + /** + * Get the provisioningState property: Provisioning state of the snapshot. + * + * @return the provisioningState value. + */ + public ProvisioningStateEnum provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: The observed state of snapshots. + * + * @return the status value. + */ + public SnapshotStatus status() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("creationData", this.creationData); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SnapshotProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SnapshotProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SnapshotProperties. + */ + public static SnapshotProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SnapshotProperties deserializedSnapshotProperties = new SnapshotProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("creationData".equals(fieldName)) { + deserializedSnapshotProperties.creationData = CreationData.fromJson(reader); + } else if ("timeCreated".equals(fieldName)) { + deserializedSnapshotProperties.timeCreated = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("diskSizeBytes".equals(fieldName)) { + deserializedSnapshotProperties.diskSizeBytes = reader.getNullable(JsonReader::getLong); + } else if ("uniqueId".equals(fieldName)) { + deserializedSnapshotProperties.uniqueId = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedSnapshotProperties.provisioningState + = ProvisioningStateEnum.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedSnapshotProperties.status = SnapshotStatus.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSnapshotProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SnapshotStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SnapshotStatus.java new file mode 100644 index 0000000000000..49ebfbb7076ba --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SnapshotStatus.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The observed state of snapshots. + */ +@Immutable +public final class SnapshotStatus implements JsonSerializable { + /* + * Snapshot provisioning error code + */ + private String errorCode; + + /* + * Descriptive error message + */ + private String errorMessage; + + /* + * Provisioning status of the snapshot + */ + private SnapshotStatusProvisioningStatus provisioningStatus; + + /** + * Creates an instance of SnapshotStatus class. + */ + private SnapshotStatus() { + } + + /** + * Get the errorCode property: Snapshot provisioning error code. + * + * @return the errorCode value. + */ + public String errorCode() { + return this.errorCode; + } + + /** + * Get the errorMessage property: Descriptive error message. + * + * @return the errorMessage value. + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Get the provisioningStatus property: Provisioning status of the snapshot. + * + * @return the provisioningStatus value. + */ + public SnapshotStatusProvisioningStatus provisioningStatus() { + return this.provisioningStatus; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("errorCode", this.errorCode); + jsonWriter.writeStringField("errorMessage", this.errorMessage); + jsonWriter.writeJsonField("provisioningStatus", this.provisioningStatus); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SnapshotStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SnapshotStatus if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SnapshotStatus. + */ + public static SnapshotStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SnapshotStatus deserializedSnapshotStatus = new SnapshotStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("errorCode".equals(fieldName)) { + deserializedSnapshotStatus.errorCode = reader.getString(); + } else if ("errorMessage".equals(fieldName)) { + deserializedSnapshotStatus.errorMessage = reader.getString(); + } else if ("provisioningStatus".equals(fieldName)) { + deserializedSnapshotStatus.provisioningStatus = SnapshotStatusProvisioningStatus.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSnapshotStatus; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SnapshotStatusProvisioningStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SnapshotStatusProvisioningStatus.java new file mode 100644 index 0000000000000..94f6ad6f68a1d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SnapshotStatusProvisioningStatus.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Snapshot Status provisioning status. + */ +@Immutable +public final class SnapshotStatusProvisioningStatus implements JsonSerializable { + /* + * The ID of the operation performed on the snapshot + */ + private String operationId; + + /* + * The status of the operation performed on the snapshot [Succeeded, Failed, InProgress] + */ + private Status status; + + /** + * Creates an instance of SnapshotStatusProvisioningStatus class. + */ + private SnapshotStatusProvisioningStatus() { + } + + /** + * Get the operationId property: The ID of the operation performed on the snapshot. + * + * @return the operationId value. + */ + public String operationId() { + return this.operationId; + } + + /** + * Get the status property: The status of the operation performed on the snapshot [Succeeded, Failed, InProgress]. + * + * @return the status value. + */ + public Status status() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("operationId", this.operationId); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SnapshotStatusProvisioningStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SnapshotStatusProvisioningStatus if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SnapshotStatusProvisioningStatus. + */ + public static SnapshotStatusProvisioningStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SnapshotStatusProvisioningStatus deserializedSnapshotStatusProvisioningStatus + = new SnapshotStatusProvisioningStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operationId".equals(fieldName)) { + deserializedSnapshotStatusProvisioningStatus.operationId = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedSnapshotStatusProvisioningStatus.status = Status.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSnapshotStatusProvisioningStatus; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SnapshotTagsUpdate.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SnapshotTagsUpdate.java new file mode 100644 index 0000000000000..fe5f463129ffc --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SnapshotTagsUpdate.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for updating tags in Snapshot resources. + */ +@Fluent +public final class SnapshotTagsUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /** + * Creates an instance of SnapshotTagsUpdate class. + */ + public SnapshotTagsUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the SnapshotTagsUpdate object itself. + */ + public SnapshotTagsUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SnapshotTagsUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SnapshotTagsUpdate if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SnapshotTagsUpdate. + */ + public static SnapshotTagsUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SnapshotTagsUpdate deserializedSnapshotTagsUpdate = new SnapshotTagsUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSnapshotTagsUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedSnapshotTagsUpdate; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Snapshots.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Snapshots.java new file mode 100644 index 0000000000000..2ca58803cc89c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Snapshots.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Snapshots. + */ +public interface Snapshots { + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String snapshotName, Context context); + + /** + * Gets a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot. + */ + Snapshot getByResourceGroup(String resourceGroupName, String snapshotName); + + /** + * The operation to delete a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String snapshotName); + + /** + * The operation to delete a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param snapshotName Name of the snapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String snapshotName, Context context); + + /** + * Lists all of the snapshots in the specified resource group. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all of the snapshots in the specified resource group. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Lists all of the snapshots in the specified subscription. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Lists all of the snapshots in the specified subscription. Use the nextLink property in the response to get the + * next page of snapshots. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Snapshot list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Gets a snapshot. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response}. + */ + Snapshot getById(String id); + + /** + * Gets a snapshot. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * The operation to delete a snapshot. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * The operation to delete a snapshot. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Snapshot resource. + * + * @param name resource name. + * @return the first stage of the new Snapshot definition. + */ + Snapshot.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Subnet.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Subnet.java index 78a7301086176..f70d6d0147c85 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Subnet.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Subnet.java @@ -254,6 +254,15 @@ public Subnet withVlan(Integer vlan) { return this; } + /** + * Get the provisioningState property: Provisioning state of the subnet resource. + * + * @return the provisioningState value. + */ + public ProvisioningStateEnum provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + /** * {@inheritDoc} */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SubnetIpConfigurationReference.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SubnetIpConfigurationReference.java index 2084b00839fc4..67304d3029feb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SubnetIpConfigurationReference.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SubnetIpConfigurationReference.java @@ -12,12 +12,12 @@ import java.io.IOException; /** - * The ARM ID for a Network Interface. + * The Azure Resource ID for a Network Interface. */ @Fluent public final class SubnetIpConfigurationReference implements JsonSerializable { /* - * The ARM ID for a Network Interface. + * The Azure Resource ID for a Network Interface. */ private String id; @@ -28,7 +28,7 @@ public SubnetIpConfigurationReference() { } /** - * Get the id property: The ARM ID for a Network Interface. + * Get the id property: The Azure Resource ID for a Network Interface. * * @return the id value. */ @@ -37,7 +37,7 @@ public String id() { } /** - * Set the id property: The ARM ID for a Network Interface. + * Set the id property: The Azure Resource ID for a Network Interface. * * @param id the id value to set. * @return the SubnetIpConfigurationReference object itself. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskArmReference.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskArmReference.java index 0ead3c57cb392..9d574368be20d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskArmReference.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskArmReference.java @@ -12,12 +12,12 @@ import java.io.IOException; /** - * The ARM ID for a Virtual Hard Disk. + * The Azure Resource ID for a Virtual Hard Disk. */ @Fluent public final class VirtualHardDiskArmReference implements JsonSerializable { /* - * The ARM ID for a Virtual Hard Disk. + * The Azure Resource ID for a Virtual Hard Disk. */ private String id; @@ -28,7 +28,7 @@ public VirtualHardDiskArmReference() { } /** - * Get the id property: The ARM ID for a Virtual Hard Disk. + * Get the id property: The Azure Resource ID for a Virtual Hard Disk. * * @return the id value. */ @@ -37,7 +37,7 @@ public String id() { } /** - * Set the id property: The ARM ID for a Virtual Hard Disk. + * Set the id property: The Azure Resource ID for a Virtual Hard Disk. * * @param id the id value to set. * @return the VirtualHardDiskArmReference object itself. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskProperties.java index bb9f8127fded9..6debc489340ed 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskProperties.java @@ -21,6 +21,11 @@ public final class VirtualHardDiskProperties implements JsonSerializable managedBy; @@ -104,7 +104,7 @@ public VirtualHardDiskUploadStatus uploadStatus() { } /** - * Get the managedBy property: ARM IDs of the VMs that are consuming the VHD. + * Get the managedBy property: Azure Resource IDs of the VMs that are consuming the VHD. * * @return the managedBy value. */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskUploadResponse.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskUploadResponse.java index d313473f6b84d..5c50c8e128e8c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskUploadResponse.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskUploadResponse.java @@ -11,7 +11,7 @@ */ public interface VirtualHardDiskUploadResponse { /** - * Gets the virtualHardDiskId property: The ARM ID for a Virtual Hard Disk. + * Gets the virtualHardDiskId property: The Azure Resource ID for a Virtual Hard Disk. * * @return the virtualHardDiskId value. */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceProperties.java index 02df31814a17b..17952cc992782 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceProperties.java @@ -56,6 +56,11 @@ public final class VirtualMachineInstanceProperties implements JsonSerializable< */ private Boolean createFromLocal; + /* + * HyperV name of the VM. This is only applicable when createFromLocal is true. + */ + private String localVmName; + /* * Provisioning state of the virtual machine instance. */ @@ -77,7 +82,8 @@ public final class VirtualMachineInstanceProperties implements JsonSerializable< private GuestAgentInstallStatus guestAgentInstallStatus; /* - * Unique identifier for the vm resource. + * The SMBIOS GUID of the VM (hybrid compute identity). This is null for non-secure VMs and is populated for + * TrustedLaunch and ConfidentialVM VMs. */ private String vmId; @@ -284,6 +290,26 @@ public VirtualMachineInstanceProperties withCreateFromLocal(Boolean createFromLo return this; } + /** + * Get the localVmName property: HyperV name of the VM. This is only applicable when createFromLocal is true. + * + * @return the localVmName value. + */ + public String localVmName() { + return this.localVmName; + } + + /** + * Set the localVmName property: HyperV name of the VM. This is only applicable when createFromLocal is true. + * + * @param localVmName the localVmName value to set. + * @return the VirtualMachineInstanceProperties object itself. + */ + public VirtualMachineInstanceProperties withLocalVmName(String localVmName) { + this.localVmName = localVmName; + return this; + } + /** * Get the provisioningState property: Provisioning state of the virtual machine instance. * @@ -333,7 +359,8 @@ public GuestAgentInstallStatus guestAgentInstallStatus() { } /** - * Get the vmId property: Unique identifier for the vm resource. + * Get the vmId property: The SMBIOS GUID of the VM (hybrid compute identity). This is null for non-secure VMs and + * is populated for TrustedLaunch and ConfidentialVM VMs. * * @return the vmId value. */ @@ -402,6 +429,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("storageProfile", this.storageProfile); jsonWriter.writeJsonField("httpProxyConfig", this.httpProxyConfig); jsonWriter.writeBooleanField("createFromLocal", this.createFromLocal); + jsonWriter.writeStringField("localVmName", this.localVmName); jsonWriter.writeJsonField("guestAgentInstallStatus", this.guestAgentInstallStatus); jsonWriter.writeStringField("resourceUid", this.resourceUid); return jsonWriter.writeEndObject(); @@ -447,6 +475,8 @@ public static VirtualMachineInstanceProperties fromJson(JsonReader jsonReader) t } else if ("createFromLocal".equals(fieldName)) { deserializedVirtualMachineInstanceProperties.createFromLocal = reader.getNullable(JsonReader::getBoolean); + } else if ("localVmName".equals(fieldName)) { + deserializedVirtualMachineInstanceProperties.localVmName = reader.getString(); } else if ("provisioningState".equals(fieldName)) { deserializedVirtualMachineInstanceProperties.provisioningState = ProvisioningStateEnum.fromString(reader.getString()); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig.java index 51d642f733f2e..b7d9082dd2ec3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig.java @@ -34,6 +34,12 @@ public final class VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryC */ private Integer targetMemoryBuffer; + /* + * Specifies whether dynamic memory is enabled for the virtual machine instance. When omitted, dynamic memory + * remains enabled; setting this to false converts the virtual machine instance to static memory. + */ + private Boolean enabled; + /** * Creates an instance of VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig class. */ @@ -109,6 +115,30 @@ public Integer targetMemoryBuffer() { return this; } + /** + * Get the enabled property: Specifies whether dynamic memory is enabled for the virtual machine instance. When + * omitted, dynamic memory remains enabled; setting this to false converts the virtual machine instance to static + * memory. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Specifies whether dynamic memory is enabled for the virtual machine instance. When + * omitted, dynamic memory remains enabled; setting this to false converts the virtual machine instance to static + * memory. + * + * @param enabled the enabled value to set. + * @return the VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig object itself. + */ + public VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + /** * {@inheritDoc} */ @@ -118,6 +148,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeNumberField("maximumMemoryMB", this.maximumMemoryMB); jsonWriter.writeNumberField("minimumMemoryMB", this.minimumMemoryMB); jsonWriter.writeNumberField("targetMemoryBuffer", this.targetMemoryBuffer); + jsonWriter.writeBooleanField("enabled", this.enabled); return jsonWriter.writeEndObject(); } @@ -148,6 +179,9 @@ public static VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig } else if ("targetMemoryBuffer".equals(fieldName)) { deserializedVirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig.targetMemoryBuffer = reader.getNullable(JsonReader::getInt); + } else if ("enabled".equals(fieldName)) { + deserializedVirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig.enabled + = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesStorageProfileOsDisk.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesStorageProfileOsDisk.java index f36b60eee2480..10c76bfb76ceb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesStorageProfileOsDisk.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesStorageProfileOsDisk.java @@ -18,7 +18,7 @@ public final class VirtualMachineInstancePropertiesStorageProfileOsDisk implements JsonSerializable { /* - * The ARM ID for a Virtual Hard Disk. + * The Azure Resource ID for a Virtual Hard Disk. */ private String id; @@ -40,7 +40,7 @@ public VirtualMachineInstancePropertiesStorageProfileOsDisk() { } /** - * Get the id property: The ARM ID for a Virtual Hard Disk. + * Get the id property: The Azure Resource ID for a Virtual Hard Disk. * * @return the id value. */ @@ -49,7 +49,7 @@ public String id() { } /** - * Set the id property: The ARM ID for a Virtual Hard Disk. + * Set the id property: The Azure Resource ID for a Virtual Hard Disk. * * @param id the id value to set. * @return the VirtualMachineInstancePropertiesStorageProfileOsDisk object itself. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceStatus.java index 5b9c1e8b8842e..c772baea9ce45 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceStatus.java @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * The observed state of virtual machine instances. @@ -36,6 +37,12 @@ public final class VirtualMachineInstanceStatus implements JsonSerializable operationDetails; + /** * Creates an instance of VirtualMachineInstanceStatus class. */ @@ -78,6 +85,16 @@ public VirtualMachineInstanceStatusProvisioningStatus provisioningStatus() { return this.provisioningStatus; } + /** + * Get the operationDetails property: Ordered steps of the current operation on the virtual machine instance. Steps + * are replaced when a new operation begins and are omitted when no step details are available. + * + * @return the operationDetails value. + */ + public List operationDetails() { + return this.operationDetails; + } + /** * {@inheritDoc} */ @@ -115,6 +132,10 @@ public static VirtualMachineInstanceStatus fromJson(JsonReader jsonReader) throw } else if ("provisioningStatus".equals(fieldName)) { deserializedVirtualMachineInstanceStatus.provisioningStatus = VirtualMachineInstanceStatusProvisioningStatus.fromJson(reader); + } else if ("operationDetails".equals(fieldName)) { + List operationDetails + = reader.readArray(reader1 -> OperationStepResult.fromJson(reader1)); + deserializedVirtualMachineInstanceStatus.operationDetails = operationDetails; } else { reader.skipChildren(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstances.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstances.java index beafd4df47861..fa8fdefbcb6a2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstances.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstances.java @@ -236,4 +236,29 @@ public interface VirtualMachineInstances { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void save(String resourceUri, Context context); + + /** + * The operation to power off a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + OperationStatusResult powerOff(String resourceUri, PowerOffVirtualMachineOptions body); + + /** + * The operation to power off a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + OperationStatusResult powerOff(String resourceUri, PowerOffVirtualMachineOptions body, Context context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetwork.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetwork.java new file mode 100644 index 0000000000000..b664045e54be4 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetwork.java @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualNetworkInner; +import java.util.Map; + +/** + * An immutable client-side representation of VirtualNetwork. + */ +public interface VirtualNetwork { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + VirtualNetworkProperties properties(); + + /** + * Gets the extendedLocation property: The extendedLocation of the resource. + * + * @return the extendedLocation value. + */ + ExtendedLocation extendedLocation(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualNetworkInner object. + * + * @return the inner object. + */ + VirtualNetworkInner innerModel(); + + /** + * The entirety of the VirtualNetwork definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The VirtualNetwork definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the VirtualNetwork definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the VirtualNetwork definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the VirtualNetwork definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the VirtualNetwork definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithExtendedLocation { + /** + * Executes the create request. + * + * @return the created resource. + */ + VirtualNetwork create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + VirtualNetwork create(Context context); + } + + /** + * The stage of the VirtualNetwork definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the VirtualNetwork definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(VirtualNetworkProperties properties); + } + + /** + * The stage of the VirtualNetwork definition allowing to specify extendedLocation. + */ + interface WithExtendedLocation { + /** + * Specifies the extendedLocation property: The extendedLocation of the resource.. + * + * @param extendedLocation The extendedLocation of the resource. + * @return the next definition stage. + */ + WithCreate withExtendedLocation(ExtendedLocation extendedLocation); + } + } + + /** + * Begins update for the VirtualNetwork resource. + * + * @return the stage of resource update. + */ + VirtualNetwork.Update update(); + + /** + * The template for VirtualNetwork update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + VirtualNetwork apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + VirtualNetwork apply(Context context); + } + + /** + * The VirtualNetwork update stages. + */ + interface UpdateStages { + /** + * The stage of the VirtualNetwork update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + VirtualNetwork refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + VirtualNetwork refresh(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkAddressSpace.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkAddressSpace.java new file mode 100644 index 0000000000000..2b2bb343b18f0 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkAddressSpace.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Address Space Information. + */ +@Fluent +public final class VirtualNetworkAddressSpace implements JsonSerializable { + /* + * A list of one or more CIDR blocks that define the address space. + */ + private List addressPrefixes; + + /** + * Creates an instance of VirtualNetworkAddressSpace class. + */ + public VirtualNetworkAddressSpace() { + } + + /** + * Get the addressPrefixes property: A list of one or more CIDR blocks that define the address space. + * + * @return the addressPrefixes value. + */ + public List addressPrefixes() { + return this.addressPrefixes; + } + + /** + * Set the addressPrefixes property: A list of one or more CIDR blocks that define the address space. + * + * @param addressPrefixes the addressPrefixes value to set. + * @return the VirtualNetworkAddressSpace object itself. + */ + public VirtualNetworkAddressSpace withAddressPrefixes(List addressPrefixes) { + this.addressPrefixes = addressPrefixes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("addressPrefixes", this.addressPrefixes, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkAddressSpace from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkAddressSpace if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VirtualNetworkAddressSpace. + */ + public static VirtualNetworkAddressSpace fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkAddressSpace deserializedVirtualNetworkAddressSpace = new VirtualNetworkAddressSpace(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("addressPrefixes".equals(fieldName)) { + List addressPrefixes = reader.readArray(reader1 -> reader1.getString()); + deserializedVirtualNetworkAddressSpace.addressPrefixes = addressPrefixes; + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkAddressSpace; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkArmReference.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkArmReference.java new file mode 100644 index 0000000000000..4ac5c689f58c2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkArmReference.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Azure Resource ID for a Virtual Network. + */ +@Fluent +public final class VirtualNetworkArmReference implements JsonSerializable { + /* + * The Azure Resource ID for a Virtual Network. + */ + private String resourceId; + + /** + * Creates an instance of VirtualNetworkArmReference class. + */ + public VirtualNetworkArmReference() { + } + + /** + * Get the resourceId property: The Azure Resource ID for a Virtual Network. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The Azure Resource ID for a Virtual Network. + * + * @param resourceId the resourceId value to set. + * @return the VirtualNetworkArmReference object itself. + */ + public VirtualNetworkArmReference withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkArmReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkArmReference if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VirtualNetworkArmReference. + */ + public static VirtualNetworkArmReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkArmReference deserializedVirtualNetworkArmReference = new VirtualNetworkArmReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedVirtualNetworkArmReference.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkArmReference; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkDhcpOptions.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkDhcpOptions.java new file mode 100644 index 0000000000000..ec36ef235126f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkDhcpOptions.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * DHCP options for virtual networks. + */ +@Fluent +public final class VirtualNetworkDhcpOptions implements JsonSerializable { + /* + * An array of DNS server IP addresses that VMs or wokloads in the vnet can inherit + */ + private List dnsServers; + + /** + * Creates an instance of VirtualNetworkDhcpOptions class. + */ + public VirtualNetworkDhcpOptions() { + } + + /** + * Get the dnsServers property: An array of DNS server IP addresses that VMs or wokloads in the vnet can inherit. + * + * @return the dnsServers value. + */ + public List dnsServers() { + return this.dnsServers; + } + + /** + * Set the dnsServers property: An array of DNS server IP addresses that VMs or wokloads in the vnet can inherit. + * + * @param dnsServers the dnsServers value to set. + * @return the VirtualNetworkDhcpOptions object itself. + */ + public VirtualNetworkDhcpOptions withDnsServers(List dnsServers) { + this.dnsServers = dnsServers; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("dnsServers", this.dnsServers, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkDhcpOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkDhcpOptions if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VirtualNetworkDhcpOptions. + */ + public static VirtualNetworkDhcpOptions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkDhcpOptions deserializedVirtualNetworkDhcpOptions = new VirtualNetworkDhcpOptions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dnsServers".equals(fieldName)) { + List dnsServers = reader.readArray(reader1 -> reader1.getString()); + deserializedVirtualNetworkDhcpOptions.dnsServers = dnsServers; + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkDhcpOptions; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkProperties.java new file mode 100644 index 0000000000000..b87afc5377356 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkProperties.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Virtual network resource properties. + */ +@Fluent +public final class VirtualNetworkProperties implements JsonSerializable { + /* + * Virtual Network address space. All subnets must be within the defined range. + */ + private VirtualNetworkAddressSpace addressSpace; + + /* + * Virtual Network DHCP options. Inherited by all subnets and VMs. + */ + private VirtualNetworkDhcpOptions dhcpOptions; + + /* + * The provisioning state of the virtual network resource. + */ + private ProvisioningStateEnum provisioningState; + + /* + * The observed status of Virtual Network + */ + private VirtualNetworkStatus status; + + /** + * Creates an instance of VirtualNetworkProperties class. + */ + public VirtualNetworkProperties() { + } + + /** + * Get the addressSpace property: Virtual Network address space. All subnets must be within the defined range. + * + * @return the addressSpace value. + */ + public VirtualNetworkAddressSpace addressSpace() { + return this.addressSpace; + } + + /** + * Set the addressSpace property: Virtual Network address space. All subnets must be within the defined range. + * + * @param addressSpace the addressSpace value to set. + * @return the VirtualNetworkProperties object itself. + */ + public VirtualNetworkProperties withAddressSpace(VirtualNetworkAddressSpace addressSpace) { + this.addressSpace = addressSpace; + return this; + } + + /** + * Get the dhcpOptions property: Virtual Network DHCP options. Inherited by all subnets and VMs. + * + * @return the dhcpOptions value. + */ + public VirtualNetworkDhcpOptions dhcpOptions() { + return this.dhcpOptions; + } + + /** + * Set the dhcpOptions property: Virtual Network DHCP options. Inherited by all subnets and VMs. + * + * @param dhcpOptions the dhcpOptions value to set. + * @return the VirtualNetworkProperties object itself. + */ + public VirtualNetworkProperties withDhcpOptions(VirtualNetworkDhcpOptions dhcpOptions) { + this.dhcpOptions = dhcpOptions; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the virtual network resource. + * + * @return the provisioningState value. + */ + public ProvisioningStateEnum provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: The observed status of Virtual Network. + * + * @return the status value. + */ + public VirtualNetworkStatus status() { + return this.status; + } + + /** + * Set the status property: The observed status of Virtual Network. + * + * @param status the status value to set. + * @return the VirtualNetworkProperties object itself. + */ + public VirtualNetworkProperties withStatus(VirtualNetworkStatus status) { + this.status = status; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("addressSpace", this.addressSpace); + jsonWriter.writeJsonField("dhcpOptions", this.dhcpOptions); + jsonWriter.writeJsonField("status", this.status); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VirtualNetworkProperties. + */ + public static VirtualNetworkProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkProperties deserializedVirtualNetworkProperties = new VirtualNetworkProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("addressSpace".equals(fieldName)) { + deserializedVirtualNetworkProperties.addressSpace = VirtualNetworkAddressSpace.fromJson(reader); + } else if ("dhcpOptions".equals(fieldName)) { + deserializedVirtualNetworkProperties.dhcpOptions = VirtualNetworkDhcpOptions.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedVirtualNetworkProperties.provisioningState + = ProvisioningStateEnum.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedVirtualNetworkProperties.status = VirtualNetworkStatus.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkStatus.java new file mode 100644 index 0000000000000..a26797958e05b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkStatus.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The observed status of the virtual network. + */ +@Fluent +public final class VirtualNetworkStatus implements JsonSerializable { + /* + * VirtualNetwork provisioning error code + */ + private String errorCode; + + /* + * Descriptive error message + */ + private String errorMessage; + + /* + * virtual network provisioning status + */ + private VirtualNetworkStatusProvisioningStatus provisioningStatus; + + /** + * Creates an instance of VirtualNetworkStatus class. + */ + public VirtualNetworkStatus() { + } + + /** + * Get the errorCode property: VirtualNetwork provisioning error code. + * + * @return the errorCode value. + */ + public String errorCode() { + return this.errorCode; + } + + /** + * Set the errorCode property: VirtualNetwork provisioning error code. + * + * @param errorCode the errorCode value to set. + * @return the VirtualNetworkStatus object itself. + */ + public VirtualNetworkStatus withErrorCode(String errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * Get the errorMessage property: Descriptive error message. + * + * @return the errorMessage value. + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Set the errorMessage property: Descriptive error message. + * + * @param errorMessage the errorMessage value to set. + * @return the VirtualNetworkStatus object itself. + */ + public VirtualNetworkStatus withErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Get the provisioningStatus property: virtual network provisioning status. + * + * @return the provisioningStatus value. + */ + public VirtualNetworkStatusProvisioningStatus provisioningStatus() { + return this.provisioningStatus; + } + + /** + * Set the provisioningStatus property: virtual network provisioning status. + * + * @param provisioningStatus the provisioningStatus value to set. + * @return the VirtualNetworkStatus object itself. + */ + public VirtualNetworkStatus withProvisioningStatus(VirtualNetworkStatusProvisioningStatus provisioningStatus) { + this.provisioningStatus = provisioningStatus; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("errorCode", this.errorCode); + jsonWriter.writeStringField("errorMessage", this.errorMessage); + jsonWriter.writeJsonField("provisioningStatus", this.provisioningStatus); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkStatus if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VirtualNetworkStatus. + */ + public static VirtualNetworkStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkStatus deserializedVirtualNetworkStatus = new VirtualNetworkStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("errorCode".equals(fieldName)) { + deserializedVirtualNetworkStatus.errorCode = reader.getString(); + } else if ("errorMessage".equals(fieldName)) { + deserializedVirtualNetworkStatus.errorMessage = reader.getString(); + } else if ("provisioningStatus".equals(fieldName)) { + deserializedVirtualNetworkStatus.provisioningStatus + = VirtualNetworkStatusProvisioningStatus.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkStatus; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkStatusProvisioningStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkStatusProvisioningStatus.java new file mode 100644 index 0000000000000..a38f29b366ece --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkStatusProvisioningStatus.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Status of virtual network operations. + */ +@Fluent +public final class VirtualNetworkStatusProvisioningStatus + implements JsonSerializable { + /* + * The ID of the operation performed on the virtual network + */ + private String operationId; + + /* + * The status of the operation performed on the virtual network [Succeeded, Failed, InProgress] + */ + private Status status; + + /** + * Creates an instance of VirtualNetworkStatusProvisioningStatus class. + */ + public VirtualNetworkStatusProvisioningStatus() { + } + + /** + * Get the operationId property: The ID of the operation performed on the virtual network. + * + * @return the operationId value. + */ + public String operationId() { + return this.operationId; + } + + /** + * Set the operationId property: The ID of the operation performed on the virtual network. + * + * @param operationId the operationId value to set. + * @return the VirtualNetworkStatusProvisioningStatus object itself. + */ + public VirtualNetworkStatusProvisioningStatus withOperationId(String operationId) { + this.operationId = operationId; + return this; + } + + /** + * Get the status property: The status of the operation performed on the virtual network [Succeeded, Failed, + * InProgress]. + * + * @return the status value. + */ + public Status status() { + return this.status; + } + + /** + * Set the status property: The status of the operation performed on the virtual network [Succeeded, Failed, + * InProgress]. + * + * @param status the status value to set. + * @return the VirtualNetworkStatusProvisioningStatus object itself. + */ + public VirtualNetworkStatusProvisioningStatus withStatus(Status status) { + this.status = status; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("operationId", this.operationId); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkStatusProvisioningStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkStatusProvisioningStatus if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VirtualNetworkStatusProvisioningStatus. + */ + public static VirtualNetworkStatusProvisioningStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkStatusProvisioningStatus deserializedVirtualNetworkStatusProvisioningStatus + = new VirtualNetworkStatusProvisioningStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operationId".equals(fieldName)) { + deserializedVirtualNetworkStatusProvisioningStatus.operationId = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedVirtualNetworkStatusProvisioningStatus.status = Status.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkStatusProvisioningStatus; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnet.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnet.java new file mode 100644 index 0000000000000..6ee332ed78ade --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnet.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualNetworkSubnetInner; + +/** + * An immutable client-side representation of VirtualNetworkSubnet. + */ +public interface VirtualNetworkSubnet { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + VirtualNetworkSubnetProperties properties(); + + /** + * Gets the extendedLocation property: The extendedLocation of the resource. + * + * @return the extendedLocation value. + */ + ExtendedLocation extendedLocation(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualNetworkSubnetInner object. + * + * @return the inner object. + */ + VirtualNetworkSubnetInner innerModel(); + + /** + * The entirety of the VirtualNetworkSubnet definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The VirtualNetworkSubnet definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the VirtualNetworkSubnet definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the VirtualNetworkSubnet definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, virtualNetworkName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @return the next definition stage. + */ + WithCreate withExistingVirtualNetwork(String resourceGroupName, String virtualNetworkName); + } + + /** + * The stage of the VirtualNetworkSubnet definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties, DefinitionStages.WithExtendedLocation { + /** + * Executes the create request. + * + * @return the created resource. + */ + VirtualNetworkSubnet create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + VirtualNetworkSubnet create(Context context); + } + + /** + * The stage of the VirtualNetworkSubnet definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(VirtualNetworkSubnetProperties properties); + } + + /** + * The stage of the VirtualNetworkSubnet definition allowing to specify extendedLocation. + */ + interface WithExtendedLocation { + /** + * Specifies the extendedLocation property: The extendedLocation of the resource.. + * + * @param extendedLocation The extendedLocation of the resource. + * @return the next definition stage. + */ + WithCreate withExtendedLocation(ExtendedLocation extendedLocation); + } + } + + /** + * Begins update for the VirtualNetworkSubnet resource. + * + * @return the stage of resource update. + */ + VirtualNetworkSubnet.Update update(); + + /** + * The template for VirtualNetworkSubnet update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + VirtualNetworkSubnet apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + VirtualNetworkSubnet apply(Context context); + } + + /** + * The VirtualNetworkSubnet update stages. + */ + interface UpdateStages { + /** + * The stage of the VirtualNetworkSubnet update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: properties to update. + * + * @param properties properties to update. + * @return the next definition stage. + */ + Update withProperties(VirtualNetworkSubnetUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + VirtualNetworkSubnet refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + VirtualNetworkSubnet refresh(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetArmReference.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetArmReference.java new file mode 100644 index 0000000000000..3beff15fc96db --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetArmReference.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Azure Resource ID for a Virtual Network subnet. + */ +@Fluent +public final class VirtualNetworkSubnetArmReference implements JsonSerializable { + /* + * The Azure Resource ID for a Virtual Network subnet. + */ + private String resourceId; + + /** + * Creates an instance of VirtualNetworkSubnetArmReference class. + */ + public VirtualNetworkSubnetArmReference() { + } + + /** + * Get the resourceId property: The Azure Resource ID for a Virtual Network subnet. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The Azure Resource ID for a Virtual Network subnet. + * + * @param resourceId the resourceId value to set. + * @return the VirtualNetworkSubnetArmReference object itself. + */ + public VirtualNetworkSubnetArmReference withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkSubnetArmReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkSubnetArmReference if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VirtualNetworkSubnetArmReference. + */ + public static VirtualNetworkSubnetArmReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkSubnetArmReference deserializedVirtualNetworkSubnetArmReference + = new VirtualNetworkSubnetArmReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedVirtualNetworkSubnetArmReference.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkSubnetArmReference; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetIpConfigurationReference.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetIpConfigurationReference.java new file mode 100644 index 0000000000000..55b54f1169a5b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetIpConfigurationReference.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Azure Resource ID for a resource consuming IP on a subnet. + */ +@Immutable +public final class VirtualNetworkSubnetIpConfigurationReference + implements JsonSerializable { + /* + * The Azure Resource ID for a Network Interface. + */ + private String id; + + /** + * Creates an instance of VirtualNetworkSubnetIpConfigurationReference class. + */ + private VirtualNetworkSubnetIpConfigurationReference() { + } + + /** + * Get the id property: The Azure Resource ID for a Network Interface. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkSubnetIpConfigurationReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkSubnetIpConfigurationReference if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VirtualNetworkSubnetIpConfigurationReference. + */ + public static VirtualNetworkSubnetIpConfigurationReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkSubnetIpConfigurationReference deserializedVirtualNetworkSubnetIpConfigurationReference + = new VirtualNetworkSubnetIpConfigurationReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedVirtualNetworkSubnetIpConfigurationReference.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkSubnetIpConfigurationReference; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetProperties.java new file mode 100644 index 0000000000000..9e3960de16f79 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetProperties.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * VirtualNetwork subnet resource. + */ +@Fluent +public final class VirtualNetworkSubnetProperties implements JsonSerializable { + /* + * Subnet CIDR + */ + private String addressPrefix; + + /* + * Network Security Group attached to the subnet. + */ + private NetworkSecurityGroupArmReference networkSecurityGroup; + + /* + * Nat Gateway attached to the subnet for non-vnet traffic. + */ + private NatGatewayArmReference natGateway; + + /* + * RouteTable defining custom routes for the subnet. + */ + private RouteTable routeTable; + + /* + * List of ip configurations for the subnet + */ + private List ipConfigurations; + + /* + * The provisioning state of the virtual network subnet resource. + */ + private ProvisioningStateEnum provisioningState; + + /* + * The observed status of the virtual network subnet resource. + */ + private VirtualNetworkSubnetStatus status; + + /** + * Creates an instance of VirtualNetworkSubnetProperties class. + */ + public VirtualNetworkSubnetProperties() { + } + + /** + * Get the addressPrefix property: Subnet CIDR. + * + * @return the addressPrefix value. + */ + public String addressPrefix() { + return this.addressPrefix; + } + + /** + * Set the addressPrefix property: Subnet CIDR. + * + * @param addressPrefix the addressPrefix value to set. + * @return the VirtualNetworkSubnetProperties object itself. + */ + public VirtualNetworkSubnetProperties withAddressPrefix(String addressPrefix) { + this.addressPrefix = addressPrefix; + return this; + } + + /** + * Get the networkSecurityGroup property: Network Security Group attached to the subnet. + * + * @return the networkSecurityGroup value. + */ + public NetworkSecurityGroupArmReference networkSecurityGroup() { + return this.networkSecurityGroup; + } + + /** + * Set the networkSecurityGroup property: Network Security Group attached to the subnet. + * + * @param networkSecurityGroup the networkSecurityGroup value to set. + * @return the VirtualNetworkSubnetProperties object itself. + */ + public VirtualNetworkSubnetProperties + withNetworkSecurityGroup(NetworkSecurityGroupArmReference networkSecurityGroup) { + this.networkSecurityGroup = networkSecurityGroup; + return this; + } + + /** + * Get the natGateway property: Nat Gateway attached to the subnet for non-vnet traffic. + * + * @return the natGateway value. + */ + public NatGatewayArmReference natGateway() { + return this.natGateway; + } + + /** + * Set the natGateway property: Nat Gateway attached to the subnet for non-vnet traffic. + * + * @param natGateway the natGateway value to set. + * @return the VirtualNetworkSubnetProperties object itself. + */ + public VirtualNetworkSubnetProperties withNatGateway(NatGatewayArmReference natGateway) { + this.natGateway = natGateway; + return this; + } + + /** + * Get the routeTable property: RouteTable defining custom routes for the subnet. + * + * @return the routeTable value. + */ + public RouteTable routeTable() { + return this.routeTable; + } + + /** + * Set the routeTable property: RouteTable defining custom routes for the subnet. + * + * @param routeTable the routeTable value to set. + * @return the VirtualNetworkSubnetProperties object itself. + */ + public VirtualNetworkSubnetProperties withRouteTable(RouteTable routeTable) { + this.routeTable = routeTable; + return this; + } + + /** + * Get the ipConfigurations property: List of ip configurations for the subnet. + * + * @return the ipConfigurations value. + */ + public List ipConfigurations() { + return this.ipConfigurations; + } + + /** + * Get the provisioningState property: The provisioning state of the virtual network subnet resource. + * + * @return the provisioningState value. + */ + public ProvisioningStateEnum provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: The observed status of the virtual network subnet resource. + * + * @return the status value. + */ + public VirtualNetworkSubnetStatus status() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("addressPrefix", this.addressPrefix); + jsonWriter.writeJsonField("networkSecurityGroup", this.networkSecurityGroup); + jsonWriter.writeJsonField("natGateway", this.natGateway); + jsonWriter.writeJsonField("routeTable", this.routeTable); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkSubnetProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkSubnetProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VirtualNetworkSubnetProperties. + */ + public static VirtualNetworkSubnetProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkSubnetProperties deserializedVirtualNetworkSubnetProperties + = new VirtualNetworkSubnetProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("addressPrefix".equals(fieldName)) { + deserializedVirtualNetworkSubnetProperties.addressPrefix = reader.getString(); + } else if ("networkSecurityGroup".equals(fieldName)) { + deserializedVirtualNetworkSubnetProperties.networkSecurityGroup + = NetworkSecurityGroupArmReference.fromJson(reader); + } else if ("natGateway".equals(fieldName)) { + deserializedVirtualNetworkSubnetProperties.natGateway = NatGatewayArmReference.fromJson(reader); + } else if ("routeTable".equals(fieldName)) { + deserializedVirtualNetworkSubnetProperties.routeTable = RouteTable.fromJson(reader); + } else if ("ipConfigurations".equals(fieldName)) { + List ipConfigurations + = reader.readArray(reader1 -> VirtualNetworkSubnetIpConfigurationReference.fromJson(reader1)); + deserializedVirtualNetworkSubnetProperties.ipConfigurations = ipConfigurations; + } else if ("provisioningState".equals(fieldName)) { + deserializedVirtualNetworkSubnetProperties.provisioningState + = ProvisioningStateEnum.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedVirtualNetworkSubnetProperties.status = VirtualNetworkSubnetStatus.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkSubnetProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetStatus.java new file mode 100644 index 0000000000000..f34859dcb3340 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetStatus.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Status of virtual network subnet operations. + */ +@Immutable +public final class VirtualNetworkSubnetStatus implements JsonSerializable { + /* + * VirtualNetworkSubnet provisioning error code + */ + private String errorCode; + + /* + * Descriptive error message + */ + private String errorMessage; + + /* + * Public IP provisioning status + */ + private VirtualNetworkSubnetStatusProvisioningStatus provisioningStatus; + + /** + * Creates an instance of VirtualNetworkSubnetStatus class. + */ + private VirtualNetworkSubnetStatus() { + } + + /** + * Get the errorCode property: VirtualNetworkSubnet provisioning error code. + * + * @return the errorCode value. + */ + public String errorCode() { + return this.errorCode; + } + + /** + * Get the errorMessage property: Descriptive error message. + * + * @return the errorMessage value. + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Get the provisioningStatus property: Public IP provisioning status. + * + * @return the provisioningStatus value. + */ + public VirtualNetworkSubnetStatusProvisioningStatus provisioningStatus() { + return this.provisioningStatus; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("errorCode", this.errorCode); + jsonWriter.writeStringField("errorMessage", this.errorMessage); + jsonWriter.writeJsonField("provisioningStatus", this.provisioningStatus); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkSubnetStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkSubnetStatus if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VirtualNetworkSubnetStatus. + */ + public static VirtualNetworkSubnetStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkSubnetStatus deserializedVirtualNetworkSubnetStatus = new VirtualNetworkSubnetStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("errorCode".equals(fieldName)) { + deserializedVirtualNetworkSubnetStatus.errorCode = reader.getString(); + } else if ("errorMessage".equals(fieldName)) { + deserializedVirtualNetworkSubnetStatus.errorMessage = reader.getString(); + } else if ("provisioningStatus".equals(fieldName)) { + deserializedVirtualNetworkSubnetStatus.provisioningStatus + = VirtualNetworkSubnetStatusProvisioningStatus.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkSubnetStatus; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetStatusProvisioningStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetStatusProvisioningStatus.java new file mode 100644 index 0000000000000..0cb7c2da1994a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetStatusProvisioningStatus.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Status of virtual network subnet operations. + */ +@Immutable +public final class VirtualNetworkSubnetStatusProvisioningStatus + implements JsonSerializable { + /* + * The ID of the operation performed on the virtual network subnet + */ + private String operationId; + + /* + * The status of the operation performed on the virtual network subnet [Succeeded, Failed, InProgress] + */ + private Status status; + + /** + * Creates an instance of VirtualNetworkSubnetStatusProvisioningStatus class. + */ + private VirtualNetworkSubnetStatusProvisioningStatus() { + } + + /** + * Get the operationId property: The ID of the operation performed on the virtual network subnet. + * + * @return the operationId value. + */ + public String operationId() { + return this.operationId; + } + + /** + * Get the status property: The status of the operation performed on the virtual network subnet [Succeeded, Failed, + * InProgress]. + * + * @return the status value. + */ + public Status status() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("operationId", this.operationId); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkSubnetStatusProvisioningStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkSubnetStatusProvisioningStatus if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VirtualNetworkSubnetStatusProvisioningStatus. + */ + public static VirtualNetworkSubnetStatusProvisioningStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkSubnetStatusProvisioningStatus deserializedVirtualNetworkSubnetStatusProvisioningStatus + = new VirtualNetworkSubnetStatusProvisioningStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operationId".equals(fieldName)) { + deserializedVirtualNetworkSubnetStatusProvisioningStatus.operationId = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedVirtualNetworkSubnetStatusProvisioningStatus.status + = Status.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkSubnetStatusProvisioningStatus; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetUpdateProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetUpdateProperties.java new file mode 100644 index 0000000000000..e576a76dff368 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetUpdateProperties.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The virtual network subnet resource patch properties definition. + */ +@Fluent +public final class VirtualNetworkSubnetUpdateProperties + implements JsonSerializable { + /* + * NetworkSecurityGroup - Network Security Group attached to the subnet. + */ + private NetworkSecurityGroupArmReference networkSecurityGroup; + + /* + * NatGateway - NatGateway attached to the subnet. + */ + private NatGatewayArmReference natGateway; + + /** + * Creates an instance of VirtualNetworkSubnetUpdateProperties class. + */ + public VirtualNetworkSubnetUpdateProperties() { + } + + /** + * Get the networkSecurityGroup property: NetworkSecurityGroup - Network Security Group attached to the subnet. + * + * @return the networkSecurityGroup value. + */ + public NetworkSecurityGroupArmReference networkSecurityGroup() { + return this.networkSecurityGroup; + } + + /** + * Set the networkSecurityGroup property: NetworkSecurityGroup - Network Security Group attached to the subnet. + * + * @param networkSecurityGroup the networkSecurityGroup value to set. + * @return the VirtualNetworkSubnetUpdateProperties object itself. + */ + public VirtualNetworkSubnetUpdateProperties + withNetworkSecurityGroup(NetworkSecurityGroupArmReference networkSecurityGroup) { + this.networkSecurityGroup = networkSecurityGroup; + return this; + } + + /** + * Get the natGateway property: NatGateway - NatGateway attached to the subnet. + * + * @return the natGateway value. + */ + public NatGatewayArmReference natGateway() { + return this.natGateway; + } + + /** + * Set the natGateway property: NatGateway - NatGateway attached to the subnet. + * + * @param natGateway the natGateway value to set. + * @return the VirtualNetworkSubnetUpdateProperties object itself. + */ + public VirtualNetworkSubnetUpdateProperties withNatGateway(NatGatewayArmReference natGateway) { + this.natGateway = natGateway; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("networkSecurityGroup", this.networkSecurityGroup); + jsonWriter.writeJsonField("natGateway", this.natGateway); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkSubnetUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkSubnetUpdateProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VirtualNetworkSubnetUpdateProperties. + */ + public static VirtualNetworkSubnetUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkSubnetUpdateProperties deserializedVirtualNetworkSubnetUpdateProperties + = new VirtualNetworkSubnetUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("networkSecurityGroup".equals(fieldName)) { + deserializedVirtualNetworkSubnetUpdateProperties.networkSecurityGroup + = NetworkSecurityGroupArmReference.fromJson(reader); + } else if ("natGateway".equals(fieldName)) { + deserializedVirtualNetworkSubnetUpdateProperties.natGateway + = NatGatewayArmReference.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkSubnetUpdateProperties; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetUpdateRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetUpdateRequest.java new file mode 100644 index 0000000000000..fa86ddc4f3076 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetUpdateRequest.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The virtual network subnet resource patch definition. + */ +@Fluent +public final class VirtualNetworkSubnetUpdateRequest implements JsonSerializable { + /* + * properties to update + */ + private VirtualNetworkSubnetUpdateProperties properties; + + /** + * Creates an instance of VirtualNetworkSubnetUpdateRequest class. + */ + public VirtualNetworkSubnetUpdateRequest() { + } + + /** + * Get the properties property: properties to update. + * + * @return the properties value. + */ + public VirtualNetworkSubnetUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: properties to update. + * + * @param properties the properties value to set. + * @return the VirtualNetworkSubnetUpdateRequest object itself. + */ + public VirtualNetworkSubnetUpdateRequest withProperties(VirtualNetworkSubnetUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkSubnetUpdateRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkSubnetUpdateRequest if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VirtualNetworkSubnetUpdateRequest. + */ + public static VirtualNetworkSubnetUpdateRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkSubnetUpdateRequest deserializedVirtualNetworkSubnetUpdateRequest + = new VirtualNetworkSubnetUpdateRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedVirtualNetworkSubnetUpdateRequest.properties + = VirtualNetworkSubnetUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkSubnetUpdateRequest; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnets.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnets.java new file mode 100644 index 0000000000000..57c2d074a0339 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnets.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of VirtualNetworkSubnets. + */ +public interface VirtualNetworkSubnets { + /** + * The operation to get a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String virtualNetworkName, + String subnetName, Context context); + + /** + * The operation to get a virtual network subnet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + VirtualNetworkSubnet get(String resourceGroupName, String virtualNetworkName, String subnetName); + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String virtualNetworkName, String subnetName); + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param subnetName Name of the virtual network subnet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String virtualNetworkName, String subnetName, Context context); + + /** + * Lists all of the virtual network subnets in a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkSubnet list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByVirtualNetwork(String resourceGroupName, String virtualNetworkName); + + /** + * Lists all of the virtual network subnets in a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkSubnet list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByVirtualNetwork(String resourceGroupName, String virtualNetworkName, + Context context); + + /** + * The operation to get a virtual network subnet. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response}. + */ + VirtualNetworkSubnet getById(String id); + + /** + * The operation to get a virtual network subnet. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * The operation to delete a virtual network. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * The operation to delete a virtual network. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new VirtualNetworkSubnet resource. + * + * @param name resource name. + * @return the first stage of the new VirtualNetworkSubnet definition. + */ + VirtualNetworkSubnet.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkTagsUpdate.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkTagsUpdate.java new file mode 100644 index 0000000000000..9a692dfdee6af --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkTagsUpdate.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for updating tags in VirtualNetwork resources. + */ +@Fluent +public final class VirtualNetworkTagsUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /** + * Creates an instance of VirtualNetworkTagsUpdate class. + */ + public VirtualNetworkTagsUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the VirtualNetworkTagsUpdate object itself. + */ + public VirtualNetworkTagsUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkTagsUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkTagsUpdate if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VirtualNetworkTagsUpdate. + */ + public static VirtualNetworkTagsUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkTagsUpdate deserializedVirtualNetworkTagsUpdate = new VirtualNetworkTagsUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedVirtualNetworkTagsUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkTagsUpdate; + }); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworks.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworks.java new file mode 100644 index 0000000000000..dd955ba41c4ba --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworks.java @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of VirtualNetworks. + */ +public interface VirtualNetworks { + /** + * The operation to get a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String virtualNetworkName, + Context context); + + /** + * The operation to get a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition. + */ + VirtualNetwork getByResourceGroup(String resourceGroupName, String virtualNetworkName); + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String virtualNetworkName); + + /** + * The operation to delete a virtual network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String virtualNetworkName, Context context); + + /** + * Lists all of the virtual networks in the specified resource group. Use the nextLink property in the response to + * get the next page of virtualNetwork networks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all of the virtual networks in the specified resource group. Use the nextLink property in the response to + * get the next page of virtualNetwork networks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Lists all of the virtual networks in the specified subscription. Use the nextLink property in the response to get + * the next page of virtualNetwork networks. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Lists all of the virtual networks in the specified subscription. Use the nextLink property in the response to get + * the next page of virtualNetwork networks. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * The operation to get a virtual network. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response}. + */ + VirtualNetwork getById(String id); + + /** + * The operation to get a virtual network. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the virtual network resource definition along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * The operation to delete a virtual network. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * The operation to delete a virtual network. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new VirtualNetwork resource. + * + * @param name resource name. + * @return the first stage of the new VirtualNetwork definition. + */ + VirtualNetwork.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VmImageRepositoryCredentials.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VmImageRepositoryCredentials.java deleted file mode 100644 index e9fc11f0c67f8..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VmImageRepositoryCredentials.java +++ /dev/null @@ -1,114 +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.azurestackhci.vm.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The credentials used to login to the image repository that has access to the specified image. - */ -@Fluent -public final class VmImageRepositoryCredentials implements JsonSerializable { - /* - * Username for accessing image repository - */ - private String username; - - /* - * Password for accessing image repository - */ - private String password; - - /** - * Creates an instance of VmImageRepositoryCredentials class. - */ - public VmImageRepositoryCredentials() { - } - - /** - * Get the username property: Username for accessing image repository. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: Username for accessing image repository. - * - * @param username the username value to set. - * @return the VmImageRepositoryCredentials object itself. - */ - public VmImageRepositoryCredentials withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: Password for accessing image repository. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: Password for accessing image repository. - * - * @param password the password value to set. - * @return the VmImageRepositoryCredentials object itself. - */ - public VmImageRepositoryCredentials withPassword(String password) { - this.password = password; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("username", this.username); - jsonWriter.writeStringField("password", this.password); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VmImageRepositoryCredentials from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VmImageRepositoryCredentials if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VmImageRepositoryCredentials. - */ - public static VmImageRepositoryCredentials fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VmImageRepositoryCredentials deserializedVmImageRepositoryCredentials = new VmImageRepositoryCredentials(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("username".equals(fieldName)) { - deserializedVmImageRepositoryCredentials.username = reader.getString(); - } else if ("password".equals(fieldName)) { - deserializedVmImageRepositoryCredentials.password = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVmImageRepositoryCredentials; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/resources/META-INF/azure-resourcemanager-azurestackhci-vm_metadata.json b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/resources/META-INF/azure-resourcemanager-azurestackhci-vm_metadata.json index 3b34674e36495..164bb899311b4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/resources/META-INF/azure-resourcemanager-azurestackhci-vm_metadata.json +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/resources/META-INF/azure-resourcemanager-azurestackhci-vm_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Microsoft.AzureStackHCI":"2025-06-01-preview"},"crossLanguageDefinitions":{"com.azure.resourcemanager.azurestackhci.vm.fluent.AttestationStatusesClient":"Microsoft.AzureStackHCI.AttestationStatuses","com.azure.resourcemanager.azurestackhci.vm.fluent.AttestationStatusesClient.get":"Microsoft.AzureStackHCI.AttestationStatuses.get","com.azure.resourcemanager.azurestackhci.vm.fluent.AttestationStatusesClient.getWithResponse":"Microsoft.AzureStackHCI.AttestationStatuses.get","com.azure.resourcemanager.azurestackhci.vm.fluent.AzureStackHciVmMgmtClient":"Microsoft.AzureStackHCI","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient":"Microsoft.AzureStackHCI.GalleryImages","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.GalleryImages.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.beginDelete":"Microsoft.AzureStackHCI.GalleryImages.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.beginUpdate":"Microsoft.AzureStackHCI.GalleryImages.update","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.createOrUpdate":"Microsoft.AzureStackHCI.GalleryImages.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.delete":"Microsoft.AzureStackHCI.GalleryImages.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.getByResourceGroup":"Microsoft.AzureStackHCI.GalleryImages.get","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.GalleryImages.get","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.list":"Microsoft.AzureStackHCI.GalleryImages.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.listByResourceGroup":"Microsoft.AzureStackHCI.GalleryImages.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.update":"Microsoft.AzureStackHCI.GalleryImages.update","com.azure.resourcemanager.azurestackhci.vm.fluent.GuestAgentsClient":"Microsoft.AzureStackHCI.GuestAgents","com.azure.resourcemanager.azurestackhci.vm.fluent.GuestAgentsClient.beginCreate":"Microsoft.AzureStackHCI.GuestAgents.create","com.azure.resourcemanager.azurestackhci.vm.fluent.GuestAgentsClient.beginDelete":"Microsoft.AzureStackHCI.GuestAgents.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.GuestAgentsClient.create":"Microsoft.AzureStackHCI.GuestAgents.create","com.azure.resourcemanager.azurestackhci.vm.fluent.GuestAgentsClient.delete":"Microsoft.AzureStackHCI.GuestAgents.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.GuestAgentsClient.get":"Microsoft.AzureStackHCI.GuestAgents.get","com.azure.resourcemanager.azurestackhci.vm.fluent.GuestAgentsClient.getWithResponse":"Microsoft.AzureStackHCI.GuestAgents.get","com.azure.resourcemanager.azurestackhci.vm.fluent.GuestAgentsClient.listByVirtualMachineInstance":"Microsoft.AzureStackHCI.GuestAgents.listByVirtualMachineInstance","com.azure.resourcemanager.azurestackhci.vm.fluent.HybridIdentityMetadatasClient":"Microsoft.AzureStackHCI.HybridIdentityMetadataGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.HybridIdentityMetadatasClient.get":"Microsoft.AzureStackHCI.HybridIdentityMetadataGroup.get","com.azure.resourcemanager.azurestackhci.vm.fluent.HybridIdentityMetadatasClient.getWithResponse":"Microsoft.AzureStackHCI.HybridIdentityMetadataGroup.get","com.azure.resourcemanager.azurestackhci.vm.fluent.HybridIdentityMetadatasClient.listByVirtualMachineInstance":"Microsoft.AzureStackHCI.HybridIdentityMetadataGroup.listByVirtualMachineInstance","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient":"Microsoft.AzureStackHCI.LogicalNetworks","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.LogicalNetworks.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.beginDelete":"Microsoft.AzureStackHCI.LogicalNetworks.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.beginUpdate":"Microsoft.AzureStackHCI.LogicalNetworks.update","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.createOrUpdate":"Microsoft.AzureStackHCI.LogicalNetworks.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.delete":"Microsoft.AzureStackHCI.LogicalNetworks.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.getByResourceGroup":"Microsoft.AzureStackHCI.LogicalNetworks.get","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.LogicalNetworks.get","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.list":"Microsoft.AzureStackHCI.LogicalNetworks.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.listByResourceGroup":"Microsoft.AzureStackHCI.LogicalNetworks.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.update":"Microsoft.AzureStackHCI.LogicalNetworks.update","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient":"Microsoft.AzureStackHCI.MarketplaceGalleryImages","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.beginDelete":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.beginUpdate":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.update","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.createOrUpdate":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.delete":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.getByResourceGroup":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.get","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.get","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.list":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.listByResourceGroup":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.update":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.update","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient":"Microsoft.AzureStackHCI.NetworkInterfaces","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.NetworkInterfaces.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.beginDelete":"Microsoft.AzureStackHCI.NetworkInterfaces.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.beginUpdate":"Microsoft.AzureStackHCI.NetworkInterfaces.update","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.createOrUpdate":"Microsoft.AzureStackHCI.NetworkInterfaces.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.delete":"Microsoft.AzureStackHCI.NetworkInterfaces.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.getByResourceGroup":"Microsoft.AzureStackHCI.NetworkInterfaces.get","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.NetworkInterfaces.get","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.list":"Microsoft.AzureStackHCI.NetworkInterfaces.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.listByResourceGroup":"Microsoft.AzureStackHCI.NetworkInterfaces.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.update":"Microsoft.AzureStackHCI.NetworkInterfaces.update","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient":"Microsoft.AzureStackHCI.NetworkSecurityGroups","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.NetworkSecurityGroups.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.beginDelete":"Microsoft.AzureStackHCI.NetworkSecurityGroups.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.beginUpdateTags":"Microsoft.AzureStackHCI.NetworkSecurityGroups.updateTags","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.createOrUpdate":"Microsoft.AzureStackHCI.NetworkSecurityGroups.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.delete":"Microsoft.AzureStackHCI.NetworkSecurityGroups.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.getByResourceGroup":"Microsoft.AzureStackHCI.NetworkSecurityGroups.get","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.NetworkSecurityGroups.get","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.list":"Microsoft.AzureStackHCI.NetworkSecurityGroups.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.listByResourceGroup":"Microsoft.AzureStackHCI.NetworkSecurityGroups.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.updateTags":"Microsoft.AzureStackHCI.NetworkSecurityGroups.updateTags","com.azure.resourcemanager.azurestackhci.vm.fluent.SecurityRulesClient":"Microsoft.AzureStackHCI.SecurityRules","com.azure.resourcemanager.azurestackhci.vm.fluent.SecurityRulesClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.SecurityRules.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.SecurityRulesClient.beginDelete":"Microsoft.AzureStackHCI.SecurityRules.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.SecurityRulesClient.createOrUpdate":"Microsoft.AzureStackHCI.SecurityRules.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.SecurityRulesClient.delete":"Microsoft.AzureStackHCI.SecurityRules.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.SecurityRulesClient.get":"Microsoft.AzureStackHCI.SecurityRules.get","com.azure.resourcemanager.azurestackhci.vm.fluent.SecurityRulesClient.getWithResponse":"Microsoft.AzureStackHCI.SecurityRules.get","com.azure.resourcemanager.azurestackhci.vm.fluent.SecurityRulesClient.listByNetworkSecurityGroup":"Microsoft.AzureStackHCI.SecurityRules.listByNetworkSecurityGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient":"Microsoft.AzureStackHCI.StorageContainers","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.StorageContainers.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.beginDelete":"Microsoft.AzureStackHCI.StorageContainers.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.beginUpdate":"Microsoft.AzureStackHCI.StorageContainers.update","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.createOrUpdate":"Microsoft.AzureStackHCI.StorageContainers.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.delete":"Microsoft.AzureStackHCI.StorageContainers.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.getByResourceGroup":"Microsoft.AzureStackHCI.StorageContainers.get","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.StorageContainers.get","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.list":"Microsoft.AzureStackHCI.StorageContainers.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.listByResourceGroup":"Microsoft.AzureStackHCI.StorageContainers.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.update":"Microsoft.AzureStackHCI.StorageContainers.update","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient":"Microsoft.AzureStackHCI.VirtualHardDisks","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.VirtualHardDisks.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.beginDelete":"Microsoft.AzureStackHCI.VirtualHardDisks.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.beginUpdate":"Microsoft.AzureStackHCI.VirtualHardDisks.update","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.beginUpload":"Microsoft.AzureStackHCI.VirtualHardDisks.upload","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.createOrUpdate":"Microsoft.AzureStackHCI.VirtualHardDisks.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.delete":"Microsoft.AzureStackHCI.VirtualHardDisks.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.getByResourceGroup":"Microsoft.AzureStackHCI.VirtualHardDisks.get","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.VirtualHardDisks.get","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.list":"Microsoft.AzureStackHCI.VirtualHardDisks.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.listByResourceGroup":"Microsoft.AzureStackHCI.VirtualHardDisks.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.update":"Microsoft.AzureStackHCI.VirtualHardDisks.update","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.upload":"Microsoft.AzureStackHCI.VirtualHardDisks.upload","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient":"Microsoft.AzureStackHCI.VirtualMachineInstances","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.VirtualMachineInstances.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.beginDelete":"Microsoft.AzureStackHCI.VirtualMachineInstances.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.beginPause":"Microsoft.AzureStackHCI.VirtualMachineInstances.pause","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.beginRestart":"Microsoft.AzureStackHCI.VirtualMachineInstances.restart","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.beginSave":"Microsoft.AzureStackHCI.VirtualMachineInstances.save","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.beginStart":"Microsoft.AzureStackHCI.VirtualMachineInstances.start","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.beginStop":"Microsoft.AzureStackHCI.VirtualMachineInstances.stop","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.beginUpdate":"Microsoft.AzureStackHCI.VirtualMachineInstances.update","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.createOrUpdate":"Microsoft.AzureStackHCI.VirtualMachineInstances.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.delete":"Microsoft.AzureStackHCI.VirtualMachineInstances.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.get":"Microsoft.AzureStackHCI.VirtualMachineInstances.get","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.getWithResponse":"Microsoft.AzureStackHCI.VirtualMachineInstances.get","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.list":"Microsoft.AzureStackHCI.VirtualMachineInstances.list","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.pause":"Microsoft.AzureStackHCI.VirtualMachineInstances.pause","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.restart":"Microsoft.AzureStackHCI.VirtualMachineInstances.restart","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.save":"Microsoft.AzureStackHCI.VirtualMachineInstances.save","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.start":"Microsoft.AzureStackHCI.VirtualMachineInstances.start","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.stop":"Microsoft.AzureStackHCI.VirtualMachineInstances.stop","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.update":"Microsoft.AzureStackHCI.VirtualMachineInstances.update","com.azure.resourcemanager.azurestackhci.vm.fluent.models.AttestationStatusInner":"Microsoft.AzureStackHCI.AttestationStatus","com.azure.resourcemanager.azurestackhci.vm.fluent.models.GalleryImageInner":"Microsoft.AzureStackHCI.GalleryImage","com.azure.resourcemanager.azurestackhci.vm.fluent.models.GalleryImageVersionProperties":"Microsoft.AzureStackHCI.GalleryImageVersionProperties","com.azure.resourcemanager.azurestackhci.vm.fluent.models.GuestAgentInner":"Microsoft.AzureStackHCI.GuestAgent","com.azure.resourcemanager.azurestackhci.vm.fluent.models.HybridIdentityMetadataInner":"Microsoft.AzureStackHCI.HybridIdentityMetadata","com.azure.resourcemanager.azurestackhci.vm.fluent.models.LogicalNetworkInner":"Microsoft.AzureStackHCI.LogicalNetwork","com.azure.resourcemanager.azurestackhci.vm.fluent.models.MarketplaceGalleryImageInner":"Microsoft.AzureStackHCI.MarketplaceGalleryImage","com.azure.resourcemanager.azurestackhci.vm.fluent.models.NetworkInterfaceInner":"Microsoft.AzureStackHCI.NetworkInterface","com.azure.resourcemanager.azurestackhci.vm.fluent.models.NetworkSecurityGroupInner":"Microsoft.AzureStackHCI.NetworkSecurityGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.models.RouteProperties":"Microsoft.AzureStackHCI.RouteProperties","com.azure.resourcemanager.azurestackhci.vm.fluent.models.RouteTableProperties":"Microsoft.AzureStackHCI.RouteTableProperties","com.azure.resourcemanager.azurestackhci.vm.fluent.models.SecurityRuleInner":"Microsoft.AzureStackHCI.SecurityRule","com.azure.resourcemanager.azurestackhci.vm.fluent.models.StorageContainerInner":"Microsoft.AzureStackHCI.StorageContainer","com.azure.resourcemanager.azurestackhci.vm.fluent.models.SubnetProperties":"Microsoft.AzureStackHCI.SubnetProperties","com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualHardDiskInner":"Microsoft.AzureStackHCI.VirtualHardDisk","com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualHardDiskUploadResponseInner":"Microsoft.AzureStackHCI.VirtualHardDiskUploadResponse","com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualMachineInstanceInner":"Microsoft.AzureStackHCI.VirtualMachineInstance","com.azure.resourcemanager.azurestackhci.vm.implementation.AzureStackHciVmMgmtClientBuilder":"Microsoft.AzureStackHCI","com.azure.resourcemanager.azurestackhci.vm.implementation.models.GalleryImageListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.GuestAgentListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.HybridIdentityMetadataListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.LogicalNetworkListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.MarketplaceGalleryImageListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.NetworkInterfaceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.NetworkSecurityGroupListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.SecurityRuleListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.StorageContainerListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.VirtualHardDiskListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.VirtualMachineInstanceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.models.AttestBootIntegrityPropertyEnum":"Microsoft.AzureStackHCI.AttestBootIntegrityPropertyEnum","com.azure.resourcemanager.azurestackhci.vm.models.AttestCertPropertyEnum":"Microsoft.AzureStackHCI.AttestCertPropertyEnum","com.azure.resourcemanager.azurestackhci.vm.models.AttestDiskSecurityEncryptionTypeEnum":"Microsoft.AzureStackHCI.AttestDiskSecurityEncryptionTypeEnum","com.azure.resourcemanager.azurestackhci.vm.models.AttestHWPlatformEnum":"Microsoft.AzureStackHCI.AttestHWPlatformEnum","com.azure.resourcemanager.azurestackhci.vm.models.AttestHealthStatusEnum":"Microsoft.AzureStackHCI.AttestHealthStatusEnum","com.azure.resourcemanager.azurestackhci.vm.models.AttestSecureBootPropertyEnum":"Microsoft.AzureStackHCI.AttestSecureBootPropertyEnum","com.azure.resourcemanager.azurestackhci.vm.models.AttestationStatusProperties":"Microsoft.AzureStackHCI.AttestationStatusProperties","com.azure.resourcemanager.azurestackhci.vm.models.CloudInitDataSource":"Microsoft.AzureStackHCI.CloudInitDataSource","com.azure.resourcemanager.azurestackhci.vm.models.DiskFileFormat":"Microsoft.AzureStackHCI.DiskFileFormat","com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation":"Microsoft.AzureStackHCI.ExtendedLocation","com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes":"Microsoft.AzureStackHCI.ExtendedLocationTypes","com.azure.resourcemanager.azurestackhci.vm.models.GalleryImageIdentifier":"Microsoft.AzureStackHCI.GalleryImageIdentifier","com.azure.resourcemanager.azurestackhci.vm.models.GalleryImageProperties":"Microsoft.AzureStackHCI.GalleryImageProperties","com.azure.resourcemanager.azurestackhci.vm.models.GalleryImageStatus":"Microsoft.AzureStackHCI.GalleryImageStatus","com.azure.resourcemanager.azurestackhci.vm.models.GalleryImageStatusDownloadStatus":"Microsoft.AzureStackHCI.GalleryImageStatusDownloadStatus","com.azure.resourcemanager.azurestackhci.vm.models.GalleryImageStatusProvisioningStatus":"Microsoft.AzureStackHCI.GalleryImageStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.GalleryImageTagsUpdate":"Azure.ResourceManager.Foundations.TagsUpdateModel","com.azure.resourcemanager.azurestackhci.vm.models.GalleryImageVersion":"Microsoft.AzureStackHCI.GalleryImageVersion","com.azure.resourcemanager.azurestackhci.vm.models.GalleryImageVersionStorageProfile":"Microsoft.AzureStackHCI.GalleryImageVersionStorageProfile","com.azure.resourcemanager.azurestackhci.vm.models.GalleryOSDiskImage":"Microsoft.AzureStackHCI.GalleryOSDiskImage","com.azure.resourcemanager.azurestackhci.vm.models.GpuAssignmentTypeEnum":"Microsoft.AzureStackHCI.GpuAssignmentTypeEnum","com.azure.resourcemanager.azurestackhci.vm.models.GuestAgentInstallStatus":"Microsoft.AzureStackHCI.GuestAgentInstallStatus","com.azure.resourcemanager.azurestackhci.vm.models.GuestAgentProperties":"Microsoft.AzureStackHCI.GuestAgentProperties","com.azure.resourcemanager.azurestackhci.vm.models.GuestCredential":"Microsoft.AzureStackHCI.GuestCredential","com.azure.resourcemanager.azurestackhci.vm.models.HardwareProfileUpdate":"Microsoft.AzureStackHCI.HardwareProfileUpdate","com.azure.resourcemanager.azurestackhci.vm.models.HttpProxyConfiguration":"Microsoft.AzureStackHCI.HttpProxyConfiguration","com.azure.resourcemanager.azurestackhci.vm.models.HybridIdentityMetadataProperties":"Microsoft.AzureStackHCI.HybridIdentityMetadataProperties","com.azure.resourcemanager.azurestackhci.vm.models.HyperVGeneration":"Microsoft.AzureStackHCI.HyperVGeneration","com.azure.resourcemanager.azurestackhci.vm.models.IPConfiguration":"Microsoft.AzureStackHCI.IPConfiguration","com.azure.resourcemanager.azurestackhci.vm.models.IPConfigurationProperties":"Microsoft.AzureStackHCI.IPConfigurationProperties","com.azure.resourcemanager.azurestackhci.vm.models.IPPool":"Microsoft.AzureStackHCI.IPPool","com.azure.resourcemanager.azurestackhci.vm.models.IPPoolInfo":"Microsoft.AzureStackHCI.IPPoolInfo","com.azure.resourcemanager.azurestackhci.vm.models.IPPoolTypeEnum":"Microsoft.AzureStackHCI.IPPoolTypeEnum","com.azure.resourcemanager.azurestackhci.vm.models.Identity":"Microsoft.AzureStackHCI.Identity","com.azure.resourcemanager.azurestackhci.vm.models.IdentityType":null,"com.azure.resourcemanager.azurestackhci.vm.models.ImageArmReference":"Microsoft.AzureStackHCI.ImageArmReference","com.azure.resourcemanager.azurestackhci.vm.models.InstanceViewStatus":"Microsoft.AzureStackHCI.InstanceViewStatus","com.azure.resourcemanager.azurestackhci.vm.models.InterfaceDNSSettings":"Microsoft.AzureStackHCI.InterfaceDNSSettings","com.azure.resourcemanager.azurestackhci.vm.models.IpAllocationMethodEnum":"Microsoft.AzureStackHCI.IpAllocationMethodEnum","com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworkArmReference":"Microsoft.AzureStackHCI.LogicalNetworkArmReference","com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworkProperties":"Microsoft.AzureStackHCI.LogicalNetworkProperties","com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworkPropertiesDhcpOptions":"Microsoft.AzureStackHCI.LogicalNetworkPropertiesDhcpOptions","com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworkStatus":"Microsoft.AzureStackHCI.LogicalNetworkStatus","com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworkStatusProvisioningStatus":"Microsoft.AzureStackHCI.LogicalNetworkStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworkTypeEnum":"Microsoft.AzureStackHCI.LogicalNetworkTypeEnum","com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworksUpdateRequest":"Microsoft.AzureStackHCI.LogicalNetworksUpdateRequest","com.azure.resourcemanager.azurestackhci.vm.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.azurestackhci.vm.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.azurestackhci.vm.models.MarketplaceGalleryImageProperties":"Microsoft.AzureStackHCI.MarketplaceGalleryImageProperties","com.azure.resourcemanager.azurestackhci.vm.models.MarketplaceGalleryImageStatus":"Microsoft.AzureStackHCI.MarketplaceGalleryImageStatus","com.azure.resourcemanager.azurestackhci.vm.models.MarketplaceGalleryImageStatusDownloadStatus":"Microsoft.AzureStackHCI.MarketplaceGalleryImageStatusDownloadStatus","com.azure.resourcemanager.azurestackhci.vm.models.MarketplaceGalleryImageStatusProvisioningStatus":"Microsoft.AzureStackHCI.MarketplaceGalleryImageStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.MarketplaceGalleryImageTagsUpdate":"Azure.ResourceManager.Foundations.TagsUpdateModel","com.azure.resourcemanager.azurestackhci.vm.models.NetworkInterfaceArmReference":"Microsoft.AzureStackHCI.NetworkInterfaceArmReference","com.azure.resourcemanager.azurestackhci.vm.models.NetworkInterfaceProperties":"Microsoft.AzureStackHCI.NetworkInterfaceProperties","com.azure.resourcemanager.azurestackhci.vm.models.NetworkInterfaceStatus":"Microsoft.AzureStackHCI.NetworkInterfaceStatus","com.azure.resourcemanager.azurestackhci.vm.models.NetworkInterfaceStatusProvisioningStatus":"Microsoft.AzureStackHCI.NetworkInterfaceStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.NetworkInterfacesUpdateProperties":"Microsoft.AzureStackHCI.NetworkInterfacesUpdateProperties","com.azure.resourcemanager.azurestackhci.vm.models.NetworkInterfacesUpdateRequest":"Microsoft.AzureStackHCI.NetworkInterfacesUpdateRequest","com.azure.resourcemanager.azurestackhci.vm.models.NetworkProfileUpdate":"Microsoft.AzureStackHCI.NetworkProfileUpdate","com.azure.resourcemanager.azurestackhci.vm.models.NetworkSecurityGroupArmReference":"Microsoft.AzureStackHCI.NetworkSecurityGroupArmReference","com.azure.resourcemanager.azurestackhci.vm.models.NetworkSecurityGroupProperties":"Microsoft.AzureStackHCI.NetworkSecurityGroupProperties","com.azure.resourcemanager.azurestackhci.vm.models.NetworkSecurityGroupStatus":"Microsoft.AzureStackHCI.NetworkSecurityGroupStatus","com.azure.resourcemanager.azurestackhci.vm.models.NetworkSecurityGroupStatusProvisioningStatus":"Microsoft.AzureStackHCI.NetworkSecurityGroupStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.NetworkSecurityGroupTagsUpdate":"Azure.ResourceManager.Foundations.TagsUpdateModel","com.azure.resourcemanager.azurestackhci.vm.models.OperatingSystemTypes":"Microsoft.AzureStackHCI.OperatingSystemTypes","com.azure.resourcemanager.azurestackhci.vm.models.OsProfileUpdate":"Microsoft.AzureStackHCI.OsProfileUpdate","com.azure.resourcemanager.azurestackhci.vm.models.OsProfileUpdateLinuxConfiguration":"Microsoft.AzureStackHCI.OsProfileUpdateLinuxConfiguration","com.azure.resourcemanager.azurestackhci.vm.models.OsProfileUpdateWindowsConfiguration":"Microsoft.AzureStackHCI.OsProfileUpdateWindowsConfiguration","com.azure.resourcemanager.azurestackhci.vm.models.PowerStateEnum":"Microsoft.AzureStackHCI.PowerStateEnum","com.azure.resourcemanager.azurestackhci.vm.models.ProvisioningAction":"Microsoft.AzureStackHCI.ProvisioningAction","com.azure.resourcemanager.azurestackhci.vm.models.ProvisioningStateEnum":"Microsoft.AzureStackHCI.ProvisioningStateEnum","com.azure.resourcemanager.azurestackhci.vm.models.Route":"Microsoft.AzureStackHCI.Route","com.azure.resourcemanager.azurestackhci.vm.models.RouteTable":"Microsoft.AzureStackHCI.RouteTable","com.azure.resourcemanager.azurestackhci.vm.models.SecurityEncryptionType":"Microsoft.AzureStackHCI.SecurityEncryptionType","com.azure.resourcemanager.azurestackhci.vm.models.SecurityRuleAccess":"Microsoft.AzureStackHCI.SecurityRuleAccess","com.azure.resourcemanager.azurestackhci.vm.models.SecurityRuleDirection":"Microsoft.AzureStackHCI.SecurityRuleDirection","com.azure.resourcemanager.azurestackhci.vm.models.SecurityRuleProperties":"Microsoft.AzureStackHCI.SecurityRuleProperties","com.azure.resourcemanager.azurestackhci.vm.models.SecurityRuleProtocol":"Microsoft.AzureStackHCI.SecurityRuleProtocol","com.azure.resourcemanager.azurestackhci.vm.models.SecurityTypes":"Microsoft.AzureStackHCI.SecurityTypes","com.azure.resourcemanager.azurestackhci.vm.models.SshConfiguration":"Microsoft.AzureStackHCI.SshConfiguration","com.azure.resourcemanager.azurestackhci.vm.models.SshPublicKey":"Microsoft.AzureStackHCI.SshPublicKey","com.azure.resourcemanager.azurestackhci.vm.models.Status":"Microsoft.AzureStackHCI.Status","com.azure.resourcemanager.azurestackhci.vm.models.StatusLevelTypes":"Microsoft.AzureStackHCI.StatusLevelTypes","com.azure.resourcemanager.azurestackhci.vm.models.StatusTypes":"Microsoft.AzureStackHCI.StatusTypes","com.azure.resourcemanager.azurestackhci.vm.models.StorageContainerProperties":"Microsoft.AzureStackHCI.StorageContainerProperties","com.azure.resourcemanager.azurestackhci.vm.models.StorageContainerStatus":"Microsoft.AzureStackHCI.StorageContainerStatus","com.azure.resourcemanager.azurestackhci.vm.models.StorageContainerStatusProvisioningStatus":"Microsoft.AzureStackHCI.StorageContainerStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.StorageContainerTagsUpdate":"Azure.ResourceManager.Foundations.TagsUpdateModel","com.azure.resourcemanager.azurestackhci.vm.models.StorageProfileUpdate":"Microsoft.AzureStackHCI.StorageProfileUpdate","com.azure.resourcemanager.azurestackhci.vm.models.Subnet":"Microsoft.AzureStackHCI.Subnet","com.azure.resourcemanager.azurestackhci.vm.models.SubnetIpConfigurationReference":"Microsoft.AzureStackHCI.SubnetIpConfigurationReference","com.azure.resourcemanager.azurestackhci.vm.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.azurestackhci.vm.models.VMDiskSecurityProfile":"Microsoft.AzureStackHCI.VMDiskSecurityProfile","com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskArmReference":"Microsoft.AzureStackHCI.VirtualHardDiskArmReference","com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskDownloadStatus":"Microsoft.AzureStackHCI.VirtualHardDiskDownloadStatus","com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskProperties":"Microsoft.AzureStackHCI.VirtualHardDiskProperties","com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskStatus":"Microsoft.AzureStackHCI.VirtualHardDiskStatus","com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskStatusProvisioningStatus":"Microsoft.AzureStackHCI.VirtualHardDiskStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskUploadRequest":"Microsoft.AzureStackHCI.VirtualHardDiskUploadRequest","com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskUploadStatus":"Microsoft.AzureStackHCI.VirtualHardDiskUploadStatus","com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDisksUpdateProperties":"Microsoft.AzureStackHCI.VirtualHardDisksUpdateProperties","com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDisksUpdateRequest":"Microsoft.AzureStackHCI.VirtualHardDisksUpdateRequest","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineConfigAgentInstanceView":"Microsoft.AzureStackHCI.VirtualMachineConfigAgentInstanceView","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceManagedDiskParameters":"Microsoft.AzureStackHCI.VirtualMachineInstanceManagedDiskParameters","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceProperties":"Microsoft.AzureStackHCI.VirtualMachineInstanceProperties","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesHardwareProfile":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesHardwareProfile","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesNetworkProfile":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesNetworkProfile","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesOsProfile":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesOsProfile","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesOsProfileLinuxConfiguration":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesOsProfileLinuxConfiguration","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesOsProfileWindowsConfiguration":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesOsProfileWindowsConfiguration","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesPlacementProfile":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesPlacementProfile","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesSecurityProfile":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesSecurityProfile","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesSecurityProfileUefiSettings":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesSecurityProfileUefiSettings","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesStorageProfile":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesStorageProfile","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesStorageProfileOsDisk":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesStorageProfileOsDisk","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceStatus":"Microsoft.AzureStackHCI.VirtualMachineInstanceStatus","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceStatusProvisioningStatus":"Microsoft.AzureStackHCI.VirtualMachineInstanceStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceUpdateProperties":"Microsoft.AzureStackHCI.VirtualMachineInstanceUpdateProperties","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceUpdateRequest":"Microsoft.AzureStackHCI.VirtualMachineInstanceUpdateRequest","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceView":"Microsoft.AzureStackHCI.VirtualMachineInstanceView","com.azure.resourcemanager.azurestackhci.vm.models.VmImageRepositoryCredentials":"Microsoft.AzureStackHCI.VmImageRepositoryCredentials","com.azure.resourcemanager.azurestackhci.vm.models.VmSizeEnum":"Microsoft.AzureStackHCI.VmSizeEnum"},"generatedFiles":["src/main/java/com/azure/resourcemanager/azurestackhci/vm/AzureStackHciVmManager.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/AttestationStatusesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/AzureStackHciVmMgmtClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/GalleryImagesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/GuestAgentsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/HybridIdentityMetadatasClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/LogicalNetworksClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/MarketplaceGalleryImagesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/NetworkInterfacesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/NetworkSecurityGroupsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/SecurityRulesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/StorageContainersClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/VirtualHardDisksClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/VirtualMachineInstancesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/AttestationStatusInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/GalleryImageInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/GalleryImageVersionProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/GuestAgentInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/HybridIdentityMetadataInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/LogicalNetworkInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/MarketplaceGalleryImageInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/NetworkInterfaceInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/NetworkSecurityGroupInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/RouteProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/RouteTableProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/SecurityRuleInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/StorageContainerInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/SubnetProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/VirtualHardDiskInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/VirtualHardDiskUploadResponseInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/VirtualMachineInstanceInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/AttestationStatusImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/AttestationStatusesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/AttestationStatusesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/AzureStackHciVmMgmtClientBuilder.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/AzureStackHciVmMgmtClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/GalleryImageImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/GalleryImagesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/GalleryImagesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/GuestAgentImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/GuestAgentsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/GuestAgentsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/HybridIdentityMetadataImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/HybridIdentityMetadatasClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/HybridIdentityMetadatasImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/LogicalNetworkImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/LogicalNetworksClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/LogicalNetworksImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/MarketplaceGalleryImageImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/MarketplaceGalleryImagesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/MarketplaceGalleryImagesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NetworkInterfaceImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NetworkInterfacesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NetworkInterfacesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NetworkSecurityGroupImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NetworkSecurityGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NetworkSecurityGroupsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/SecurityRuleImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/SecurityRulesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/SecurityRulesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/StorageContainerImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/StorageContainersClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/StorageContainersImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualHardDiskImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualHardDiskUploadResponseImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualHardDisksClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualHardDisksImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualMachineInstanceImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualMachineInstancesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualMachineInstancesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/GalleryImageListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/GuestAgentListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/HybridIdentityMetadataListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/LogicalNetworkListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/MarketplaceGalleryImageListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/NetworkInterfaceListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/NetworkSecurityGroupListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/SecurityRuleListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/StorageContainerListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/VirtualHardDiskListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/VirtualMachineInstanceListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/AttestBootIntegrityPropertyEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/AttestCertPropertyEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/AttestDiskSecurityEncryptionTypeEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/AttestHWPlatformEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/AttestHealthStatusEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/AttestSecureBootPropertyEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/AttestationStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/AttestationStatusProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/AttestationStatuses.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/CloudInitDataSource.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/DiskFileFormat.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ExtendedLocation.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ExtendedLocationTypes.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImage.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageIdentifier.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageStatusDownloadStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageTagsUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageVersion.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageVersionStorageProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImages.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryOSDiskImage.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GpuAssignmentTypeEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GuestAgent.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GuestAgentInstallStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GuestAgentProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GuestAgents.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GuestCredential.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/HardwareProfileUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/HttpProxyConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/HybridIdentityMetadata.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/HybridIdentityMetadataProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/HybridIdentityMetadatas.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/HyperVGeneration.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/IPConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/IPConfigurationProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/IPPool.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/IPPoolInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/IPPoolTypeEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Identity.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/IdentityType.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ImageArmReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InstanceViewStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InterfaceDNSSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/IpAllocationMethodEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetwork.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkArmReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkPropertiesDhcpOptions.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkTypeEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworks.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworksUpdateRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/MarketplaceGalleryImage.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/MarketplaceGalleryImageProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/MarketplaceGalleryImageStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/MarketplaceGalleryImageStatusDownloadStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/MarketplaceGalleryImageStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/MarketplaceGalleryImageTagsUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/MarketplaceGalleryImages.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterface.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfaceArmReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfaceProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfaceStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfaceStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfaces.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfacesUpdateProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfacesUpdateRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkProfileUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkSecurityGroup.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkSecurityGroupArmReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkSecurityGroupProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkSecurityGroupStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkSecurityGroupStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkSecurityGroupTagsUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkSecurityGroups.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OperatingSystemTypes.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OsProfileUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OsProfileUpdateLinuxConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OsProfileUpdateWindowsConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PowerStateEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ProvisioningAction.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ProvisioningStateEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Route.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/RouteTable.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SecurityEncryptionType.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SecurityRule.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SecurityRuleAccess.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SecurityRuleDirection.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SecurityRuleProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SecurityRuleProtocol.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SecurityRules.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SecurityTypes.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SshConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SshPublicKey.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Status.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/StatusLevelTypes.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/StatusTypes.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/StorageContainer.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/StorageContainerProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/StorageContainerStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/StorageContainerStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/StorageContainerTagsUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/StorageContainers.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/StorageProfileUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Subnet.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SubnetIpConfigurationReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VMDiskSecurityProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDisk.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskArmReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskDownloadStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskUploadRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskUploadResponse.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskUploadStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDisks.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDisksUpdateProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDisksUpdateRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineConfigAgentInstanceView.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstance.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceManagedDiskParameters.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesHardwareProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesNetworkProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesOsProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesOsProfileLinuxConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesOsProfileWindowsConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesPlacementProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesSecurityProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesSecurityProfileUefiSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesStorageProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesStorageProfileOsDisk.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceUpdateProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceUpdateRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceView.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstances.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VmImageRepositoryCredentials.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VmSizeEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Microsoft.AzureStackHCI":"2026-07-01-preview"},"crossLanguagePackageId":"Microsoft.AzureStackHCI","crossLanguageVersion":"8e207b204b20","crossLanguageDefinitions":{"com.azure.resourcemanager.azurestackhci.vm.fluent.AttestationStatusesClient":"Microsoft.AzureStackHCI.AttestationStatuses","com.azure.resourcemanager.azurestackhci.vm.fluent.AttestationStatusesClient.get":"Microsoft.AzureStackHCI.AttestationStatuses.get","com.azure.resourcemanager.azurestackhci.vm.fluent.AttestationStatusesClient.getWithResponse":"Microsoft.AzureStackHCI.AttestationStatuses.get","com.azure.resourcemanager.azurestackhci.vm.fluent.AzureStackHciVmMgmtClient":"Microsoft.AzureStackHCI","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient":"Microsoft.AzureStackHCI.GalleryImages","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.GalleryImages.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.beginDelete":"Microsoft.AzureStackHCI.GalleryImages.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.beginUpdate":"Microsoft.AzureStackHCI.GalleryImages.update","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.createOrUpdate":"Microsoft.AzureStackHCI.GalleryImages.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.delete":"Microsoft.AzureStackHCI.GalleryImages.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.getByResourceGroup":"Microsoft.AzureStackHCI.GalleryImages.get","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.GalleryImages.get","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.list":"Microsoft.AzureStackHCI.GalleryImages.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.listByResourceGroup":"Microsoft.AzureStackHCI.GalleryImages.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.GalleryImagesClient.update":"Microsoft.AzureStackHCI.GalleryImages.update","com.azure.resourcemanager.azurestackhci.vm.fluent.GuestAgentsClient":"Microsoft.AzureStackHCI.GuestAgents","com.azure.resourcemanager.azurestackhci.vm.fluent.GuestAgentsClient.beginCreate":"Microsoft.AzureStackHCI.GuestAgents.create","com.azure.resourcemanager.azurestackhci.vm.fluent.GuestAgentsClient.beginDelete":"Microsoft.AzureStackHCI.GuestAgents.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.GuestAgentsClient.create":"Microsoft.AzureStackHCI.GuestAgents.create","com.azure.resourcemanager.azurestackhci.vm.fluent.GuestAgentsClient.delete":"Microsoft.AzureStackHCI.GuestAgents.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.GuestAgentsClient.get":"Microsoft.AzureStackHCI.GuestAgents.get","com.azure.resourcemanager.azurestackhci.vm.fluent.GuestAgentsClient.getWithResponse":"Microsoft.AzureStackHCI.GuestAgents.get","com.azure.resourcemanager.azurestackhci.vm.fluent.GuestAgentsClient.listByVirtualMachineInstance":"Microsoft.AzureStackHCI.GuestAgents.listByVirtualMachineInstance","com.azure.resourcemanager.azurestackhci.vm.fluent.HybridIdentityMetadatasClient":"Microsoft.AzureStackHCI.HybridIdentityMetadataGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.HybridIdentityMetadatasClient.get":"Microsoft.AzureStackHCI.HybridIdentityMetadataGroup.get","com.azure.resourcemanager.azurestackhci.vm.fluent.HybridIdentityMetadatasClient.getWithResponse":"Microsoft.AzureStackHCI.HybridIdentityMetadataGroup.get","com.azure.resourcemanager.azurestackhci.vm.fluent.HybridIdentityMetadatasClient.listByVirtualMachineInstance":"Microsoft.AzureStackHCI.HybridIdentityMetadataGroup.listByVirtualMachineInstance","com.azure.resourcemanager.azurestackhci.vm.fluent.InboundRulesClient":"Microsoft.AzureStackHCI.InboundRules","com.azure.resourcemanager.azurestackhci.vm.fluent.InboundRulesClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.InboundRules.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.InboundRulesClient.beginDelete":"Microsoft.AzureStackHCI.InboundRules.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.InboundRulesClient.createOrUpdate":"Microsoft.AzureStackHCI.InboundRules.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.InboundRulesClient.delete":"Microsoft.AzureStackHCI.InboundRules.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.InboundRulesClient.get":"Microsoft.AzureStackHCI.InboundRules.get","com.azure.resourcemanager.azurestackhci.vm.fluent.InboundRulesClient.getWithResponse":"Microsoft.AzureStackHCI.InboundRules.get","com.azure.resourcemanager.azurestackhci.vm.fluent.InboundRulesClient.listByNatGateway":"Microsoft.AzureStackHCI.InboundRules.listByNatGateway","com.azure.resourcemanager.azurestackhci.vm.fluent.LoadBalancersClient":"Microsoft.AzureStackHCI.LoadBalancers","com.azure.resourcemanager.azurestackhci.vm.fluent.LoadBalancersClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.LoadBalancers.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.LoadBalancersClient.beginDelete":"Microsoft.AzureStackHCI.LoadBalancers.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.LoadBalancersClient.beginUpdateTags":"Microsoft.AzureStackHCI.LoadBalancers.updateTags","com.azure.resourcemanager.azurestackhci.vm.fluent.LoadBalancersClient.createOrUpdate":"Microsoft.AzureStackHCI.LoadBalancers.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.LoadBalancersClient.delete":"Microsoft.AzureStackHCI.LoadBalancers.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.LoadBalancersClient.getByResourceGroup":"Microsoft.AzureStackHCI.LoadBalancers.get","com.azure.resourcemanager.azurestackhci.vm.fluent.LoadBalancersClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.LoadBalancers.get","com.azure.resourcemanager.azurestackhci.vm.fluent.LoadBalancersClient.list":"Microsoft.AzureStackHCI.LoadBalancers.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.LoadBalancersClient.listByResourceGroup":"Microsoft.AzureStackHCI.LoadBalancers.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.LoadBalancersClient.updateTags":"Microsoft.AzureStackHCI.LoadBalancers.updateTags","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient":"Microsoft.AzureStackHCI.LogicalNetworks","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.LogicalNetworks.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.beginDelete":"Microsoft.AzureStackHCI.LogicalNetworks.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.beginUpdate":"Microsoft.AzureStackHCI.LogicalNetworks.update","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.createOrUpdate":"Microsoft.AzureStackHCI.LogicalNetworks.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.delete":"Microsoft.AzureStackHCI.LogicalNetworks.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.getByResourceGroup":"Microsoft.AzureStackHCI.LogicalNetworks.get","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.LogicalNetworks.get","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.list":"Microsoft.AzureStackHCI.LogicalNetworks.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.listByResourceGroup":"Microsoft.AzureStackHCI.LogicalNetworks.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.LogicalNetworksClient.update":"Microsoft.AzureStackHCI.LogicalNetworks.update","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient":"Microsoft.AzureStackHCI.MarketplaceGalleryImages","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.beginDelete":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.beginUpdate":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.update","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.createOrUpdate":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.delete":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.getByResourceGroup":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.get","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.get","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.list":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.listByResourceGroup":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.MarketplaceGalleryImagesClient.update":"Microsoft.AzureStackHCI.MarketplaceGalleryImages.update","com.azure.resourcemanager.azurestackhci.vm.fluent.NatGatewaysClient":"Microsoft.AzureStackHCI.NatGateways","com.azure.resourcemanager.azurestackhci.vm.fluent.NatGatewaysClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.NatGateways.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.NatGatewaysClient.beginDelete":"Microsoft.AzureStackHCI.NatGateways.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.NatGatewaysClient.beginUpdateTags":"Microsoft.AzureStackHCI.NatGateways.updateTags","com.azure.resourcemanager.azurestackhci.vm.fluent.NatGatewaysClient.createOrUpdate":"Microsoft.AzureStackHCI.NatGateways.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.NatGatewaysClient.delete":"Microsoft.AzureStackHCI.NatGateways.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.NatGatewaysClient.getByResourceGroup":"Microsoft.AzureStackHCI.NatGateways.get","com.azure.resourcemanager.azurestackhci.vm.fluent.NatGatewaysClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.NatGateways.get","com.azure.resourcemanager.azurestackhci.vm.fluent.NatGatewaysClient.list":"Microsoft.AzureStackHCI.NatGateways.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.NatGatewaysClient.listByResourceGroup":"Microsoft.AzureStackHCI.NatGateways.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.NatGatewaysClient.updateTags":"Microsoft.AzureStackHCI.NatGateways.updateTags","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient":"Microsoft.AzureStackHCI.NetworkInterfaces","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.NetworkInterfaces.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.beginDelete":"Microsoft.AzureStackHCI.NetworkInterfaces.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.beginUpdate":"Microsoft.AzureStackHCI.NetworkInterfaces.update","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.createOrUpdate":"Microsoft.AzureStackHCI.NetworkInterfaces.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.delete":"Microsoft.AzureStackHCI.NetworkInterfaces.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.getByResourceGroup":"Microsoft.AzureStackHCI.NetworkInterfaces.get","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.NetworkInterfaces.get","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.list":"Microsoft.AzureStackHCI.NetworkInterfaces.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.listByResourceGroup":"Microsoft.AzureStackHCI.NetworkInterfaces.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkInterfacesClient.update":"Microsoft.AzureStackHCI.NetworkInterfaces.update","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient":"Microsoft.AzureStackHCI.NetworkSecurityGroups","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.NetworkSecurityGroups.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.beginDelete":"Microsoft.AzureStackHCI.NetworkSecurityGroups.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.beginUpdateTags":"Microsoft.AzureStackHCI.NetworkSecurityGroups.updateTags","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.createOrUpdate":"Microsoft.AzureStackHCI.NetworkSecurityGroups.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.delete":"Microsoft.AzureStackHCI.NetworkSecurityGroups.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.getByResourceGroup":"Microsoft.AzureStackHCI.NetworkSecurityGroups.get","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.NetworkSecurityGroups.get","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.list":"Microsoft.AzureStackHCI.NetworkSecurityGroups.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.listByResourceGroup":"Microsoft.AzureStackHCI.NetworkSecurityGroups.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.NetworkSecurityGroupsClient.updateTags":"Microsoft.AzureStackHCI.NetworkSecurityGroups.updateTags","com.azure.resourcemanager.azurestackhci.vm.fluent.OperationsClient":"Microsoft.AzureStackHCI.Operations","com.azure.resourcemanager.azurestackhci.vm.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.azurestackhci.vm.fluent.PublicIPAddressesClient":"Microsoft.AzureStackHCI.PublicIPAddresses","com.azure.resourcemanager.azurestackhci.vm.fluent.PublicIPAddressesClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.PublicIPAddresses.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.PublicIPAddressesClient.beginDelete":"Microsoft.AzureStackHCI.PublicIPAddresses.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.PublicIPAddressesClient.beginUpdateTags":"Microsoft.AzureStackHCI.PublicIPAddresses.updateTags","com.azure.resourcemanager.azurestackhci.vm.fluent.PublicIPAddressesClient.createOrUpdate":"Microsoft.AzureStackHCI.PublicIPAddresses.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.PublicIPAddressesClient.delete":"Microsoft.AzureStackHCI.PublicIPAddresses.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.PublicIPAddressesClient.getByResourceGroup":"Microsoft.AzureStackHCI.PublicIPAddresses.get","com.azure.resourcemanager.azurestackhci.vm.fluent.PublicIPAddressesClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.PublicIPAddresses.get","com.azure.resourcemanager.azurestackhci.vm.fluent.PublicIPAddressesClient.list":"Microsoft.AzureStackHCI.PublicIPAddresses.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.PublicIPAddressesClient.listByResourceGroup":"Microsoft.AzureStackHCI.PublicIPAddresses.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.PublicIPAddressesClient.updateTags":"Microsoft.AzureStackHCI.PublicIPAddresses.updateTags","com.azure.resourcemanager.azurestackhci.vm.fluent.SecurityRulesClient":"Microsoft.AzureStackHCI.SecurityRules","com.azure.resourcemanager.azurestackhci.vm.fluent.SecurityRulesClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.SecurityRules.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.SecurityRulesClient.beginDelete":"Microsoft.AzureStackHCI.SecurityRules.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.SecurityRulesClient.createOrUpdate":"Microsoft.AzureStackHCI.SecurityRules.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.SecurityRulesClient.delete":"Microsoft.AzureStackHCI.SecurityRules.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.SecurityRulesClient.get":"Microsoft.AzureStackHCI.SecurityRules.get","com.azure.resourcemanager.azurestackhci.vm.fluent.SecurityRulesClient.getWithResponse":"Microsoft.AzureStackHCI.SecurityRules.get","com.azure.resourcemanager.azurestackhci.vm.fluent.SecurityRulesClient.listByNetworkSecurityGroup":"Microsoft.AzureStackHCI.SecurityRules.listByNetworkSecurityGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.SnapshotsClient":"Microsoft.AzureStackHCI.Snapshots","com.azure.resourcemanager.azurestackhci.vm.fluent.SnapshotsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.Snapshots.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.SnapshotsClient.beginDelete":"Microsoft.AzureStackHCI.Snapshots.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.SnapshotsClient.beginUpdate":"Microsoft.AzureStackHCI.Snapshots.update","com.azure.resourcemanager.azurestackhci.vm.fluent.SnapshotsClient.createOrUpdate":"Microsoft.AzureStackHCI.Snapshots.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.SnapshotsClient.delete":"Microsoft.AzureStackHCI.Snapshots.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.SnapshotsClient.getByResourceGroup":"Microsoft.AzureStackHCI.Snapshots.get","com.azure.resourcemanager.azurestackhci.vm.fluent.SnapshotsClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.Snapshots.get","com.azure.resourcemanager.azurestackhci.vm.fluent.SnapshotsClient.list":"Microsoft.AzureStackHCI.Snapshots.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.SnapshotsClient.listByResourceGroup":"Microsoft.AzureStackHCI.Snapshots.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.SnapshotsClient.update":"Microsoft.AzureStackHCI.Snapshots.update","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient":"Microsoft.AzureStackHCI.StorageContainers","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.StorageContainers.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.beginDelete":"Microsoft.AzureStackHCI.StorageContainers.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.beginUpdate":"Microsoft.AzureStackHCI.StorageContainers.update","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.createOrUpdate":"Microsoft.AzureStackHCI.StorageContainers.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.delete":"Microsoft.AzureStackHCI.StorageContainers.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.getByResourceGroup":"Microsoft.AzureStackHCI.StorageContainers.get","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.StorageContainers.get","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.list":"Microsoft.AzureStackHCI.StorageContainers.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.listByResourceGroup":"Microsoft.AzureStackHCI.StorageContainers.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.StorageContainersClient.update":"Microsoft.AzureStackHCI.StorageContainers.update","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient":"Microsoft.AzureStackHCI.VirtualHardDisks","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.VirtualHardDisks.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.beginDelete":"Microsoft.AzureStackHCI.VirtualHardDisks.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.beginUpdate":"Microsoft.AzureStackHCI.VirtualHardDisks.update","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.beginUpload":"Microsoft.AzureStackHCI.VirtualHardDisks.upload","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.createOrUpdate":"Microsoft.AzureStackHCI.VirtualHardDisks.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.delete":"Microsoft.AzureStackHCI.VirtualHardDisks.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.getByResourceGroup":"Microsoft.AzureStackHCI.VirtualHardDisks.get","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.VirtualHardDisks.get","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.list":"Microsoft.AzureStackHCI.VirtualHardDisks.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.listByResourceGroup":"Microsoft.AzureStackHCI.VirtualHardDisks.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.update":"Microsoft.AzureStackHCI.VirtualHardDisks.update","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualHardDisksClient.upload":"Microsoft.AzureStackHCI.VirtualHardDisks.upload","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient":"Microsoft.AzureStackHCI.VirtualMachineInstances","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.VirtualMachineInstances.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.beginDelete":"Microsoft.AzureStackHCI.VirtualMachineInstances.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.beginPause":"Microsoft.AzureStackHCI.VirtualMachineInstances.pause","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.beginPowerOff":"Microsoft.AzureStackHCI.VirtualMachineInstances.powerOff","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.beginRestart":"Microsoft.AzureStackHCI.VirtualMachineInstances.restart","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.beginSave":"Microsoft.AzureStackHCI.VirtualMachineInstances.save","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.beginStart":"Microsoft.AzureStackHCI.VirtualMachineInstances.start","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.beginStop":"Microsoft.AzureStackHCI.VirtualMachineInstances.stop","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.beginUpdate":"Microsoft.AzureStackHCI.VirtualMachineInstances.update","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.createOrUpdate":"Microsoft.AzureStackHCI.VirtualMachineInstances.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.delete":"Microsoft.AzureStackHCI.VirtualMachineInstances.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.get":"Microsoft.AzureStackHCI.VirtualMachineInstances.get","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.getWithResponse":"Microsoft.AzureStackHCI.VirtualMachineInstances.get","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.list":"Microsoft.AzureStackHCI.VirtualMachineInstances.list","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.pause":"Microsoft.AzureStackHCI.VirtualMachineInstances.pause","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.powerOff":"Microsoft.AzureStackHCI.VirtualMachineInstances.powerOff","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.restart":"Microsoft.AzureStackHCI.VirtualMachineInstances.restart","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.save":"Microsoft.AzureStackHCI.VirtualMachineInstances.save","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.start":"Microsoft.AzureStackHCI.VirtualMachineInstances.start","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.stop":"Microsoft.AzureStackHCI.VirtualMachineInstances.stop","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualMachineInstancesClient.update":"Microsoft.AzureStackHCI.VirtualMachineInstances.update","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworkSubnetsClient":"Microsoft.AzureStackHCI.VirtualNetworkSubnets","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworkSubnetsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.VirtualNetworkSubnets.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworkSubnetsClient.beginDelete":"Microsoft.AzureStackHCI.VirtualNetworkSubnets.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworkSubnetsClient.beginUpdate":"Microsoft.AzureStackHCI.VirtualNetworkSubnets.update","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworkSubnetsClient.createOrUpdate":"Microsoft.AzureStackHCI.VirtualNetworkSubnets.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworkSubnetsClient.delete":"Microsoft.AzureStackHCI.VirtualNetworkSubnets.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworkSubnetsClient.get":"Microsoft.AzureStackHCI.VirtualNetworkSubnets.get","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworkSubnetsClient.getWithResponse":"Microsoft.AzureStackHCI.VirtualNetworkSubnets.get","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworkSubnetsClient.listByVirtualNetwork":"Microsoft.AzureStackHCI.VirtualNetworkSubnets.listByVirtualNetwork","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworkSubnetsClient.update":"Microsoft.AzureStackHCI.VirtualNetworkSubnets.update","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworksClient":"Microsoft.AzureStackHCI.VirtualNetworks","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworksClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.VirtualNetworks.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworksClient.beginDelete":"Microsoft.AzureStackHCI.VirtualNetworks.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworksClient.beginUpdateTags":"Microsoft.AzureStackHCI.VirtualNetworks.updateTags","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworksClient.createOrUpdate":"Microsoft.AzureStackHCI.VirtualNetworks.createOrUpdate","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworksClient.delete":"Microsoft.AzureStackHCI.VirtualNetworks.delete","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworksClient.getByResourceGroup":"Microsoft.AzureStackHCI.VirtualNetworks.get","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworksClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.VirtualNetworks.get","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworksClient.list":"Microsoft.AzureStackHCI.VirtualNetworks.listAll","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworksClient.listByResourceGroup":"Microsoft.AzureStackHCI.VirtualNetworks.listByResourceGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.VirtualNetworksClient.updateTags":"Microsoft.AzureStackHCI.VirtualNetworks.updateTags","com.azure.resourcemanager.azurestackhci.vm.fluent.models.AttestationStatusInner":"Microsoft.AzureStackHCI.AttestationStatus","com.azure.resourcemanager.azurestackhci.vm.fluent.models.GalleryImageInner":"Microsoft.AzureStackHCI.GalleryImage","com.azure.resourcemanager.azurestackhci.vm.fluent.models.GalleryImageVersionProperties":"Microsoft.AzureStackHCI.GalleryImageVersionProperties","com.azure.resourcemanager.azurestackhci.vm.fluent.models.GuestAgentInner":"Microsoft.AzureStackHCI.GuestAgent","com.azure.resourcemanager.azurestackhci.vm.fluent.models.HybridIdentityMetadataInner":"Microsoft.AzureStackHCI.HybridIdentityMetadata","com.azure.resourcemanager.azurestackhci.vm.fluent.models.InboundRuleInner":"Microsoft.AzureStackHCI.InboundRule","com.azure.resourcemanager.azurestackhci.vm.fluent.models.LoadBalancerInner":"Microsoft.AzureStackHCI.LoadBalancer","com.azure.resourcemanager.azurestackhci.vm.fluent.models.LogicalNetworkInner":"Microsoft.AzureStackHCI.LogicalNetwork","com.azure.resourcemanager.azurestackhci.vm.fluent.models.MarketplaceGalleryImageInner":"Microsoft.AzureStackHCI.MarketplaceGalleryImage","com.azure.resourcemanager.azurestackhci.vm.fluent.models.NatGatewayInner":"Microsoft.AzureStackHCI.NatGateway","com.azure.resourcemanager.azurestackhci.vm.fluent.models.NetworkInterfaceInner":"Microsoft.AzureStackHCI.NetworkInterface","com.azure.resourcemanager.azurestackhci.vm.fluent.models.NetworkSecurityGroupInner":"Microsoft.AzureStackHCI.NetworkSecurityGroup","com.azure.resourcemanager.azurestackhci.vm.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.azurestackhci.vm.fluent.models.OperationStatusResultInner":"Azure.ResourceManager.CommonTypes.OperationStatusResult","com.azure.resourcemanager.azurestackhci.vm.fluent.models.PublicIPAddressInner":"Microsoft.AzureStackHCI.PublicIPAddress","com.azure.resourcemanager.azurestackhci.vm.fluent.models.RouteProperties":"Microsoft.AzureStackHCI.RouteProperties","com.azure.resourcemanager.azurestackhci.vm.fluent.models.RouteTableProperties":"Microsoft.AzureStackHCI.RouteTableProperties","com.azure.resourcemanager.azurestackhci.vm.fluent.models.SecurityRuleInner":"Microsoft.AzureStackHCI.SecurityRule","com.azure.resourcemanager.azurestackhci.vm.fluent.models.SnapshotInner":"Microsoft.AzureStackHCI.Snapshot","com.azure.resourcemanager.azurestackhci.vm.fluent.models.StorageContainerInner":"Microsoft.AzureStackHCI.StorageContainer","com.azure.resourcemanager.azurestackhci.vm.fluent.models.SubnetProperties":"Microsoft.AzureStackHCI.SubnetProperties","com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualHardDiskInner":"Microsoft.AzureStackHCI.VirtualHardDisk","com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualHardDiskUploadResponseInner":"Microsoft.AzureStackHCI.VirtualHardDiskUploadResponse","com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualMachineInstanceInner":"Microsoft.AzureStackHCI.VirtualMachineInstance","com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualNetworkInner":"Microsoft.AzureStackHCI.VirtualNetwork","com.azure.resourcemanager.azurestackhci.vm.fluent.models.VirtualNetworkSubnetInner":"Microsoft.AzureStackHCI.VirtualNetworkSubnet","com.azure.resourcemanager.azurestackhci.vm.implementation.AzureStackHciVmMgmtClientBuilder":"Microsoft.AzureStackHCI","com.azure.resourcemanager.azurestackhci.vm.implementation.models.GalleryImageListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.GuestAgentListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.HybridIdentityMetadataListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.InboundRuleListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.LoadBalancerListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.LogicalNetworkListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.MarketplaceGalleryImageListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.NatGatewayListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.NetworkInterfaceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.NetworkSecurityGroupListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.PublicIPAddressListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.SecurityRuleListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.SnapshotListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.StorageContainerListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.VirtualHardDiskListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.VirtualMachineInstanceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.VirtualNetworkListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.implementation.models.VirtualNetworkSubnetListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.vm.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.azurestackhci.vm.models.AttestBootIntegrityPropertyEnum":"Microsoft.AzureStackHCI.AttestBootIntegrityPropertyEnum","com.azure.resourcemanager.azurestackhci.vm.models.AttestCertPropertyEnum":"Microsoft.AzureStackHCI.AttestCertPropertyEnum","com.azure.resourcemanager.azurestackhci.vm.models.AttestDiskSecurityEncryptionTypeEnum":"Microsoft.AzureStackHCI.AttestDiskSecurityEncryptionTypeEnum","com.azure.resourcemanager.azurestackhci.vm.models.AttestHWPlatformEnum":"Microsoft.AzureStackHCI.AttestHWPlatformEnum","com.azure.resourcemanager.azurestackhci.vm.models.AttestHealthStatusEnum":"Microsoft.AzureStackHCI.AttestHealthStatusEnum","com.azure.resourcemanager.azurestackhci.vm.models.AttestSecureBootPropertyEnum":"Microsoft.AzureStackHCI.AttestSecureBootPropertyEnum","com.azure.resourcemanager.azurestackhci.vm.models.AttestationStatusProperties":"Microsoft.AzureStackHCI.AttestationStatusProperties","com.azure.resourcemanager.azurestackhci.vm.models.BackendAddressPool":"Microsoft.AzureStackHCI.BackendAddressPool","com.azure.resourcemanager.azurestackhci.vm.models.BackendAddressPoolProperties":"Microsoft.AzureStackHCI.BackendAddressPoolProperties","com.azure.resourcemanager.azurestackhci.vm.models.CloudInitDataSource":"Microsoft.AzureStackHCI.CloudInitDataSource","com.azure.resourcemanager.azurestackhci.vm.models.CreationData":"Microsoft.AzureStackHCI.CreationData","com.azure.resourcemanager.azurestackhci.vm.models.DiskCreateOption":"Microsoft.AzureStackHCI.DiskCreateOption","com.azure.resourcemanager.azurestackhci.vm.models.DiskFileFormat":"Microsoft.AzureStackHCI.DiskFileFormat","com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation":"Microsoft.AzureStackHCI.ExtendedLocation","com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes":"Microsoft.AzureStackHCI.ExtendedLocationTypes","com.azure.resourcemanager.azurestackhci.vm.models.FabricConnectionHealthEnum":"Microsoft.AzureStackHCI.FabricConnectionHealthEnum","com.azure.resourcemanager.azurestackhci.vm.models.FabricIntegrationStateEnum":"Microsoft.AzureStackHCI.FabricIntegrationStateEnum","com.azure.resourcemanager.azurestackhci.vm.models.FabricIntegrationStatus":"Microsoft.AzureStackHCI.FabricIntegrationStatus","com.azure.resourcemanager.azurestackhci.vm.models.FabricIssue":"Microsoft.AzureStackHCI.FabricIssue","com.azure.resourcemanager.azurestackhci.vm.models.FabricResourceTypeEnum":"Microsoft.AzureStackHCI.FabricResourceTypeEnum","com.azure.resourcemanager.azurestackhci.vm.models.FrontendIPConfiguration":"Microsoft.AzureStackHCI.FrontendIPConfiguration","com.azure.resourcemanager.azurestackhci.vm.models.FrontendIPConfigurationProperties":"Microsoft.AzureStackHCI.FrontendIPConfigurationProperties","com.azure.resourcemanager.azurestackhci.vm.models.GalleryImageIdentifier":"Microsoft.AzureStackHCI.GalleryImageIdentifier","com.azure.resourcemanager.azurestackhci.vm.models.GalleryImageProperties":"Microsoft.AzureStackHCI.GalleryImageProperties","com.azure.resourcemanager.azurestackhci.vm.models.GalleryImageStatus":"Microsoft.AzureStackHCI.GalleryImageStatus","com.azure.resourcemanager.azurestackhci.vm.models.GalleryImageStatusDownloadStatus":"Microsoft.AzureStackHCI.GalleryImageStatusDownloadStatus","com.azure.resourcemanager.azurestackhci.vm.models.GalleryImageStatusProvisioningStatus":"Microsoft.AzureStackHCI.GalleryImageStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.GalleryImageTagsUpdate":"Azure.ResourceManager.Foundations.TagsUpdateModel","com.azure.resourcemanager.azurestackhci.vm.models.GalleryImageVersion":"Microsoft.AzureStackHCI.GalleryImageVersion","com.azure.resourcemanager.azurestackhci.vm.models.GalleryImageVersionStorageProfile":"Microsoft.AzureStackHCI.GalleryImageVersionStorageProfile","com.azure.resourcemanager.azurestackhci.vm.models.GalleryOSDiskImage":"Microsoft.AzureStackHCI.GalleryOSDiskImage","com.azure.resourcemanager.azurestackhci.vm.models.GpuAssignmentTypeEnum":"Microsoft.AzureStackHCI.GpuAssignmentTypeEnum","com.azure.resourcemanager.azurestackhci.vm.models.GuestAgentInstallStatus":"Microsoft.AzureStackHCI.GuestAgentInstallStatus","com.azure.resourcemanager.azurestackhci.vm.models.GuestAgentProperties":"Microsoft.AzureStackHCI.GuestAgentProperties","com.azure.resourcemanager.azurestackhci.vm.models.GuestCredential":"Microsoft.AzureStackHCI.GuestCredential","com.azure.resourcemanager.azurestackhci.vm.models.HardwareProfileUpdate":"Microsoft.AzureStackHCI.HardwareProfileUpdate","com.azure.resourcemanager.azurestackhci.vm.models.HttpProxyConfiguration":"Microsoft.AzureStackHCI.HttpProxyConfiguration","com.azure.resourcemanager.azurestackhci.vm.models.HybridIdentityMetadataProperties":"Microsoft.AzureStackHCI.HybridIdentityMetadataProperties","com.azure.resourcemanager.azurestackhci.vm.models.HyperVGeneration":"Microsoft.AzureStackHCI.HyperVGeneration","com.azure.resourcemanager.azurestackhci.vm.models.IPConfiguration":"Microsoft.AzureStackHCI.IPConfiguration","com.azure.resourcemanager.azurestackhci.vm.models.IPConfigurationArmReference":"Microsoft.AzureStackHCI.IPConfigurationArmReference","com.azure.resourcemanager.azurestackhci.vm.models.IPConfigurationProperties":"Microsoft.AzureStackHCI.IPConfigurationProperties","com.azure.resourcemanager.azurestackhci.vm.models.IPPool":"Microsoft.AzureStackHCI.IPPool","com.azure.resourcemanager.azurestackhci.vm.models.IPPoolInfo":"Microsoft.AzureStackHCI.IPPoolInfo","com.azure.resourcemanager.azurestackhci.vm.models.IPPoolTypeEnum":"Microsoft.AzureStackHCI.IPPoolTypeEnum","com.azure.resourcemanager.azurestackhci.vm.models.Identity":"Microsoft.AzureStackHCI.Identity","com.azure.resourcemanager.azurestackhci.vm.models.IdentityType":null,"com.azure.resourcemanager.azurestackhci.vm.models.ImageArmReference":"Microsoft.AzureStackHCI.ImageArmReference","com.azure.resourcemanager.azurestackhci.vm.models.InboundNATRuleProtocol":"Microsoft.AzureStackHCI.InboundNATRuleProtocol","com.azure.resourcemanager.azurestackhci.vm.models.InboundRuleProperties":"Microsoft.AzureStackHCI.InboundRuleProperties","com.azure.resourcemanager.azurestackhci.vm.models.InboundRuleStatus":"Microsoft.AzureStackHCI.InboundRuleStatus","com.azure.resourcemanager.azurestackhci.vm.models.InboundRuleStatusProvisioningStatus":"Microsoft.AzureStackHCI.InboundRuleStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.InstanceViewStatus":"Microsoft.AzureStackHCI.InstanceViewStatus","com.azure.resourcemanager.azurestackhci.vm.models.InterfaceDNSSettings":"Microsoft.AzureStackHCI.InterfaceDNSSettings","com.azure.resourcemanager.azurestackhci.vm.models.IpAllocationMethodEnum":"Microsoft.AzureStackHCI.IpAllocationMethodEnum","com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddress":"Microsoft.AzureStackHCI.LoadBalancerBackendAddress","com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressAdminState":"Microsoft.AzureStackHCI.LoadBalancerBackendAddressAdminState","com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressPoolReference":"Microsoft.AzureStackHCI.LoadBalancerBackendAddressPoolReference","com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressProperties":"Microsoft.AzureStackHCI.LoadBalancerBackendAddressProperties","com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerFrontendIPConfigurationReference":"Microsoft.AzureStackHCI.LoadBalancerFrontendIPConfigurationReference","com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerProbeProtocol":"Microsoft.AzureStackHCI.LoadBalancerProbeProtocol","com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerProbeReference":"Microsoft.AzureStackHCI.LoadBalancerProbeReference","com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerProperties":"Microsoft.AzureStackHCI.LoadBalancerProperties","com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRule":"Microsoft.AzureStackHCI.LoadBalancerRule","com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRuleProperties":"Microsoft.AzureStackHCI.LoadBalancerRuleProperties","com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRuleSessionPersistenceType":"Microsoft.AzureStackHCI.LoadBalancerRuleSessionPersistenceType","com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRuleTransportProtocol":"Microsoft.AzureStackHCI.LoadBalancerRuleTransportProtocol","com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerStatus":"Microsoft.AzureStackHCI.LoadBalancerStatus","com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerStatusProvisioningStatus":"Microsoft.AzureStackHCI.LoadBalancerStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerTagsUpdate":"Azure.ResourceManager.Foundations.TagsUpdateModel","com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworkArmReference":"Microsoft.AzureStackHCI.LogicalNetworkArmReference","com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworkProperties":"Microsoft.AzureStackHCI.LogicalNetworkProperties","com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworkPropertiesDhcpOptions":"Microsoft.AzureStackHCI.LogicalNetworkPropertiesDhcpOptions","com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworkStatus":"Microsoft.AzureStackHCI.LogicalNetworkStatus","com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworkStatusProvisioningStatus":"Microsoft.AzureStackHCI.LogicalNetworkStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworkTypeEnum":"Microsoft.AzureStackHCI.LogicalNetworkTypeEnum","com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworksUpdateRequest":"Microsoft.AzureStackHCI.LogicalNetworksUpdateRequest","com.azure.resourcemanager.azurestackhci.vm.models.ManagedNetworkFabricArmReference":"Microsoft.AzureStackHCI.ManagedNetworkFabricArmReference","com.azure.resourcemanager.azurestackhci.vm.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.azurestackhci.vm.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.azurestackhci.vm.models.MarketplaceGalleryImageProperties":"Microsoft.AzureStackHCI.MarketplaceGalleryImageProperties","com.azure.resourcemanager.azurestackhci.vm.models.MarketplaceGalleryImageStatus":"Microsoft.AzureStackHCI.MarketplaceGalleryImageStatus","com.azure.resourcemanager.azurestackhci.vm.models.MarketplaceGalleryImageStatusDownloadStatus":"Microsoft.AzureStackHCI.MarketplaceGalleryImageStatusDownloadStatus","com.azure.resourcemanager.azurestackhci.vm.models.MarketplaceGalleryImageStatusProvisioningStatus":"Microsoft.AzureStackHCI.MarketplaceGalleryImageStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.MarketplaceGalleryImageTagsUpdate":"Azure.ResourceManager.Foundations.TagsUpdateModel","com.azure.resourcemanager.azurestackhci.vm.models.NatGatewayArmReference":"Microsoft.AzureStackHCI.NatGatewayArmReference","com.azure.resourcemanager.azurestackhci.vm.models.NatGatewayProperties":"Microsoft.AzureStackHCI.NatGatewayProperties","com.azure.resourcemanager.azurestackhci.vm.models.NatGatewayStatus":"Microsoft.AzureStackHCI.NatGatewayStatus","com.azure.resourcemanager.azurestackhci.vm.models.NatGatewayStatusProvisioningStatus":"Microsoft.AzureStackHCI.NatGatewayStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.NatGatewayTagsUpdate":"Azure.ResourceManager.Foundations.TagsUpdateModel","com.azure.resourcemanager.azurestackhci.vm.models.NetworkInterfaceArmReference":"Microsoft.AzureStackHCI.NetworkInterfaceArmReference","com.azure.resourcemanager.azurestackhci.vm.models.NetworkInterfaceProperties":"Microsoft.AzureStackHCI.NetworkInterfaceProperties","com.azure.resourcemanager.azurestackhci.vm.models.NetworkInterfaceStatus":"Microsoft.AzureStackHCI.NetworkInterfaceStatus","com.azure.resourcemanager.azurestackhci.vm.models.NetworkInterfaceStatusProvisioningStatus":"Microsoft.AzureStackHCI.NetworkInterfaceStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.NetworkInterfacesUpdateProperties":"Microsoft.AzureStackHCI.NetworkInterfacesUpdateProperties","com.azure.resourcemanager.azurestackhci.vm.models.NetworkInterfacesUpdateRequest":"Microsoft.AzureStackHCI.NetworkInterfacesUpdateRequest","com.azure.resourcemanager.azurestackhci.vm.models.NetworkProfileUpdate":"Microsoft.AzureStackHCI.NetworkProfileUpdate","com.azure.resourcemanager.azurestackhci.vm.models.NetworkSecurityGroupArmReference":"Microsoft.AzureStackHCI.NetworkSecurityGroupArmReference","com.azure.resourcemanager.azurestackhci.vm.models.NetworkSecurityGroupProperties":"Microsoft.AzureStackHCI.NetworkSecurityGroupProperties","com.azure.resourcemanager.azurestackhci.vm.models.NetworkSecurityGroupStatus":"Microsoft.AzureStackHCI.NetworkSecurityGroupStatus","com.azure.resourcemanager.azurestackhci.vm.models.NetworkSecurityGroupStatusProvisioningStatus":"Microsoft.AzureStackHCI.NetworkSecurityGroupStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.NetworkSecurityGroupTagsUpdate":"Azure.ResourceManager.Foundations.TagsUpdateModel","com.azure.resourcemanager.azurestackhci.vm.models.OperatingSystemTypes":"Microsoft.AzureStackHCI.OperatingSystemTypes","com.azure.resourcemanager.azurestackhci.vm.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.azurestackhci.vm.models.OperationStepResult":"Microsoft.AzureStackHCI.OperationStepResult","com.azure.resourcemanager.azurestackhci.vm.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.azurestackhci.vm.models.OsProfileUpdate":"Microsoft.AzureStackHCI.OsProfileUpdate","com.azure.resourcemanager.azurestackhci.vm.models.OsProfileUpdateLinuxConfiguration":"Microsoft.AzureStackHCI.OsProfileUpdateLinuxConfiguration","com.azure.resourcemanager.azurestackhci.vm.models.OsProfileUpdateWindowsConfiguration":"Microsoft.AzureStackHCI.OsProfileUpdateWindowsConfiguration","com.azure.resourcemanager.azurestackhci.vm.models.PowerOffVirtualMachineOptions":"Microsoft.AzureStackHCI.PowerOffVirtualMachineOptions","com.azure.resourcemanager.azurestackhci.vm.models.PowerStateEnum":"Microsoft.AzureStackHCI.PowerStateEnum","com.azure.resourcemanager.azurestackhci.vm.models.Probe":"Microsoft.AzureStackHCI.Probe","com.azure.resourcemanager.azurestackhci.vm.models.ProbeProperties":"Microsoft.AzureStackHCI.ProbeProperties","com.azure.resourcemanager.azurestackhci.vm.models.ProvisioningAction":"Microsoft.AzureStackHCI.ProvisioningAction","com.azure.resourcemanager.azurestackhci.vm.models.ProvisioningStateEnum":"Microsoft.AzureStackHCI.ProvisioningStateEnum","com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressArmReference":"Microsoft.AzureStackHCI.PublicIPAddressArmReference","com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressProperties":"Microsoft.AzureStackHCI.PublicIPAddressProperties","com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressTagsUpdate":"Azure.ResourceManager.Foundations.TagsUpdateModel","com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressType":"Microsoft.AzureStackHCI.PublicIPAddressType","com.azure.resourcemanager.azurestackhci.vm.models.Route":"Microsoft.AzureStackHCI.Route","com.azure.resourcemanager.azurestackhci.vm.models.RouteTable":"Microsoft.AzureStackHCI.RouteTable","com.azure.resourcemanager.azurestackhci.vm.models.SecurityEncryptionType":"Microsoft.AzureStackHCI.SecurityEncryptionType","com.azure.resourcemanager.azurestackhci.vm.models.SecurityRuleAccess":"Microsoft.AzureStackHCI.SecurityRuleAccess","com.azure.resourcemanager.azurestackhci.vm.models.SecurityRuleDirection":"Microsoft.AzureStackHCI.SecurityRuleDirection","com.azure.resourcemanager.azurestackhci.vm.models.SecurityRuleProperties":"Microsoft.AzureStackHCI.SecurityRuleProperties","com.azure.resourcemanager.azurestackhci.vm.models.SecurityRuleProtocol":"Microsoft.AzureStackHCI.SecurityRuleProtocol","com.azure.resourcemanager.azurestackhci.vm.models.SecurityTypes":"Microsoft.AzureStackHCI.SecurityTypes","com.azure.resourcemanager.azurestackhci.vm.models.SnapshotProperties":"Microsoft.AzureStackHCI.SnapshotProperties","com.azure.resourcemanager.azurestackhci.vm.models.SnapshotStatus":"Microsoft.AzureStackHCI.SnapshotStatus","com.azure.resourcemanager.azurestackhci.vm.models.SnapshotStatusProvisioningStatus":"Microsoft.AzureStackHCI.SnapshotStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.SnapshotTagsUpdate":"Azure.ResourceManager.Foundations.TagsUpdateModel","com.azure.resourcemanager.azurestackhci.vm.models.SshConfiguration":"Microsoft.AzureStackHCI.SshConfiguration","com.azure.resourcemanager.azurestackhci.vm.models.SshPublicKey":"Microsoft.AzureStackHCI.SshPublicKey","com.azure.resourcemanager.azurestackhci.vm.models.Status":"Microsoft.AzureStackHCI.Status","com.azure.resourcemanager.azurestackhci.vm.models.StatusLevelTypes":"Microsoft.AzureStackHCI.StatusLevelTypes","com.azure.resourcemanager.azurestackhci.vm.models.StatusTypes":"Microsoft.AzureStackHCI.StatusTypes","com.azure.resourcemanager.azurestackhci.vm.models.StorageContainerProperties":"Microsoft.AzureStackHCI.StorageContainerProperties","com.azure.resourcemanager.azurestackhci.vm.models.StorageContainerStatus":"Microsoft.AzureStackHCI.StorageContainerStatus","com.azure.resourcemanager.azurestackhci.vm.models.StorageContainerStatusProvisioningStatus":"Microsoft.AzureStackHCI.StorageContainerStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.StorageContainerTagsUpdate":"Azure.ResourceManager.Foundations.TagsUpdateModel","com.azure.resourcemanager.azurestackhci.vm.models.StorageProfileUpdate":"Microsoft.AzureStackHCI.StorageProfileUpdate","com.azure.resourcemanager.azurestackhci.vm.models.Subnet":"Microsoft.AzureStackHCI.Subnet","com.azure.resourcemanager.azurestackhci.vm.models.SubnetIpConfigurationReference":"Microsoft.AzureStackHCI.SubnetIpConfigurationReference","com.azure.resourcemanager.azurestackhci.vm.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.azurestackhci.vm.models.VMDiskSecurityProfile":"Microsoft.AzureStackHCI.VMDiskSecurityProfile","com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskArmReference":"Microsoft.AzureStackHCI.VirtualHardDiskArmReference","com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskDownloadStatus":"Microsoft.AzureStackHCI.VirtualHardDiskDownloadStatus","com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskProperties":"Microsoft.AzureStackHCI.VirtualHardDiskProperties","com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskStatus":"Microsoft.AzureStackHCI.VirtualHardDiskStatus","com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskStatusProvisioningStatus":"Microsoft.AzureStackHCI.VirtualHardDiskStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskUploadRequest":"Microsoft.AzureStackHCI.VirtualHardDiskUploadRequest","com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskUploadStatus":"Microsoft.AzureStackHCI.VirtualHardDiskUploadStatus","com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDisksUpdateProperties":"Microsoft.AzureStackHCI.VirtualHardDisksUpdateProperties","com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDisksUpdateRequest":"Microsoft.AzureStackHCI.VirtualHardDisksUpdateRequest","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineConfigAgentInstanceView":"Microsoft.AzureStackHCI.VirtualMachineConfigAgentInstanceView","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceManagedDiskParameters":"Microsoft.AzureStackHCI.VirtualMachineInstanceManagedDiskParameters","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceProperties":"Microsoft.AzureStackHCI.VirtualMachineInstanceProperties","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesHardwareProfile":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesHardwareProfile","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesNetworkProfile":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesNetworkProfile","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesOsProfile":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesOsProfile","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesOsProfileLinuxConfiguration":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesOsProfileLinuxConfiguration","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesOsProfileWindowsConfiguration":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesOsProfileWindowsConfiguration","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesPlacementProfile":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesPlacementProfile","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesSecurityProfile":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesSecurityProfile","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesSecurityProfileUefiSettings":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesSecurityProfileUefiSettings","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesStorageProfile":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesStorageProfile","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesStorageProfileOsDisk":"Microsoft.AzureStackHCI.VirtualMachineInstancePropertiesStorageProfileOsDisk","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceStatus":"Microsoft.AzureStackHCI.VirtualMachineInstanceStatus","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceStatusProvisioningStatus":"Microsoft.AzureStackHCI.VirtualMachineInstanceStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceUpdateProperties":"Microsoft.AzureStackHCI.VirtualMachineInstanceUpdateProperties","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceUpdateRequest":"Microsoft.AzureStackHCI.VirtualMachineInstanceUpdateRequest","com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceView":"Microsoft.AzureStackHCI.VirtualMachineInstanceView","com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkAddressSpace":"Microsoft.AzureStackHCI.VirtualNetworkAddressSpace","com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkArmReference":"Microsoft.AzureStackHCI.VirtualNetworkArmReference","com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkDhcpOptions":"Microsoft.AzureStackHCI.VirtualNetworkDhcpOptions","com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkProperties":"Microsoft.AzureStackHCI.VirtualNetworkProperties","com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkStatus":"Microsoft.AzureStackHCI.VirtualNetworkStatus","com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkStatusProvisioningStatus":"Microsoft.AzureStackHCI.VirtualNetworkStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetArmReference":"Microsoft.AzureStackHCI.VirtualNetworkSubnetArmReference","com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetIpConfigurationReference":"Microsoft.AzureStackHCI.VirtualNetworkSubnetIpConfigurationReference","com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetProperties":"Microsoft.AzureStackHCI.VirtualNetworkSubnetProperties","com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetStatus":"Microsoft.AzureStackHCI.VirtualNetworkSubnetStatus","com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetStatusProvisioningStatus":"Microsoft.AzureStackHCI.VirtualNetworkSubnetStatusProvisioningStatus","com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetUpdateProperties":"Microsoft.AzureStackHCI.VirtualNetworkSubnetUpdateProperties","com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetUpdateRequest":"Microsoft.AzureStackHCI.VirtualNetworkSubnetUpdateRequest","com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkTagsUpdate":"Azure.ResourceManager.Foundations.TagsUpdateModel","com.azure.resourcemanager.azurestackhci.vm.models.VmSizeEnum":"Microsoft.AzureStackHCI.VmSizeEnum"},"generatedFiles":["src/main/java/com/azure/resourcemanager/azurestackhci/vm/AzureStackHciVmManager.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/AttestationStatusesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/AzureStackHciVmMgmtClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/GalleryImagesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/GuestAgentsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/HybridIdentityMetadatasClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/InboundRulesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/LoadBalancersClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/LogicalNetworksClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/MarketplaceGalleryImagesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/NatGatewaysClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/NetworkInterfacesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/NetworkSecurityGroupsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/PublicIPAddressesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/SecurityRulesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/SnapshotsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/StorageContainersClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/VirtualHardDisksClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/VirtualMachineInstancesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/VirtualNetworkSubnetsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/VirtualNetworksClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/AttestationStatusInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/GalleryImageInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/GalleryImageVersionProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/GuestAgentInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/HybridIdentityMetadataInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/InboundRuleInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/LoadBalancerInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/LogicalNetworkInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/MarketplaceGalleryImageInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/NatGatewayInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/NetworkInterfaceInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/NetworkSecurityGroupInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/OperationStatusResultInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/PublicIPAddressInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/RouteProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/RouteTableProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/SecurityRuleInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/SnapshotInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/StorageContainerInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/SubnetProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/VirtualHardDiskInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/VirtualHardDiskUploadResponseInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/VirtualMachineInstanceInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/VirtualNetworkInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/VirtualNetworkSubnetInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/fluent/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/AttestationStatusImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/AttestationStatusesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/AttestationStatusesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/AzureStackHciVmMgmtClientBuilder.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/AzureStackHciVmMgmtClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/GalleryImageImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/GalleryImagesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/GalleryImagesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/GuestAgentImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/GuestAgentsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/GuestAgentsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/HybridIdentityMetadataImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/HybridIdentityMetadatasClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/HybridIdentityMetadatasImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/InboundRuleImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/InboundRulesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/InboundRulesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/LoadBalancerImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/LoadBalancersClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/LoadBalancersImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/LogicalNetworkImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/LogicalNetworksClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/LogicalNetworksImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/MarketplaceGalleryImageImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/MarketplaceGalleryImagesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/MarketplaceGalleryImagesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NatGatewayImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NatGatewaysClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NatGatewaysImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NetworkInterfaceImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NetworkInterfacesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NetworkInterfacesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NetworkSecurityGroupImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NetworkSecurityGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/NetworkSecurityGroupsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/OperationStatusResultImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/PublicIPAddressImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/PublicIPAddressesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/PublicIPAddressesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/SecurityRuleImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/SecurityRulesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/SecurityRulesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/SnapshotImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/SnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/SnapshotsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/StorageContainerImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/StorageContainersClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/StorageContainersImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualHardDiskImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualHardDiskUploadResponseImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualHardDisksClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualHardDisksImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualMachineInstanceImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualMachineInstancesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualMachineInstancesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworkImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworkSubnetImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworkSubnetsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworkSubnetsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworksClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/VirtualNetworksImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/GalleryImageListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/GuestAgentListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/HybridIdentityMetadataListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/InboundRuleListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/LoadBalancerListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/LogicalNetworkListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/MarketplaceGalleryImageListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/NatGatewayListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/NetworkInterfaceListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/NetworkSecurityGroupListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/PublicIPAddressListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/SecurityRuleListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/SnapshotListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/StorageContainerListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/VirtualHardDiskListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/VirtualMachineInstanceListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/VirtualNetworkListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/models/VirtualNetworkSubnetListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/implementation/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ActionType.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/AttestBootIntegrityPropertyEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/AttestCertPropertyEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/AttestDiskSecurityEncryptionTypeEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/AttestHWPlatformEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/AttestHealthStatusEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/AttestSecureBootPropertyEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/AttestationStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/AttestationStatusProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/AttestationStatuses.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/BackendAddressPool.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/BackendAddressPoolProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/CloudInitDataSource.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/CreationData.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/DiskCreateOption.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/DiskFileFormat.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ExtendedLocation.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ExtendedLocationTypes.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricConnectionHealthEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricIntegrationStateEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricIntegrationStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricIssue.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FabricResourceTypeEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FrontendIPConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/FrontendIPConfigurationProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImage.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageIdentifier.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageStatusDownloadStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageTagsUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageVersion.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImageVersionStorageProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryImages.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GalleryOSDiskImage.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GpuAssignmentTypeEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GuestAgent.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GuestAgentInstallStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GuestAgentProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GuestAgents.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/GuestCredential.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/HardwareProfileUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/HttpProxyConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/HybridIdentityMetadata.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/HybridIdentityMetadataProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/HybridIdentityMetadatas.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/HyperVGeneration.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/IPConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/IPConfigurationArmReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/IPConfigurationProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/IPPool.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/IPPoolInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/IPPoolTypeEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Identity.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/IdentityType.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ImageArmReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundNATRuleProtocol.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRule.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRuleProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRuleStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRuleStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InboundRules.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InstanceViewStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/InterfaceDNSSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/IpAllocationMethodEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancer.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerBackendAddress.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerBackendAddressAdminState.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerBackendAddressPoolReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerBackendAddressProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerFrontendIPConfigurationReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerProbeProtocol.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerProbeReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerRule.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerRuleProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerRuleSessionPersistenceType.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerRuleTransportProtocol.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancerTagsUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LoadBalancers.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetwork.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkArmReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkPropertiesDhcpOptions.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworkTypeEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworks.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/LogicalNetworksUpdateRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ManagedNetworkFabricArmReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/MarketplaceGalleryImage.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/MarketplaceGalleryImageProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/MarketplaceGalleryImageStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/MarketplaceGalleryImageStatusDownloadStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/MarketplaceGalleryImageStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/MarketplaceGalleryImageTagsUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/MarketplaceGalleryImages.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGateway.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayArmReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGatewayTagsUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NatGateways.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterface.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfaceArmReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfaceProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfaceStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfaceStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfaces.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfacesUpdateProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkInterfacesUpdateRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkProfileUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkSecurityGroup.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkSecurityGroupArmReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkSecurityGroupProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkSecurityGroupStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkSecurityGroupStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkSecurityGroupTagsUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/NetworkSecurityGroups.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OperatingSystemTypes.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Operation.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OperationStatusResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OperationStepResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Operations.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Origin.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OsProfileUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OsProfileUpdateLinuxConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/OsProfileUpdateWindowsConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PowerOffVirtualMachineOptions.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PowerStateEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Probe.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ProbeProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ProvisioningAction.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/ProvisioningStateEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddress.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddressArmReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddressProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddressTagsUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddressType.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/PublicIPAddresses.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Route.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/RouteTable.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SecurityEncryptionType.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SecurityRule.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SecurityRuleAccess.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SecurityRuleDirection.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SecurityRuleProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SecurityRuleProtocol.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SecurityRules.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SecurityTypes.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Snapshot.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SnapshotProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SnapshotStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SnapshotStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SnapshotTagsUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Snapshots.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SshConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SshPublicKey.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Status.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/StatusLevelTypes.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/StatusTypes.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/StorageContainer.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/StorageContainerProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/StorageContainerStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/StorageContainerStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/StorageContainerTagsUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/StorageContainers.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/StorageProfileUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/Subnet.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/SubnetIpConfigurationReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VMDiskSecurityProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDisk.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskArmReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskDownloadStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskUploadRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskUploadResponse.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDiskUploadStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDisks.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDisksUpdateProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualHardDisksUpdateRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineConfigAgentInstanceView.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstance.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceManagedDiskParameters.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesHardwareProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesNetworkProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesOsProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesOsProfileLinuxConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesOsProfileWindowsConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesPlacementProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesSecurityProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesSecurityProfileUefiSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesStorageProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstancePropertiesStorageProfileOsDisk.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceUpdateProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceUpdateRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstanceView.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualMachineInstances.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetwork.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkAddressSpace.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkArmReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkDhcpOptions.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnet.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetArmReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetIpConfigurationReference.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetStatusProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetUpdateProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnetUpdateRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkSubnets.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworkTagsUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VirtualNetworks.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/VmSizeEnum.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/models/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/vm/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci-vm/proxy-config.json b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci-vm/proxy-config.json index 372b47a927f04..b0b4104332c0c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci-vm/proxy-config.json +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci-vm/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.azurestackhci.vm.implementation.AttestationStatusesClientImpl$AttestationStatusesService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.GalleryImagesClientImpl$GalleryImagesService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.GuestAgentsClientImpl$GuestAgentsService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.HybridIdentityMetadatasClientImpl$HybridIdentityMetadatasService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.LogicalNetworksClientImpl$LogicalNetworksService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.MarketplaceGalleryImagesClientImpl$MarketplaceGalleryImagesService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.NetworkInterfacesClientImpl$NetworkInterfacesService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.NetworkSecurityGroupsClientImpl$NetworkSecurityGroupsService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.SecurityRulesClientImpl$SecurityRulesService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.StorageContainersClientImpl$StorageContainersService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.VirtualHardDisksClientImpl$VirtualHardDisksService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.VirtualMachineInstancesClientImpl$VirtualMachineInstancesService"]] \ No newline at end of file +[["com.azure.resourcemanager.azurestackhci.vm.implementation.AttestationStatusesClientImpl$AttestationStatusesService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.GalleryImagesClientImpl$GalleryImagesService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.GuestAgentsClientImpl$GuestAgentsService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.HybridIdentityMetadatasClientImpl$HybridIdentityMetadatasService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.InboundRulesClientImpl$InboundRulesService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.LoadBalancersClientImpl$LoadBalancersService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.LogicalNetworksClientImpl$LogicalNetworksService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.MarketplaceGalleryImagesClientImpl$MarketplaceGalleryImagesService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.NatGatewaysClientImpl$NatGatewaysService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.NetworkInterfacesClientImpl$NetworkInterfacesService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.NetworkSecurityGroupsClientImpl$NetworkSecurityGroupsService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.PublicIPAddressesClientImpl$PublicIPAddressesService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.SecurityRulesClientImpl$SecurityRulesService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.StorageContainersClientImpl$StorageContainersService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.VirtualHardDisksClientImpl$VirtualHardDisksService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.VirtualMachineInstancesClientImpl$VirtualMachineInstancesService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.VirtualNetworkSubnetsClientImpl$VirtualNetworkSubnetsService"],["com.azure.resourcemanager.azurestackhci.vm.implementation.VirtualNetworksClientImpl$VirtualNetworksService"]] \ No newline at end of file diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/AttestationStatusesGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/AttestationStatusesGetSamples.java index 9a9b236c5b978..b52f76be92b3c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/AttestationStatusesGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/AttestationStatusesGetSamples.java @@ -9,7 +9,7 @@ */ public final class AttestationStatusesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/AttestationStatuses_Get.json + * x-ms-original-file: 2026-07-01-preview/AttestationStatuses_Get.json */ /** * Sample code: GetAttestationStatus. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesCreateOrUpdateSamples.java index 66102691430c5..c89ab8725143c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class GalleryImagesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/GalleryImages_CreateOrUpdate.json + * x-ms-original-file: 2026-07-01-preview/GalleryImages_CreateOrUpdate.json */ /** * Sample code: PutGalleryImage. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesDeleteSamples.java index 011bf3e11eaaf..ee907e0190411 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class GalleryImagesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/GalleryImages_Delete.json + * x-ms-original-file: 2026-07-01-preview/GalleryImages_Delete.json */ /** * Sample code: DeleteGalleryImage. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesGetByResourceGroupSamples.java index e4101874afc8e..d52a5044f16b8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesGetByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class GalleryImagesGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/GalleryImages_Get.json + * x-ms-original-file: 2026-07-01-preview/GalleryImages_Get.json */ /** * Sample code: GetGalleryImage. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesListByResourceGroupSamples.java index aac7019efe5ae..fc73f3b5ba192 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesListByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class GalleryImagesListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/GalleryImages_ListByResourceGroup.json + * x-ms-original-file: 2026-07-01-preview/GalleryImages_ListByResourceGroup.json */ /** * Sample code: ListGalleryImageByResourceGroup. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesListSamples.java index ea3fb4f97d4fa..51c13018d781e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesListSamples.java @@ -9,7 +9,7 @@ */ public final class GalleryImagesListSamples { /* - * x-ms-original-file: 2025-06-01-preview/GalleryImages_ListAll.json + * x-ms-original-file: 2026-07-01-preview/GalleryImages_ListAll.json */ /** * Sample code: ListGalleryImageBySubscription. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesUpdateSamples.java index dee78d5a3387b..0d427d46bffe8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImagesUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class GalleryImagesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/GalleryImages_Update.json + * x-ms-original-file: 2026-07-01-preview/GalleryImages_Update.json */ /** * Sample code: UpdateGalleryImage. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GuestAgentsCreateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GuestAgentsCreateSamples.java index aaf12c2d0535f..b186d6044492a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GuestAgentsCreateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GuestAgentsCreateSamples.java @@ -14,7 +14,7 @@ */ public final class GuestAgentsCreateSamples { /* - * x-ms-original-file: 2025-06-01-preview/GuestAgents_Create.json + * x-ms-original-file: 2026-07-01-preview/GuestAgents_Create.json */ /** * Sample code: CreateGuestAgent. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GuestAgentsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GuestAgentsDeleteSamples.java index a75e0a7f10247..9837583114c57 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GuestAgentsDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GuestAgentsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class GuestAgentsDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/GuestAgents_Delete.json + * x-ms-original-file: 2026-07-01-preview/GuestAgents_Delete.json */ /** * Sample code: DeleteGuestAgent. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GuestAgentsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GuestAgentsGetSamples.java index 62e29a845c88a..09fd90cf80563 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GuestAgentsGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GuestAgentsGetSamples.java @@ -9,7 +9,7 @@ */ public final class GuestAgentsGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/GuestAgents_Get.json + * x-ms-original-file: 2026-07-01-preview/GuestAgents_Get.json */ /** * Sample code: GetGuestAgent. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GuestAgentsListByVirtualMachineInstanceSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GuestAgentsListByVirtualMachineInstanceSamples.java index 7eb51c180705f..1356918e5426b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GuestAgentsListByVirtualMachineInstanceSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/GuestAgentsListByVirtualMachineInstanceSamples.java @@ -9,7 +9,7 @@ */ public final class GuestAgentsListByVirtualMachineInstanceSamples { /* - * x-ms-original-file: 2025-06-01-preview/GuestAgents_ListByVirtualMachineInstance.json + * x-ms-original-file: 2026-07-01-preview/GuestAgents_ListByVirtualMachineInstance.json */ /** * Sample code: GuestAgentListByVirtualMachineInstances. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/HybridIdentityMetadataGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/HybridIdentityMetadataGetSamples.java index ff2d48763408f..179252f092be7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/HybridIdentityMetadataGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/HybridIdentityMetadataGetSamples.java @@ -9,7 +9,7 @@ */ public final class HybridIdentityMetadataGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/HybridIdentityMetadataGroup_Get.json + * x-ms-original-file: 2026-07-01-preview/HybridIdentityMetadataGroup_Get.json */ /** * Sample code: GetHybridIdentityMetadata. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/HybridIdentityMetadataListByVirtualMachineInstanceSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/HybridIdentityMetadataListByVirtualMachineInstanceSamples.java index 4cde69d6d0d01..b5f91975caebf 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/HybridIdentityMetadataListByVirtualMachineInstanceSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/HybridIdentityMetadataListByVirtualMachineInstanceSamples.java @@ -9,7 +9,7 @@ */ public final class HybridIdentityMetadataListByVirtualMachineInstanceSamples { /* - * x-ms-original-file: 2025-06-01-preview/HybridIdentityMetadata_ListByVirtualMachineInstance.json + * x-ms-original-file: 2026-07-01-preview/HybridIdentityMetadata_ListByVirtualMachineInstance.json */ /** * Sample code: HybridIdentityMetadataListByVirtualMachineInstances. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/InboundRulesCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/InboundRulesCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..c26e62421cf21 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/InboundRulesCreateOrUpdateSamples.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.vm.models.IPConfigurationArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.InboundNATRuleProtocol; +import com.azure.resourcemanager.azurestackhci.vm.models.InboundRuleProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressArmReference; + +/** + * Samples for InboundRules CreateOrUpdate. + */ +public final class InboundRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-01-preview/InboundRules_CreateOrUpdate.json + */ + /** + * Sample code: CreateOrUpdateInboundRule. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + createOrUpdateInboundRule(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.inboundRules() + .define("sample-inbound-rule") + .withExistingNatGateway("test-rg", "test-nat-gw") + .withProperties(new InboundRuleProperties().withProtocol(InboundNATRuleProtocol.TCP) + .withFrontendPort(3389) + .withBackendPort(3389) + .withBackendIPConfiguration(new IPConfigurationArmReference().withResourceId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic/ipConfigurations/ipconfig1")) + .withPublicIPAddress(new PublicIPAddressArmReference().withResourceId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/publicIPAddresses/test-public-ip"))) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .create(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/InboundRulesDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/InboundRulesDeleteSamples.java new file mode 100644 index 0000000000000..2d981f8b9d8af --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/InboundRulesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for InboundRules Delete. + */ +public final class InboundRulesDeleteSamples { + /* + * x-ms-original-file: 2026-07-01-preview/InboundRules_Delete.json + */ + /** + * Sample code: DeleteInboundRule. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void deleteInboundRule(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.inboundRules() + .delete("test-rg", "test-nat-gw", "sample-inbound-rule", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/InboundRulesGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/InboundRulesGetSamples.java new file mode 100644 index 0000000000000..c3e4c297db236 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/InboundRulesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for InboundRules Get. + */ +public final class InboundRulesGetSamples { + /* + * x-ms-original-file: 2026-07-01-preview/InboundRules_Get.json + */ + /** + * Sample code: GetInboundRule. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void getInboundRule(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.inboundRules() + .getWithResponse("test-rg", "test-nat-gw", "sample-inbound-rule", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/InboundRulesListByNatGatewaySamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/InboundRulesListByNatGatewaySamples.java new file mode 100644 index 0000000000000..c81e3f561a99e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/InboundRulesListByNatGatewaySamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for InboundRules ListByNatGateway. + */ +public final class InboundRulesListByNatGatewaySamples { + /* + * x-ms-original-file: 2026-07-01-preview/InboundRules_ListByNatGateway.json + */ + /** + * Sample code: ListInboundRulesByNatGateway. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listInboundRulesByNatGateway(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.inboundRules().listByNatGateway("test-rg", "test-nat-gw", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancersCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancersCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..3c79a428bba1d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancersCreateOrUpdateSamples.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.resourcemanager.azurestackhci.vm.models.BackendAddressPool; +import com.azure.resourcemanager.azurestackhci.vm.models.BackendAddressPoolProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.vm.models.FrontendIPConfiguration; +import com.azure.resourcemanager.azurestackhci.vm.models.FrontendIPConfigurationProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.IPConfigurationArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddress; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressAdminState; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressPoolReference; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerFrontendIPConfigurationReference; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerProbeProtocol; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerProbeReference; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRule; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRuleProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRuleSessionPersistenceType; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRuleTransportProtocol; +import com.azure.resourcemanager.azurestackhci.vm.models.Probe; +import com.azure.resourcemanager.azurestackhci.vm.models.ProbeProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkArmReference; +import java.util.Arrays; + +/** + * Samples for LoadBalancers CreateOrUpdate. + */ +public final class LoadBalancersCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-01-preview/LoadBalancers_CreateOrUpdate.json + */ + /** + * Sample code: PutLoadBalancer. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void putLoadBalancer(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.loadBalancers() + .define("test-lb") + .withRegion("West US2") + .withExistingResourceGroup("test-rg") + .withProperties(new LoadBalancerProperties() + .withFrontendIPConfigurations(Arrays.asList(new FrontendIPConfiguration().withName("web-frontend") + .withProperties(new FrontendIPConfigurationProperties() + .withPublicIPAddress(new PublicIPAddressArmReference().withResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/azure-local-rg/providers/Microsoft.AzureStackHCI/publicIPs/webPublicIP"))))) + .withBackendAddressPools(Arrays.asList(new BackendAddressPool().withName("web-backend") + .withProperties(new BackendAddressPoolProperties().withLoadBalancerBackendAddresses(Arrays.asList( + new LoadBalancerBackendAddress().withName("web-server-1") + .withProperties(new LoadBalancerBackendAddressProperties() + .withAdminState(LoadBalancerBackendAddressAdminState.UP) + .withNetworkInterfaceIPConfiguration(new IPConfigurationArmReference().withResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/azure-local-rg/providers/Microsoft.AzureStackHCI/networkInterfaces/web-server-1-nic/ipConfigurations/primary"))), + new LoadBalancerBackendAddress().withName("web-server-2") + .withProperties(new LoadBalancerBackendAddressProperties() + .withAdminState(LoadBalancerBackendAddressAdminState.UP) + .withNetworkInterfaceIPConfiguration(new IPConfigurationArmReference().withResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/azure-local-rg/providers/Microsoft.AzureStackHCI/networkInterfaces/web-server-2-nic/ipConfigurations/primary"))))) + .withVirtualNetwork(new VirtualNetworkArmReference().withResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/azure-local-rg/providers/Microsoft.AzureStackHCI/virtualNetworks/webVNet"))))) + .withLoadBalancingRules(Arrays.asList( + new LoadBalancerRule().withName("http-rule") + .withProperties(new LoadBalancerRuleProperties() + .withFrontendIPConfiguration( + new LoadBalancerFrontendIPConfigurationReference().withName("web-frontend")) + .withBackendAddressPool( + new LoadBalancerBackendAddressPoolReference().withName("web-backend")) + .withFrontendPort(80) + .withBackendPort(80) + .withProtocol(LoadBalancerRuleTransportProtocol.TCP) + .withProbe(new LoadBalancerProbeReference().withName("http-probe")) + .withLoadDistribution(LoadBalancerRuleSessionPersistenceType.DEFAULT) + .withIdleTimeoutInMinutes(4)), + new LoadBalancerRule().withName("https-rule") + .withProperties(new LoadBalancerRuleProperties() + .withFrontendIPConfiguration( + new LoadBalancerFrontendIPConfigurationReference().withName("web-frontend")) + .withBackendAddressPool( + new LoadBalancerBackendAddressPoolReference().withName("web-backend")) + .withFrontendPort(443) + .withBackendPort(443) + .withProtocol(LoadBalancerRuleTransportProtocol.TCP) + .withLoadDistribution(LoadBalancerRuleSessionPersistenceType.DEFAULT) + .withIdleTimeoutInMinutes(4)))) + .withProbes(Arrays.asList(new Probe().withName("http-probe") + .withProperties(new ProbeProperties().withProtocol(LoadBalancerProbeProtocol.HTTP) + .withPort(80) + .withRequestPath("/health") + .withIntervalInSeconds(15) + .withNumberOfProbes(2))))) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .create(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancersDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancersDeleteSamples.java new file mode 100644 index 0000000000000..cef0244b1e268 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancersDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for LoadBalancers Delete. + */ +public final class LoadBalancersDeleteSamples { + /* + * x-ms-original-file: 2026-07-01-preview/LoadBalancers_Delete.json + */ + /** + * Sample code: DeleteLoadBalancers. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void deleteLoadBalancers(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.loadBalancers().delete("test-rg", "test-lb", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancersGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancersGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..b17d9b9d318ac --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancersGetByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for LoadBalancers GetByResourceGroup. + */ +public final class LoadBalancersGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/LoadBalancers_Get.json + */ + /** + * Sample code: GetLoadBalancers. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void getLoadBalancers(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.loadBalancers().getByResourceGroupWithResponse("test-rg", "test-lb", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancersListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancersListByResourceGroupSamples.java new file mode 100644 index 0000000000000..d6e3b4f0446ca --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancersListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for LoadBalancers ListByResourceGroup. + */ +public final class LoadBalancersListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/LoadBalancers_ListByResourceGroup.json + */ + /** + * Sample code: ListLoadBalancerByResourceGroup. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listLoadBalancerByResourceGroup(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.loadBalancers().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancersListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancersListSamples.java new file mode 100644 index 0000000000000..42f7d2902914e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancersListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for LoadBalancers List. + */ +public final class LoadBalancersListSamples { + /* + * x-ms-original-file: 2026-07-01-preview/LoadBalancers_ListAll.json + */ + /** + * Sample code: ListLoadBalancerBySubscription. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listLoadBalancerBySubscription(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.loadBalancers().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancersUpdateTagsSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancersUpdateTagsSamples.java new file mode 100644 index 0000000000000..8a6218c3ba8b9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancersUpdateTagsSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancer; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for LoadBalancers UpdateTags. + */ +public final class LoadBalancersUpdateTagsSamples { + /* + * x-ms-original-file: 2026-07-01-preview/LoadBalancers_UpdateTags.json + */ + /** + * Sample code: Update LoadBalancers tags. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + updateLoadBalancersTags(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + LoadBalancer resource = manager.loadBalancers() + .getByResourceGroupWithResponse("testrg", "test-lb", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).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/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksCreateOrUpdateSamples.java index a391eb3c8aa7d..267f71597ad4a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class LogicalNetworksCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/LogicalNetworks_CreateOrUpdate.json + * x-ms-original-file: 2026-07-01-preview/LogicalNetworks_CreateOrUpdate.json */ /** * Sample code: PutLogicalNetwork. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksDeleteSamples.java index 18972127c52ed..d6d664da69d11 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class LogicalNetworksDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/LogicalNetworks_Delete.json + * x-ms-original-file: 2026-07-01-preview/LogicalNetworks_Delete.json */ /** * Sample code: DeleteLogicalNetwork. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksGetByResourceGroupSamples.java index f5f0f569aacdc..3052905c06041 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksGetByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class LogicalNetworksGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/LogicalNetworks_Get.json + * x-ms-original-file: 2026-07-01-preview/LogicalNetworks_Get.json */ /** * Sample code: GetLogicalNetwork. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksListByResourceGroupSamples.java index a6322fa039a5b..90c96f305f6af 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksListByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class LogicalNetworksListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/LogicalNetworks_ListByResourceGroup.json + * x-ms-original-file: 2026-07-01-preview/LogicalNetworks_ListByResourceGroup.json */ /** * Sample code: ListLogicalNetworkByResourceGroup. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksListSamples.java index 341ffb4c244e1..a278395e314d3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksListSamples.java @@ -9,7 +9,7 @@ */ public final class LogicalNetworksListSamples { /* - * x-ms-original-file: 2025-06-01-preview/LogicalNetworks_ListAll.json + * x-ms-original-file: 2026-07-01-preview/LogicalNetworks_ListAll.json */ /** * Sample code: ListLogicalNetworkBySubscription. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksUpdateSamples.java index c19f891256b34..53bb888e0665b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class LogicalNetworksUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/LogicalNetworks_Update.json + * x-ms-original-file: 2026-07-01-preview/LogicalNetworks_Update.json */ /** * Sample code: UpdateLogicalNetwork. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesCreateOrUpdateSamples.java index 8ebb90b15efdd..28d7c249d4a29 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesCreateOrUpdateSamples.java @@ -18,7 +18,7 @@ */ public final class MarketplaceGalleryImagesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/MarketplaceGalleryImages_CreateOrUpdate.json + * x-ms-original-file: 2026-07-01-preview/MarketplaceGalleryImages_CreateOrUpdate.json */ /** * Sample code: PutMarketplaceGalleryImage. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesDeleteSamples.java index 9d6741892d1b1..ac3fedf4b3488 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class MarketplaceGalleryImagesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/MarketplaceGalleryImages_Delete.json + * x-ms-original-file: 2026-07-01-preview/MarketplaceGalleryImages_Delete.json */ /** * Sample code: DeleteMarketplaceGalleryImage. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesGetByResourceGroupSamples.java index 959c1405e22d0..bd8d87c93d166 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesGetByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class MarketplaceGalleryImagesGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/MarketplaceGalleryImages_Get.json + * x-ms-original-file: 2026-07-01-preview/MarketplaceGalleryImages_Get.json */ /** * Sample code: GetMarketplaceGalleryImage. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesListByResourceGroupSamples.java index 7fbc1384f6f58..ba38786e18f6b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesListByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class MarketplaceGalleryImagesListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/MarketplaceGalleryImages_ListByResourceGroup.json + * x-ms-original-file: 2026-07-01-preview/MarketplaceGalleryImages_ListByResourceGroup.json */ /** * Sample code: ListMarketplaceGalleryImageByResourceGroup. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesListSamples.java index 6795ce0e8a9e6..ca76d94cfc20d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesListSamples.java @@ -9,7 +9,7 @@ */ public final class MarketplaceGalleryImagesListSamples { /* - * x-ms-original-file: 2025-06-01-preview/MarketplaceGalleryImages_ListAll.json + * x-ms-original-file: 2026-07-01-preview/MarketplaceGalleryImages_ListAll.json */ /** * Sample code: ListMarketplaceGalleryImageBySubscription. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesUpdateSamples.java index 07ec5b7cda189..c99081b57bb71 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImagesUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class MarketplaceGalleryImagesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/MarketplaceGalleryImages_Update.json + * x-ms-original-file: 2026-07-01-preview/MarketplaceGalleryImages_Update.json */ /** * Sample code: UpdateMarketplaceGalleryImage. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewaysCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewaysCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..49a89aeffb11f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewaysCreateOrUpdateSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.vm.models.NatGatewayProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressArmReference; +import java.util.Arrays; + +/** + * Samples for NatGateways CreateOrUpdate. + */ +public final class NatGatewaysCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-01-preview/NatGateways_CreateOrUpdate.json + */ + /** + * Sample code: PutNatGateway. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void putNatGateway(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.natGateways() + .define("test-nat-gw") + .withRegion("West US2") + .withExistingResourceGroup("test-rg") + .withProperties(new NatGatewayProperties() + .withPublicIPAddresses(Arrays.asList(new PublicIPAddressArmReference().withResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/azure-local-rg/providers/Microsoft.AzureStackHCI/publicIPAddresses/outbound-pip")))) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .create(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewaysDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewaysDeleteSamples.java new file mode 100644 index 0000000000000..e9c64f79f145a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewaysDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for NatGateways Delete. + */ +public final class NatGatewaysDeleteSamples { + /* + * x-ms-original-file: 2026-07-01-preview/NatGateways_Delete.json + */ + /** + * Sample code: DeleteNatGateway. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void deleteNatGateway(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.natGateways().delete("test-rg", "test-nat-gw", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewaysGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewaysGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..9ba5adedc2afd --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewaysGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for NatGateways GetByResourceGroup. + */ +public final class NatGatewaysGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/NatGateways_Get.json + */ + /** + * Sample code: GetNatGateway. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void getNatGateway(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.natGateways() + .getByResourceGroupWithResponse("test-rg", "test-nat-gw", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewaysListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewaysListByResourceGroupSamples.java new file mode 100644 index 0000000000000..70a06dac17eea --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewaysListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for NatGateways ListByResourceGroup. + */ +public final class NatGatewaysListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/NatGateways_ListByResourceGroup.json + */ + /** + * Sample code: ListNatGatewayByResourceGroup. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listNatGatewayByResourceGroup(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.natGateways().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewaysListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewaysListSamples.java new file mode 100644 index 0000000000000..191dffdede6a5 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewaysListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for NatGateways List. + */ +public final class NatGatewaysListSamples { + /* + * x-ms-original-file: 2026-07-01-preview/NatGateways_ListAll.json + */ + /** + * Sample code: ListNatGatewayBySubscription. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listNatGatewayBySubscription(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.natGateways().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewaysUpdateTagsSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewaysUpdateTagsSamples.java new file mode 100644 index 0000000000000..fe3a736df4193 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewaysUpdateTagsSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.resourcemanager.azurestackhci.vm.models.NatGateway; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for NatGateways UpdateTags. + */ +public final class NatGatewaysUpdateTagsSamples { + /* + * x-ms-original-file: 2026-07-01-preview/NatGateways_UpdateTags.json + */ + /** + * Sample code: Update natGateway tags. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void updateNatGatewayTags(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + NatGateway resource = manager.natGateways() + .getByResourceGroupWithResponse("testrg", "testnatgw", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).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/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesCreateOrUpdateSamples.java index 3ffb45a7b2058..17ddff88863cb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesCreateOrUpdateSamples.java @@ -17,7 +17,7 @@ */ public final class NetworkInterfacesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkInterfaces__CreateOrUpdate_CreateFromLocal.json + * x-ms-original-file: 2026-07-01-preview/NetworkInterfaces__CreateOrUpdate_CreateFromLocal.json */ /** * Sample code: CreateNetworkInterfaceFromLocal. @@ -42,7 +42,7 @@ public final class NetworkInterfacesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/NetworkInterfaces_CreateOrUpdate.json + * x-ms-original-file: 2026-07-01-preview/NetworkInterfaces_CreateOrUpdate.json */ /** * Sample code: PutNetworkInterface. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesDeleteSamples.java index edeb7d00686c0..eb95a16edb98e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkInterfacesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkInterfaces_Delete.json + * x-ms-original-file: 2026-07-01-preview/NetworkInterfaces_Delete.json */ /** * Sample code: DeleteNetworkInterface. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesGetByResourceGroupSamples.java index 826a1dd9301d7..971ef0497b882 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesGetByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkInterfacesGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkInterfaces_Get.json + * x-ms-original-file: 2026-07-01-preview/NetworkInterfaces_Get.json */ /** * Sample code: GetNetworkInterface. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesListByResourceGroupSamples.java index 211c3b0243717..8fd0640749bb4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesListByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkInterfacesListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkInterfaces_ListByResourceGroup.json + * x-ms-original-file: 2026-07-01-preview/NetworkInterfaces_ListByResourceGroup.json */ /** * Sample code: ListNetworkInterfaceByResourceGroup. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesListSamples.java index f7ebb7ada5591..092c931813c66 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesListSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkInterfacesListSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkInterfaces_ListAll.json + * x-ms-original-file: 2026-07-01-preview/NetworkInterfaces_ListAll.json */ /** * Sample code: ListNetworkInterfaceBySubscription. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesUpdateSamples.java index c01318457435e..4e6b37c85fa89 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class NetworkInterfacesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkInterfaces_Update.json + * x-ms-original-file: 2026-07-01-preview/NetworkInterfaces_Update.json */ /** * Sample code: UpdateNetworkInterface. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsCreateOrUpdateSamples.java index e691aa84a7b05..1326dc2f8687e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkSecurityGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkSecurityGroups_CreateOrUpdate.json + * x-ms-original-file: 2026-07-01-preview/NetworkSecurityGroups_CreateOrUpdate.json */ /** * Sample code: CreateNetworkSecurityGroup. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsDeleteSamples.java index 3bb5749804478..3de3746f00606 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkSecurityGroupsDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkSecurityGroups_Delete.json + * x-ms-original-file: 2026-07-01-preview/NetworkSecurityGroups_Delete.json */ /** * Sample code: Delete network security group. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsGetByResourceGroupSamples.java index 315967cde2954..e7d15f63db0b4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsGetByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkSecurityGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkSecurityGroups_Get.json + * x-ms-original-file: 2026-07-01-preview/NetworkSecurityGroups_Get.json */ /** * Sample code: Get network security group. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsListByResourceGroupSamples.java index 02b64febc9447..227d8617c070b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsListByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkSecurityGroupsListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkSecurityGroups_ListByResourceGroup.json + * x-ms-original-file: 2026-07-01-preview/NetworkSecurityGroups_ListByResourceGroup.json */ /** * Sample code: List network security groups in resource group. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsListSamples.java index 0c220aaa74a3a..4e28e718e1bfe 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsListSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkSecurityGroupsListSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkSecurityGroups_ListAll.json + * x-ms-original-file: 2026-07-01-preview/NetworkSecurityGroups_ListAll.json */ /** * Sample code: List all network security groups. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsUpdateTagsSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsUpdateTagsSamples.java index dd5088fcac391..3e4b25c945bd5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsUpdateTagsSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupsUpdateTagsSamples.java @@ -13,7 +13,7 @@ */ public final class NetworkSecurityGroupsUpdateTagsSamples { /* - * x-ms-original-file: 2025-06-01-preview/NetworkSecurityGroups_UpdateTags.json + * x-ms-original-file: 2026-07-01-preview/NetworkSecurityGroups_UpdateTags.json */ /** * Sample code: Update network security group tags. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/OperationsListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/OperationsListSamples.java new file mode 100644 index 0000000000000..b5ec0392e3a99 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/OperationsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: 2026-07-01-preview/Operations_List.json + */ + /** + * Sample code: List the operations for the provider. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listTheOperationsForTheProvider(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..adb73e401f016 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesCreateOrUpdateSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressType; + +/** + * Samples for PublicIPAddresses CreateOrUpdate. + */ +public final class PublicIPAddressesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-01-preview/PublicIPAddresses_CreateOrUpdate.json + */ + /** + * Sample code: CreatePublicIPAddress. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + createPublicIPAddress(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.publicIPAddresses() + .define("public-ip1") + .withRegion("eastus") + .withExistingResourceGroup("testrg") + .withProperties(new PublicIPAddressProperties().withPublicIPAddressVersion(PublicIPAddressType.IPV4) + .withIpAllocationScope( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/logicalNetworks/lnet1") + .withIpAddress("10.100.100.4")) + .create(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesDeleteSamples.java new file mode 100644 index 0000000000000..d1212936a8ff2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for PublicIPAddresses Delete. + */ +public final class PublicIPAddressesDeleteSamples { + /* + * x-ms-original-file: 2026-07-01-preview/PublicIPAddresses_Delete.json + */ + /** + * Sample code: Delete public IP address. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + deletePublicIPAddress(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.publicIPAddresses().delete("test-rg", "test-ip", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..b9bfd0cfe81cd --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for PublicIPAddresses GetByResourceGroup. + */ +public final class PublicIPAddressesGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/PublicIPAddresses_Get.json + */ + /** + * Sample code: Get public IP address. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void getPublicIPAddress(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.publicIPAddresses() + .getByResourceGroupWithResponse("test-rg", "testip", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesListByResourceGroupSamples.java new file mode 100644 index 0000000000000..573b157afecb6 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for PublicIPAddresses ListByResourceGroup. + */ +public final class PublicIPAddressesListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/PublicIPAddresses_ListByResourceGroup.json + */ + /** + * Sample code: List public IPs in resource group. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listPublicIPsInResourceGroup(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.publicIPAddresses().listByResourceGroup("testrg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesListSamples.java new file mode 100644 index 0000000000000..32cabf8259a52 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for PublicIPAddresses List. + */ +public final class PublicIPAddressesListSamples { + /* + * x-ms-original-file: 2026-07-01-preview/PublicIPAddresses_ListALL.json + */ + /** + * Sample code: List all public IP addresses. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listAllPublicIPAddresses(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.publicIPAddresses().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesUpdateTagsSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesUpdateTagsSamples.java new file mode 100644 index 0000000000000..e9fc965d77766 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesUpdateTagsSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddress; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for PublicIPAddresses UpdateTags. + */ +public final class PublicIPAddressesUpdateTagsSamples { + /* + * x-ms-original-file: 2026-07-01-preview/PublicIPAddresses_UpdateTags.json + */ + /** + * Sample code: Update public IP addresses tags. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + updatePublicIPAddressesTags(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + PublicIPAddress resource = manager.publicIPAddresses() + .getByResourceGroupWithResponse("testrg", "publicip", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).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/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesCreateOrUpdateSamples.java index 72a66b0702edc..dfa3330257b59 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesCreateOrUpdateSamples.java @@ -17,7 +17,7 @@ */ public final class SecurityRulesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/SecurityRules_CreateOrUpdate.json + * x-ms-original-file: 2026-07-01-preview/SecurityRules_CreateOrUpdate.json */ /** * Sample code: SecurityRulesCreateOrUpdate. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesDeleteSamples.java index 4fa984a49a1eb..e134be5397131 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class SecurityRulesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/SecurityRules_Delete.json + * x-ms-original-file: 2026-07-01-preview/SecurityRules_Delete.json */ /** * Sample code: SecurityRulesDelete. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesGetSamples.java index bfcfbf77a8709..389789656d0fd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesGetSamples.java @@ -9,7 +9,7 @@ */ public final class SecurityRulesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/SecurityRules_Get.json + * x-ms-original-file: 2026-07-01-preview/SecurityRules_Get.json */ /** * Sample code: Get network security rule in network security group. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesListByNetworkSecurityGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesListByNetworkSecurityGroupSamples.java index 0143ee947a053..5b330125bcffc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesListByNetworkSecurityGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesListByNetworkSecurityGroupSamples.java @@ -9,7 +9,7 @@ */ public final class SecurityRulesListByNetworkSecurityGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/SecurityRules_ListByNetworkSecurityGroup.json + * x-ms-original-file: 2026-07-01-preview/SecurityRules_ListByNetworkSecurityGroup.json */ /** * Sample code: List network security rules in network security group. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..ba697d5a55789 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotsCreateOrUpdateSamples.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.resourcemanager.azurestackhci.vm.models.CreationData; +import com.azure.resourcemanager.azurestackhci.vm.models.DiskCreateOption; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.vm.models.SnapshotProperties; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Snapshots CreateOrUpdate. + */ +public final class SnapshotsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-01-preview/Snapshots_CreateOrUpdate.json + */ + /** + * Sample code: Create or update a snapshot. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + createOrUpdateASnapshot(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.snapshots() + .define("test-snapshot") + .withRegion("West US2") + .withExistingResourceGroup("test-rg") + .withTags(mapOf("environment", "test")) + .withProperties(new SnapshotProperties().withCreationData(new CreationData() + .withCreateOption(DiskCreateOption.COPY) + .withSourceResourceId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/virtualHardDisks/source-vhd"))) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .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/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotsDeleteSamples.java new file mode 100644 index 0000000000000..03404149156df --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for Snapshots Delete. + */ +public final class SnapshotsDeleteSamples { + /* + * x-ms-original-file: 2026-07-01-preview/Snapshots_Delete.json + */ + /** + * Sample code: Delete a snapshot. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void deleteASnapshot(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.snapshots().delete("test-rg", "test-snapshot", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotsGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotsGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..4ee380be5412c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotsGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for Snapshots GetByResourceGroup. + */ +public final class SnapshotsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/Snapshots_Get.json + */ + /** + * Sample code: Get a snapshot. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void getASnapshot(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.snapshots() + .getByResourceGroupWithResponse("test-rg", "test-snapshot", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotsListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotsListByResourceGroupSamples.java new file mode 100644 index 0000000000000..8536f0968f8b3 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotsListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for Snapshots ListByResourceGroup. + */ +public final class SnapshotsListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/Snapshots_ListByResourceGroup.json + */ + /** + * Sample code: List snapshots by resource group. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listSnapshotsByResourceGroup(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.snapshots().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotsListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotsListSamples.java new file mode 100644 index 0000000000000..9c377d28dd084 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for Snapshots List. + */ +public final class SnapshotsListSamples { + /* + * x-ms-original-file: 2026-07-01-preview/Snapshots_ListAll.json + */ + /** + * Sample code: List all snapshots in a subscription. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listAllSnapshotsInASubscription(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.snapshots().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotsUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotsUpdateSamples.java new file mode 100644 index 0000000000000..7cd6eba0acf30 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotsUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.resourcemanager.azurestackhci.vm.models.Snapshot; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Snapshots Update. + */ +public final class SnapshotsUpdateSamples { + /* + * x-ms-original-file: 2026-07-01-preview/Snapshots_Update.json + */ + /** + * Sample code: Update a snapshot. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void updateASnapshot(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + Snapshot resource = manager.snapshots() + .getByResourceGroupWithResponse("test-rg", "test-snapshot", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("environment", "production", "tier", "standard")).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/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersCreateOrUpdateSamples.java index 613b0b95f73e9..39f98c5f692af 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class StorageContainersCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/StorageContainers_CreateOrUpdate.json + * x-ms-original-file: 2026-07-01-preview/StorageContainers_CreateOrUpdate.json */ /** * Sample code: PutStorageContainer. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersDeleteSamples.java index 4ee0059d1e4d3..6e325420a1409 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class StorageContainersDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/StorageContainers_Delete.json + * x-ms-original-file: 2026-07-01-preview/StorageContainers_Delete.json */ /** * Sample code: DeleteStorageContainer. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersGetByResourceGroupSamples.java index de84b5768a6ca..c907e168e1d60 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersGetByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class StorageContainersGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/StorageContainers_Get.json + * x-ms-original-file: 2026-07-01-preview/StorageContainers_Get.json */ /** * Sample code: GetStorageContainer. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersListByResourceGroupSamples.java index 73bbf80a41696..d5fad1d613849 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersListByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class StorageContainersListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/StorageContainers_ListByResourceGroup.json + * x-ms-original-file: 2026-07-01-preview/StorageContainers_ListByResourceGroup.json */ /** * Sample code: ListStorageContainerByResourceGroup. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersListSamples.java index 9740795d59d57..691094b60a5de 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersListSamples.java @@ -9,7 +9,7 @@ */ public final class StorageContainersListSamples { /* - * x-ms-original-file: 2025-06-01-preview/StorageContainers_ListAll.json + * x-ms-original-file: 2026-07-01-preview/StorageContainers_ListAll.json */ /** * Sample code: ListStorageContainerBySubscription. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersUpdateSamples.java index 953022ec937f6..1b365f924affd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainersUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class StorageContainersUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/StorageContainers_Update.json + * x-ms-original-file: 2026-07-01-preview/StorageContainers_Update.json */ /** * Sample code: UpdateStorageContainer. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksCreateOrUpdateSamples.java index a187f8300e098..41006b76a7bb3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class VirtualHardDisksCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualHardDisks__CreateOrUpdate_CreateFromLocal.json + * x-ms-original-file: 2026-07-01-preview/VirtualHardDisks__CreateOrUpdate_CreateFromLocal.json */ /** * Sample code: CreateVirtualHardDiskFromLocal. @@ -23,12 +23,12 @@ public final class VirtualHardDisksCreateOrUpdateSamples { public static void createVirtualHardDiskFromLocal(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { manager.virtualHardDisks() - .define("test-vhd") + .define("rehome-datadisk-1") .withRegion("West US2") .withExistingResourceGroup("test-rg") .withProperties(new VirtualHardDiskProperties().withCreateFromLocal(true) - .withContainerId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container")) + .withLocalVhdPath( + "C:\\ClusterStorage\\UserStorage_2\\e35803d0bd82d61\\rehome555-dd1-a95612cb-f1fa-4daa-a4fd-272844fa512c-dogfoodarc.vhdx")) .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) @@ -36,7 +36,7 @@ public final class VirtualHardDisksCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/VirtualHardDisks_CreateOrUpdate.json + * x-ms-original-file: 2026-07-01-preview/VirtualHardDisks_CreateOrUpdate.json */ /** * Sample code: PutVirtualHardDisk. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksDeleteSamples.java index 126d01f93bdb4..b4d027c6dc70c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualHardDisksDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualHardDisks_Delete.json + * x-ms-original-file: 2026-07-01-preview/VirtualHardDisks_Delete.json */ /** * Sample code: DeleteVirtualHardDisk. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksGetByResourceGroupSamples.java index 2f56369a7c986..0eb031efa88ec 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksGetByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualHardDisksGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualHardDisks_Get.json + * x-ms-original-file: 2026-07-01-preview/VirtualHardDisks_Get.json */ /** * Sample code: GetVirtualHardDisk. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksListByResourceGroupSamples.java index 0895cdf82a7ed..0f2f6f494372d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksListByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualHardDisksListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualHardDisks_ListByResourceGroup.json + * x-ms-original-file: 2026-07-01-preview/VirtualHardDisks_ListByResourceGroup.json */ /** * Sample code: ListVirtualHardDiskByResourceGroup. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksListSamples.java index 012576b791530..cbc0559f27649 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksListSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualHardDisksListSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualHardDisks_ListAll.json + * x-ms-original-file: 2026-07-01-preview/VirtualHardDisks_ListAll.json */ /** * Sample code: ListVirtualHardDiskBySubscription. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksUpdateSamples.java index 8529b1fc6392d..6acf6b006d5e8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class VirtualHardDisksUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualHardDisks_Update.json + * x-ms-original-file: 2026-07-01-preview/VirtualHardDisks_Update.json */ /** * Sample code: UpdateVirtualHardDisk. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksUploadSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksUploadSamples.java index 52068dd23e2fc..78a13ee9ed9a3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksUploadSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksUploadSamples.java @@ -11,7 +11,7 @@ */ public final class VirtualHardDisksUploadSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualHardDisks_Upload.json + * x-ms-original-file: 2026-07-01-preview/VirtualHardDisks_Upload.json */ /** * Sample code: UploadVirtualHardDisk. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesCreateOrUpdateSamples.java index 8cafd99b9464a..0b574f82a2e33 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesCreateOrUpdateSamples.java @@ -30,7 +30,7 @@ public final class VirtualMachineInstancesCreateOrUpdateSamples { /* * x-ms-original-file: - * 2025-06-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Gallery_Image.json + * 2026-07-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Gallery_Image.json */ /** * Sample code: PutVirtualMachineInstanceWithGalleryImage. @@ -68,7 +68,7 @@ public static void putVirtualMachineInstanceWithGalleryImage( /* * x-ms-original-file: - * 2025-06-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Os_Disk.json + * 2026-07-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Os_Disk.json */ /** * Sample code: PutVirtualMachineInstanceWithOsDisk. @@ -101,7 +101,7 @@ public static void putVirtualMachineInstanceWithGalleryImage( } /* - * x-ms-original-file: 2025-06-01-preview/ + * x-ms-original-file: 2026-07-01-preview/ * VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Marketplace_Gallery_Image.json */ /** @@ -140,7 +140,7 @@ public static void putVirtualMachineInstanceWithMarketplaceGalleryImage( /* * x-ms-original-file: - * 2025-06-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Vm_Config_Agent.json + * 2026-07-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Vm_Config_Agent.json */ /** * Sample code: PutVirtualMachineInstanceWithVMConfigAgent. @@ -180,7 +180,7 @@ public static void putVirtualMachineInstanceWithVMConfigAgent( /* * x-ms-original-file: - * 2025-06-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Gpu.json + * 2026-07-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Gpu.json */ /** * Sample code: PutVirtualMachineInstanceWithGpu. @@ -223,7 +223,7 @@ public static void putVirtualMachineInstanceWithVMConfigAgent( } /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances__CreateOrUpdate_CreateFromLocal.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances__CreateOrUpdate_CreateFromLocal.json */ /** * Sample code: CreateVirtualMachineInstanceFromLocal. @@ -242,7 +242,8 @@ public static void createVirtualMachineInstanceFromLocal( .withStorageProfile(new VirtualMachineInstancePropertiesStorageProfile() .withDataDisks(Arrays.asList(new VirtualHardDiskArmReference().withId( "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd")))) - .withCreateFromLocal(true)) + .withCreateFromLocal(true) + .withLocalVmName("DemoVM_restored")) .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") .withType(ExtendedLocationTypes.CUSTOM_LOCATION)), diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesDeleteSamples.java index dd29cacc5bc07..3714d77df9f27 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualMachineInstancesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances_Delete.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Delete.json */ /** * Sample code: DeleteVirtualMachine. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesGetSamples.java index 983e08da3df45..9cc63629e6583 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesGetSamples.java @@ -9,7 +9,23 @@ */ public final class VirtualMachineInstancesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances_Get.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Get_OperationFailed.json + */ + /** + * Sample code: GetVirtualMachineInstanceWithFailedOperation. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void getVirtualMachineInstanceWithFailedOperation( + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualMachineInstances() + .getWithResponse( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Get.json */ /** * Sample code: GetVirtualMachineInstance. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesListSamples.java index f87d4efc327d7..e47dcc8fc40f8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesListSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualMachineInstancesListSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances_List.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_List.json */ /** * Sample code: ListVirtualMachineInstances. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesPauseSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesPauseSamples.java index 4de52b6151d7e..a8adc87641c77 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesPauseSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesPauseSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualMachineInstancesPauseSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances_Pause.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Pause.json */ /** * Sample code: PauseVirtualMachine. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesPowerOffSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesPowerOffSamples.java new file mode 100644 index 0000000000000..6e62c7321f403 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesPowerOffSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.resourcemanager.azurestackhci.vm.models.PowerOffVirtualMachineOptions; + +/** + * Samples for VirtualMachineInstances PowerOff. + */ +public final class VirtualMachineInstancesPowerOffSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_PowerOff.json + */ + /** + * Sample code: PowerOffVirtualMachine. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + powerOffVirtualMachine(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualMachineInstances() + .powerOff( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", + new PowerOffVirtualMachineOptions().withSkipShutdown(false), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesRestartSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesRestartSamples.java index 952e6dacd8300..a7c0ee862812d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesRestartSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesRestartSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualMachineInstancesRestartSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances_Restart.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Restart.json */ /** * Sample code: RestartVirtualMachine. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesSaveSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesSaveSamples.java index 8ff134767918d..7440824720c11 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesSaveSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesSaveSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualMachineInstancesSaveSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances_Save.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Save.json */ /** * Sample code: SaveVirtualMachine. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesStartSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesStartSamples.java index 5aabaf0e5ccd2..950f3cbbef339 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesStartSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesStartSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualMachineInstancesStartSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances_Start.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Start.json */ /** * Sample code: StartVirtualMachine. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesStopSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesStopSamples.java index c66ee3bbb522a..a7c69e006b5f6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesStopSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesStopSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualMachineInstancesStopSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances_Stop.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Stop.json */ /** * Sample code: StopVirtualMachine. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesUpdateSamples.java index 9434efba03ae3..f19794471a6aa 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancesUpdateSamples.java @@ -4,8 +4,10 @@ package com.azure.resourcemanager.azurestackhci.vm.generated; +import com.azure.resourcemanager.azurestackhci.vm.models.HardwareProfileUpdate; import com.azure.resourcemanager.azurestackhci.vm.models.StorageProfileUpdate; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceUpdateProperties; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceUpdateRequest; import java.util.Arrays; @@ -15,7 +17,30 @@ */ public final class VirtualMachineInstancesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/VirtualMachineInstances_Update.json + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Update_DynamicMemory.json + */ + /** + * Sample code: UpdateVirtualMachineDynamicMemory. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + updateVirtualMachineDynamicMemory(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualMachineInstances() + .update( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", + new VirtualMachineInstanceUpdateRequest().withProperties(new VirtualMachineInstanceUpdateProperties() + .withHardwareProfile(new HardwareProfileUpdate().withDynamicMemoryConfig( + new VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig() + .withMaximumMemoryMB(8192L) + .withMinimumMemoryMB(2048L) + .withTargetMemoryBuffer(20) + .withEnabled(true)))), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-01-preview/VirtualMachineInstances_Update.json */ /** * Sample code: UpdateVirtualMachine. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..a51d6e436a4c3 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetsCreateOrUpdateSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetProperties; + +/** + * Samples for VirtualNetworkSubnets CreateOrUpdate. + */ +public final class VirtualNetworkSubnetsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworkSubnets_CreateOrUpdate.json + */ + /** + * Sample code: PutVirtualNetworkSubnet. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + putVirtualNetworkSubnet(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualNetworkSubnets() + .define("subnet1") + .withExistingVirtualNetwork("test-rg", "test-vnet") + .withProperties(new VirtualNetworkSubnetProperties().withAddressPrefix("10.0.0.0/28")) + .create(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetsDeleteSamples.java new file mode 100644 index 0000000000000..3c20259bbb06b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for VirtualNetworkSubnets Delete. + */ +public final class VirtualNetworkSubnetsDeleteSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworkSubnets_Delete.json + */ + /** + * Sample code: DeleteVirtualNetworkSubnet. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + deleteVirtualNetworkSubnet(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualNetworkSubnets().delete("test-rg", "test-vnet", "subnet1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetsGetSamples.java new file mode 100644 index 0000000000000..aa1dee650b4d6 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for VirtualNetworkSubnets Get. + */ +public final class VirtualNetworkSubnetsGetSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworkSubnets_Get.json + */ + /** + * Sample code: GetVirtualNetworkSubnet. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + getVirtualNetworkSubnet(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualNetworkSubnets() + .getWithResponse("test-rg", "test-vnet", "subnet1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetsListByVirtualNetworkSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetsListByVirtualNetworkSamples.java new file mode 100644 index 0000000000000..1cd0834d52e40 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetsListByVirtualNetworkSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for VirtualNetworkSubnets ListByVirtualNetwork. + */ +public final class VirtualNetworkSubnetsListByVirtualNetworkSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworkSubnets_ListByVirtualNetwork.json + */ + /** + * Sample code: ListVirtualNetworkSubnetsByVirtualNetwork. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void listVirtualNetworkSubnetsByVirtualNetwork( + com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualNetworkSubnets().listByVirtualNetwork("test-rg", "test-vnet", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetsUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetsUpdateSamples.java new file mode 100644 index 0000000000000..42f72fd6c4c53 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetsUpdateSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.resourcemanager.azurestackhci.vm.models.NetworkSecurityGroupArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnet; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetUpdateProperties; + +/** + * Samples for VirtualNetworkSubnets Update. + */ +public final class VirtualNetworkSubnetsUpdateSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworkSubnets_Update.json + */ + /** + * Sample code: UpdateVirtualNetworkUpdates. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + updateVirtualNetworkUpdates(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + VirtualNetworkSubnet resource = manager.virtualNetworkSubnets() + .getWithResponse("test-rg", "test-vnet", "subnet1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new VirtualNetworkSubnetUpdateProperties() + .withNetworkSecurityGroup(new NetworkSecurityGroupArmReference().withId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkSecurityGroups/testnsg"))) + .apply(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworksCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworksCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..d70ff1b3b618d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworksCreateOrUpdateSamples.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkAddressSpace; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkDhcpOptions; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkProperties; +import java.util.Arrays; + +/** + * Samples for VirtualNetworks CreateOrUpdate. + */ +public final class VirtualNetworksCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworks_CreateOrUpdate.json + */ + /** + * Sample code: PutVirtualNetwork. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void putVirtualNetwork(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualNetworks() + .define("test-vnet") + .withRegion("West US2") + .withExistingResourceGroup("test-rg") + .withProperties(new VirtualNetworkProperties() + .withAddressSpace(new VirtualNetworkAddressSpace().withAddressPrefixes(Arrays.asList("10.0.0.0/24"))) + .withDhcpOptions(new VirtualNetworkDhcpOptions().withDnsServers(Arrays.asList()))) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .create(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworksDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworksDeleteSamples.java new file mode 100644 index 0000000000000..e7f9fabfc2c70 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworksDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for VirtualNetworks Delete. + */ +public final class VirtualNetworksDeleteSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworks_Delete.json + */ + /** + * Sample code: DeleteVirtualNetwork. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void deleteVirtualNetwork(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualNetworks().delete("test-rg", "test-vnet", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworksGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworksGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..1c4113064bd9b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworksGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for VirtualNetworks GetByResourceGroup. + */ +public final class VirtualNetworksGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworks_Get.json + */ + /** + * Sample code: GetVirtualNetwork. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void getVirtualNetwork(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualNetworks() + .getByResourceGroupWithResponse("test-rg", "test-vnet", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworksListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworksListByResourceGroupSamples.java new file mode 100644 index 0000000000000..48f91c72ef1b8 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworksListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for VirtualNetworks ListByResourceGroup. + */ +public final class VirtualNetworksListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworks_ListByResourceGroup.json + */ + /** + * Sample code: ListVirtualNetworkByResourceGroup. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listVirtualNetworkByResourceGroup(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualNetworks().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworksListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworksListSamples.java new file mode 100644 index 0000000000000..6cce53dadb08e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworksListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +/** + * Samples for VirtualNetworks List. + */ +public final class VirtualNetworksListSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworks_ListAll.json + */ + /** + * Sample code: ListVirtualNetworkBySubscription. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + listVirtualNetworkBySubscription(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + manager.virtualNetworks().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworksUpdateTagsSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworksUpdateTagsSamples.java new file mode 100644 index 0000000000000..d0bdaf8e4dacd --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/samples/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworksUpdateTagsSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetwork; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for VirtualNetworks UpdateTags. + */ +public final class VirtualNetworksUpdateTagsSamples { + /* + * x-ms-original-file: 2026-07-01-preview/VirtualNetworks_UpdateTags.json + */ + /** + * Sample code: Update virtual Network tags. + * + * @param manager Entry point to AzureStackHciVmManager. + */ + public static void + updateVirtualNetworkTags(com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager manager) { + VirtualNetwork resource = manager.virtualNetworks() + .getByResourceGroupWithResponse("testrg", "testvnet", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).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/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/AttestationStatusInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/AttestationStatusInnerTests.java index e5e7dc35c89a0..ca64e7b5e4845 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/AttestationStatusInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/AttestationStatusInnerTests.java @@ -11,7 +11,7 @@ public final class AttestationStatusInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AttestationStatusInner model = BinaryData.fromString( - "{\"properties\":{\"attestSecureBootEnabled\":\"Disabled\",\"attestationCertValidated\":\"Unknown\",\"bootIntegrityValidated\":\"Valid\",\"linuxKernelVersion\":\"opcjwvnhd\",\"healthStatus\":\"Unhealthy\",\"timestamp\":\"gx\",\"errorMessage\":\"rslpmutwuoeg\",\"provisioningState\":\"Failed\",\"attestHardwarePlatform\":\"SEVSNP\",\"attestDiskSecurityEncryptionType\":\"NonPersistedTPM\"},\"id\":\"yqsluic\",\"name\":\"dggkzzlvmbmpa\",\"type\":\"modfvuefywsbpfvm\"}") + "{\"properties\":{\"attestSecureBootEnabled\":\"Unknown\",\"attestationCertValidated\":\"Invalid\",\"bootIntegrityValidated\":\"Valid\",\"linuxKernelVersion\":\"saznqntoruds\",\"healthStatus\":\"Pending\",\"timestamp\":\"mkycgra\",\"errorMessage\":\"juetaebur\",\"provisioningState\":\"Canceled\",\"attestHardwarePlatform\":\"SEVSNP\",\"attestDiskSecurityEncryptionType\":\"NonPersistedTPM\"},\"id\":\"zlxwabmqoefkifr\",\"name\":\"tpuqujmq\",\"type\":\"gkfbtndoaong\"}") .toObject(AttestationStatusInner.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/AttestationStatusPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/AttestationStatusPropertiesTests.java index 13d57a50c8de9..543c3f7d1e787 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/AttestationStatusPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/AttestationStatusPropertiesTests.java @@ -11,7 +11,7 @@ public final class AttestationStatusPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AttestationStatusProperties model = BinaryData.fromString( - "{\"attestSecureBootEnabled\":\"Disabled\",\"attestationCertValidated\":\"Valid\",\"bootIntegrityValidated\":\"Invalid\",\"linuxKernelVersion\":\"ft\",\"healthStatus\":\"Healthy\",\"timestamp\":\"pwiyzvqtm\",\"errorMessage\":\"bexkpzksmondj\",\"provisioningState\":\"Succeeded\",\"attestHardwarePlatform\":\"Unknown\",\"attestDiskSecurityEncryptionType\":\"Unknown\"}") + "{\"attestSecureBootEnabled\":\"Disabled\",\"attestationCertValidated\":\"Invalid\",\"bootIntegrityValidated\":\"Valid\",\"linuxKernelVersion\":\"tcje\",\"healthStatus\":\"Unknown\",\"timestamp\":\"waezkojvd\",\"errorMessage\":\"zfoqouicybxar\",\"provisioningState\":\"Deleting\",\"attestHardwarePlatform\":\"SEVSNP\",\"attestDiskSecurityEncryptionType\":\"Unknown\"}") .toObject(AttestationStatusProperties.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/AttestationStatusesGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/AttestationStatusesGetWithResponseMockTests.java index 5bede387c2227..d07f5adfb7d37 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/AttestationStatusesGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/AttestationStatusesGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class AttestationStatusesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"attestSecureBootEnabled\":\"Enabled\",\"attestationCertValidated\":\"Invalid\",\"bootIntegrityValidated\":\"Valid\",\"linuxKernelVersion\":\"fgcviz\",\"healthStatus\":\"Pending\",\"timestamp\":\"l\",\"errorMessage\":\"lyoupfgfbkju\",\"provisioningState\":\"Canceled\",\"attestHardwarePlatform\":\"SEVSNP\",\"attestDiskSecurityEncryptionType\":\"Unknown\"},\"id\":\"in\",\"name\":\"g\",\"type\":\"wzf\"}"; + = "{\"properties\":{\"attestSecureBootEnabled\":\"Unknown\",\"attestationCertValidated\":\"Unknown\",\"bootIntegrityValidated\":\"Invalid\",\"linuxKernelVersion\":\"opionszon\",\"healthStatus\":\"Unknown\",\"timestamp\":\"ajinnixjawrtmjfj\",\"errorMessage\":\"ccxlzhcoxovnek\",\"provisioningState\":\"Succeeded\",\"attestHardwarePlatform\":\"SEVSNP\",\"attestDiskSecurityEncryptionType\":\"Unknown\"},\"id\":\"rd\",\"name\":\"jxtxrdc\",\"type\":\"tjvidt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -29,9 +29,8 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - AttestationStatus response = manager.attestationStatuses() - .getWithResponse("ksbpimlqoljx", com.azure.core.util.Context.NONE) - .getValue(); + AttestationStatus response + = manager.attestationStatuses().getWithResponse("vzuyturmlmu", com.azure.core.util.Context.NONE).getValue(); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/BackendAddressPoolPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/BackendAddressPoolPropertiesTests.java new file mode 100644 index 0000000000000..9fd4b20299457 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/BackendAddressPoolPropertiesTests.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.BackendAddressPoolProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.IPConfigurationArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddress; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressAdminState; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworkArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkArmReference; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class BackendAddressPoolPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackendAddressPoolProperties model = BinaryData.fromString( + "{\"loadBalancerBackendAddresses\":[{\"name\":\"hjoxo\",\"properties\":{\"adminState\":\"Up\",\"ipAddress\":\"ksbpimlqoljx\",\"subnet\":{\"resourceId\":\"xxlxsffgcvizq\"},\"virtualNetwork\":{\"resourceId\":\"l\"},\"logicalNetwork\":{\"id\":\"youpfgfbkj\"},\"networkInterfaceIPConfiguration\":{\"resourceId\":\"yhgk\"}}},{\"name\":\"minsgowzf\",\"properties\":{\"adminState\":\"Down\",\"ipAddress\":\"t\",\"subnet\":{\"resourceId\":\"ahbqactxtgzuk\"},\"virtualNetwork\":{\"resourceId\":\"mmqtgqqqxhr\"},\"logicalNetwork\":{\"id\":\"xcpjuisavokqdzf\"},\"networkInterfaceIPConfiguration\":{\"resourceId\":\"ivjlfrqttbajlka\"}}},{\"name\":\"nwxyiop\",\"properties\":{\"adminState\":\"Up\",\"ipAddress\":\"qfkuvscxkdmli\",\"subnet\":{\"resourceId\":\"ibrxkp\"},\"virtualNetwork\":{\"resourceId\":\"azur\"},\"logicalNetwork\":{\"id\":\"bgo\"},\"networkInterfaceIPConfiguration\":{\"resourceId\":\"te\"}}}],\"virtualNetwork\":{\"resourceId\":\"fhjxakvvjgs\"},\"logicalNetwork\":{\"id\":\"dilmyww\"}}") + .toObject(BackendAddressPoolProperties.class); + Assertions.assertEquals("hjoxo", model.loadBalancerBackendAddresses().get(0).name()); + Assertions.assertEquals(LoadBalancerBackendAddressAdminState.UP, + model.loadBalancerBackendAddresses().get(0).properties().adminState()); + Assertions.assertEquals("yhgk", + model.loadBalancerBackendAddresses().get(0).properties().networkInterfaceIPConfiguration().resourceId()); + Assertions.assertEquals("fhjxakvvjgs", model.virtualNetwork().resourceId()); + Assertions.assertEquals("dilmyww", model.logicalNetwork().id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackendAddressPoolProperties model = new BackendAddressPoolProperties() + .withLoadBalancerBackendAddresses(Arrays.asList( + new LoadBalancerBackendAddress().withName("hjoxo") + .withProperties(new LoadBalancerBackendAddressProperties() + .withAdminState(LoadBalancerBackendAddressAdminState.UP) + .withNetworkInterfaceIPConfiguration(new IPConfigurationArmReference().withResourceId("yhgk"))), + new LoadBalancerBackendAddress().withName("minsgowzf") + .withProperties(new LoadBalancerBackendAddressProperties() + .withAdminState(LoadBalancerBackendAddressAdminState.DOWN) + .withNetworkInterfaceIPConfiguration( + new IPConfigurationArmReference().withResourceId("ivjlfrqttbajlka"))), + new LoadBalancerBackendAddress().withName("nwxyiop") + .withProperties(new LoadBalancerBackendAddressProperties() + .withAdminState(LoadBalancerBackendAddressAdminState.UP) + .withNetworkInterfaceIPConfiguration(new IPConfigurationArmReference().withResourceId("te"))))) + .withVirtualNetwork(new VirtualNetworkArmReference().withResourceId("fhjxakvvjgs")) + .withLogicalNetwork(new LogicalNetworkArmReference().withId("dilmyww")); + model = BinaryData.fromObject(model).toObject(BackendAddressPoolProperties.class); + Assertions.assertEquals("hjoxo", model.loadBalancerBackendAddresses().get(0).name()); + Assertions.assertEquals(LoadBalancerBackendAddressAdminState.UP, + model.loadBalancerBackendAddresses().get(0).properties().adminState()); + Assertions.assertEquals("yhgk", + model.loadBalancerBackendAddresses().get(0).properties().networkInterfaceIPConfiguration().resourceId()); + Assertions.assertEquals("fhjxakvvjgs", model.virtualNetwork().resourceId()); + Assertions.assertEquals("dilmyww", model.logicalNetwork().id()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/BackendAddressPoolTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/BackendAddressPoolTests.java new file mode 100644 index 0000000000000..72a80f0a3e988 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/BackendAddressPoolTests.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.BackendAddressPool; +import com.azure.resourcemanager.azurestackhci.vm.models.BackendAddressPoolProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.IPConfigurationArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddress; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressAdminState; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.LogicalNetworkArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkArmReference; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class BackendAddressPoolTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackendAddressPool model = BinaryData.fromString( + "{\"name\":\"cje\",\"properties\":{\"loadBalancerBackendAddresses\":[{\"name\":\"zshq\",\"properties\":{\"adminState\":\"Up\",\"ipAddress\":\"pevf\",\"subnet\":{\"resourceId\":\"lrri\"},\"virtualNetwork\":{\"resourceId\":\"wdxsm\"},\"logicalNetwork\":{\"id\":\"wrwfscjfnyns\"},\"networkInterfaceIPConfiguration\":{\"resourceId\":\"jizdvoqyt\"}}}],\"virtualNetwork\":{\"resourceId\":\"owbb\"},\"logicalNetwork\":{\"id\":\"avu\"}}}") + .toObject(BackendAddressPool.class); + Assertions.assertEquals("cje", model.name()); + Assertions.assertEquals("zshq", model.properties().loadBalancerBackendAddresses().get(0).name()); + Assertions.assertEquals(LoadBalancerBackendAddressAdminState.UP, + model.properties().loadBalancerBackendAddresses().get(0).properties().adminState()); + Assertions.assertEquals("jizdvoqyt", + model.properties() + .loadBalancerBackendAddresses() + .get(0) + .properties() + .networkInterfaceIPConfiguration() + .resourceId()); + Assertions.assertEquals("owbb", model.properties().virtualNetwork().resourceId()); + Assertions.assertEquals("avu", model.properties().logicalNetwork().id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackendAddressPool model = new BackendAddressPool().withName("cje") + .withProperties(new BackendAddressPoolProperties() + .withLoadBalancerBackendAddresses(Arrays.asList(new LoadBalancerBackendAddress().withName("zshq") + .withProperties(new LoadBalancerBackendAddressProperties() + .withAdminState(LoadBalancerBackendAddressAdminState.UP) + .withNetworkInterfaceIPConfiguration( + new IPConfigurationArmReference().withResourceId("jizdvoqyt"))))) + .withVirtualNetwork(new VirtualNetworkArmReference().withResourceId("owbb")) + .withLogicalNetwork(new LogicalNetworkArmReference().withId("avu"))); + model = BinaryData.fromObject(model).toObject(BackendAddressPool.class); + Assertions.assertEquals("cje", model.name()); + Assertions.assertEquals("zshq", model.properties().loadBalancerBackendAddresses().get(0).name()); + Assertions.assertEquals(LoadBalancerBackendAddressAdminState.UP, + model.properties().loadBalancerBackendAddresses().get(0).properties().adminState()); + Assertions.assertEquals("jizdvoqyt", + model.properties() + .loadBalancerBackendAddresses() + .get(0) + .properties() + .networkInterfaceIPConfiguration() + .resourceId()); + Assertions.assertEquals("owbb", model.properties().virtualNetwork().resourceId()); + Assertions.assertEquals("avu", model.properties().logicalNetwork().id()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/CreationDataTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/CreationDataTests.java new file mode 100644 index 0000000000000..cc9fadae5d92d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/CreationDataTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.CreationData; +import com.azure.resourcemanager.azurestackhci.vm.models.DiskCreateOption; +import org.junit.jupiter.api.Assertions; + +public final class CreationDataTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CreationData model = BinaryData + .fromString("{\"createOption\":\"Copy\",\"sourceResourceId\":\"vpgylgqgitxmed\",\"sourceUniqueId\":\"c\"}") + .toObject(CreationData.class); + Assertions.assertEquals(DiskCreateOption.COPY, model.createOption()); + Assertions.assertEquals("vpgylgqgitxmed", model.sourceResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CreationData model + = new CreationData().withCreateOption(DiskCreateOption.COPY).withSourceResourceId("vpgylgqgitxmed"); + model = BinaryData.fromObject(model).toObject(CreationData.class); + Assertions.assertEquals(DiskCreateOption.COPY, model.createOption()); + Assertions.assertEquals("vpgylgqgitxmed", model.sourceResourceId()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ExtendedLocationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ExtendedLocationTests.java index 646fb9ef30d78..2aa94264dd2db 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ExtendedLocationTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ExtendedLocationTests.java @@ -12,18 +12,18 @@ public final class ExtendedLocationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExtendedLocation model = BinaryData.fromString("{\"name\":\"ygjofjdd\",\"type\":\"CustomLocation\"}") + ExtendedLocation model = BinaryData.fromString("{\"name\":\"xhekuksjtxukcdm\",\"type\":\"CustomLocation\"}") .toObject(ExtendedLocation.class); - Assertions.assertEquals("ygjofjdd", model.name()); + Assertions.assertEquals("xhekuksjtxukcdm", model.name()); Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExtendedLocation model - = new ExtendedLocation().withName("ygjofjdd").withType(ExtendedLocationTypes.CUSTOM_LOCATION); + = new ExtendedLocation().withName("xhekuksjtxukcdm").withType(ExtendedLocationTypes.CUSTOM_LOCATION); model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("ygjofjdd", model.name()); + Assertions.assertEquals("xhekuksjtxukcdm", model.name()); Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/FrontendIPConfigurationPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/FrontendIPConfigurationPropertiesTests.java new file mode 100644 index 0000000000000..62fd3476e85e5 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/FrontendIPConfigurationPropertiesTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.FrontendIPConfigurationProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.IpAllocationMethodEnum; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetArmReference; +import org.junit.jupiter.api.Assertions; + +public final class FrontendIPConfigurationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FrontendIPConfigurationProperties model = BinaryData.fromString( + "{\"privateIPAddress\":\"ao\",\"privateIPAllocationMethod\":\"Static\",\"subnet\":{\"resourceId\":\"cyyysfgdot\"},\"publicIPAddress\":{\"resourceId\":\"iipuipwoqonm\"}}") + .toObject(FrontendIPConfigurationProperties.class); + Assertions.assertEquals("ao", model.privateIPAddress()); + Assertions.assertEquals(IpAllocationMethodEnum.STATIC, model.privateIPAllocationMethod()); + Assertions.assertEquals("cyyysfgdot", model.subnet().resourceId()); + Assertions.assertEquals("iipuipwoqonm", model.publicIPAddress().resourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FrontendIPConfigurationProperties model = new FrontendIPConfigurationProperties().withPrivateIPAddress("ao") + .withPrivateIPAllocationMethod(IpAllocationMethodEnum.STATIC) + .withSubnet(new VirtualNetworkSubnetArmReference().withResourceId("cyyysfgdot")) + .withPublicIPAddress(new PublicIPAddressArmReference().withResourceId("iipuipwoqonm")); + model = BinaryData.fromObject(model).toObject(FrontendIPConfigurationProperties.class); + Assertions.assertEquals("ao", model.privateIPAddress()); + Assertions.assertEquals(IpAllocationMethodEnum.STATIC, model.privateIPAllocationMethod()); + Assertions.assertEquals("cyyysfgdot", model.subnet().resourceId()); + Assertions.assertEquals("iipuipwoqonm", model.publicIPAddress().resourceId()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/FrontendIPConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/FrontendIPConfigurationTests.java new file mode 100644 index 0000000000000..bc1a57fe4f457 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/FrontendIPConfigurationTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.FrontendIPConfiguration; +import com.azure.resourcemanager.azurestackhci.vm.models.FrontendIPConfigurationProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.IpAllocationMethodEnum; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetArmReference; +import org.junit.jupiter.api.Assertions; + +public final class FrontendIPConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FrontendIPConfiguration model = BinaryData.fromString( + "{\"name\":\"rk\",\"properties\":{\"privateIPAddress\":\"lywjhh\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnet\":{\"resourceId\":\"msi\"},\"publicIPAddress\":{\"resourceId\":\"miloxggdufiqndie\"}}}") + .toObject(FrontendIPConfiguration.class); + Assertions.assertEquals("rk", model.name()); + Assertions.assertEquals("lywjhh", model.properties().privateIPAddress()); + Assertions.assertEquals(IpAllocationMethodEnum.DYNAMIC, model.properties().privateIPAllocationMethod()); + Assertions.assertEquals("msi", model.properties().subnet().resourceId()); + Assertions.assertEquals("miloxggdufiqndie", model.properties().publicIPAddress().resourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FrontendIPConfiguration model = new FrontendIPConfiguration().withName("rk") + .withProperties(new FrontendIPConfigurationProperties().withPrivateIPAddress("lywjhh") + .withPrivateIPAllocationMethod(IpAllocationMethodEnum.DYNAMIC) + .withSubnet(new VirtualNetworkSubnetArmReference().withResourceId("msi")) + .withPublicIPAddress(new PublicIPAddressArmReference().withResourceId("miloxggdufiqndie"))); + model = BinaryData.fromObject(model).toObject(FrontendIPConfiguration.class); + Assertions.assertEquals("rk", model.name()); + Assertions.assertEquals("lywjhh", model.properties().privateIPAddress()); + Assertions.assertEquals(IpAllocationMethodEnum.DYNAMIC, model.properties().privateIPAllocationMethod()); + Assertions.assertEquals("msi", model.properties().subnet().resourceId()); + Assertions.assertEquals("miloxggdufiqndie", model.properties().publicIPAddress().resourceId()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageIdentifierTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageIdentifierTests.java index 80f66f96b87ea..3a7b084dcff63 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageIdentifierTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageIdentifierTests.java @@ -11,21 +11,22 @@ public final class GalleryImageIdentifierTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - GalleryImageIdentifier model - = BinaryData.fromString("{\"publisher\":\"foooj\",\"offer\":\"wifsq\",\"sku\":\"saagdf\"}") - .toObject(GalleryImageIdentifier.class); - Assertions.assertEquals("foooj", model.publisher()); - Assertions.assertEquals("wifsq", model.offer()); - Assertions.assertEquals("saagdf", model.sku()); + GalleryImageIdentifier model = BinaryData + .fromString("{\"publisher\":\"xrifkwmrvkts\",\"offer\":\"zntocipaouajps\",\"sku\":\"ucmpoyfd\"}") + .toObject(GalleryImageIdentifier.class); + Assertions.assertEquals("xrifkwmrvkts", model.publisher()); + Assertions.assertEquals("zntocipaouajps", model.offer()); + Assertions.assertEquals("ucmpoyfd", model.sku()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - GalleryImageIdentifier model - = new GalleryImageIdentifier().withPublisher("foooj").withOffer("wifsq").withSku("saagdf"); + GalleryImageIdentifier model = new GalleryImageIdentifier().withPublisher("xrifkwmrvkts") + .withOffer("zntocipaouajps") + .withSku("ucmpoyfd"); model = BinaryData.fromObject(model).toObject(GalleryImageIdentifier.class); - Assertions.assertEquals("foooj", model.publisher()); - Assertions.assertEquals("wifsq", model.offer()); - Assertions.assertEquals("saagdf", model.sku()); + Assertions.assertEquals("xrifkwmrvkts", model.publisher()); + Assertions.assertEquals("zntocipaouajps", model.offer()); + Assertions.assertEquals("ucmpoyfd", model.sku()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageStatusDownloadStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageStatusDownloadStatusTests.java index adab5280f32df..0722f91b5b1a6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageStatusDownloadStatusTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageStatusDownloadStatusTests.java @@ -11,8 +11,8 @@ public final class GalleryImageStatusDownloadStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - GalleryImageStatusDownloadStatus model = BinaryData.fromString("{\"downloadSizeInMB\":6031739459541658820}") + GalleryImageStatusDownloadStatus model = BinaryData.fromString("{\"downloadSizeInMB\":5604417483302342339}") .toObject(GalleryImageStatusDownloadStatus.class); - Assertions.assertEquals(6031739459541658820L, model.downloadSizeInMB()); + Assertions.assertEquals(5604417483302342339L, model.downloadSizeInMB()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageStatusProvisioningStatusTests.java index 6168b33ef8d6b..f881036bbd827 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageStatusProvisioningStatusTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageStatusProvisioningStatusTests.java @@ -13,9 +13,9 @@ public final class GalleryImageStatusProvisioningStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GalleryImageStatusProvisioningStatus model - = BinaryData.fromString("{\"operationId\":\"yf\",\"status\":\"Failed\"}") + = BinaryData.fromString("{\"operationId\":\"smy\",\"status\":\"Succeeded\"}") .toObject(GalleryImageStatusProvisioningStatus.class); - Assertions.assertEquals("yf", model.operationId()); - Assertions.assertEquals(Status.FAILED, model.status()); + Assertions.assertEquals("smy", model.operationId()); + Assertions.assertEquals(Status.SUCCEEDED, model.status()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageTagsUpdateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageTagsUpdateTests.java index 030035a6b71ee..ea011e534be84 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageTagsUpdateTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageTagsUpdateTests.java @@ -14,17 +14,17 @@ public final class GalleryImageTagsUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GalleryImageTagsUpdate model = BinaryData.fromString( - "{\"tags\":{\"flusarhmof\":\"eupewnwreitjz\",\"he\":\"qhsmyurkdtml\",\"rcryuanzwuxzdxta\":\"uksjtxukcdmp\"}}") + "{\"tags\":{\"anzwuxzdxta\":\"y\",\"hfpmrqobmtukknr\":\"rlhm\",\"gnwzsymglzufc\":\"rtihfxtijbpz\",\"hdbihan\":\"zk\"}}") .toObject(GalleryImageTagsUpdate.class); - Assertions.assertEquals("eupewnwreitjz", model.tags().get("flusarhmof")); + Assertions.assertEquals("y", model.tags().get("anzwuxzdxta")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - GalleryImageTagsUpdate model = new GalleryImageTagsUpdate() - .withTags(mapOf("flusarhmof", "eupewnwreitjz", "he", "qhsmyurkdtml", "rcryuanzwuxzdxta", "uksjtxukcdmp")); + GalleryImageTagsUpdate model = new GalleryImageTagsUpdate().withTags( + mapOf("anzwuxzdxta", "y", "hfpmrqobmtukknr", "rlhm", "gnwzsymglzufc", "rtihfxtijbpz", "hdbihan", "zk")); model = BinaryData.fromObject(model).toObject(GalleryImageTagsUpdate.class); - Assertions.assertEquals("eupewnwreitjz", model.tags().get("flusarhmof")); + Assertions.assertEquals("y", model.tags().get("anzwuxzdxta")); } // Use "Map.of" if available diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageVersionPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageVersionPropertiesTests.java index 583da64dbb44e..370f4c1871b6a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageVersionPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageVersionPropertiesTests.java @@ -13,7 +13,7 @@ public final class GalleryImageVersionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GalleryImageVersionProperties model - = BinaryData.fromString("{\"storageProfile\":{\"osDiskImage\":{\"sizeInMB\":3662955902041806548}}}") + = BinaryData.fromString("{\"storageProfile\":{\"osDiskImage\":{\"sizeInMB\":5458295378310588928}}}") .toObject(GalleryImageVersionProperties.class); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageVersionStorageProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageVersionStorageProfileTests.java index 53a56b6c2a19d..ac83f679ee215 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageVersionStorageProfileTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageVersionStorageProfileTests.java @@ -12,7 +12,7 @@ public final class GalleryImageVersionStorageProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GalleryImageVersionStorageProfile model - = BinaryData.fromString("{\"osDiskImage\":{\"sizeInMB\":6890840342903312019}}") + = BinaryData.fromString("{\"osDiskImage\":{\"sizeInMB\":5597579256870764074}}") .toObject(GalleryImageVersionStorageProfile.class); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageVersionTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageVersionTests.java index 86ab5faf41afd..17720cdb37913 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageVersionTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryImageVersionTests.java @@ -14,16 +14,16 @@ public final class GalleryImageVersionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GalleryImageVersion model = BinaryData.fromString( - "{\"name\":\"lzl\",\"properties\":{\"storageProfile\":{\"osDiskImage\":{\"sizeInMB\":8500205466841144449}}}}") + "{\"name\":\"ogknygjofjdd\",\"properties\":{\"storageProfile\":{\"osDiskImage\":{\"sizeInMB\":3233201824029317370}}}}") .toObject(GalleryImageVersion.class); - Assertions.assertEquals("lzl", model.name()); + Assertions.assertEquals("ogknygjofjdd", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - GalleryImageVersion model = new GalleryImageVersion().withName("lzl") + GalleryImageVersion model = new GalleryImageVersion().withName("ogknygjofjdd") .withStorageProfile(new GalleryImageVersionStorageProfile().withOsDiskImage(new GalleryOSDiskImage())); model = BinaryData.fromObject(model).toObject(GalleryImageVersion.class); - Assertions.assertEquals("lzl", model.name()); + Assertions.assertEquals("ogknygjofjdd", model.name()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryOSDiskImageTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryOSDiskImageTests.java index cb2ee0e042a54..293f3efddf772 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryOSDiskImageTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/GalleryOSDiskImageTests.java @@ -11,7 +11,7 @@ public final class GalleryOSDiskImageTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GalleryOSDiskImage model - = BinaryData.fromString("{\"sizeInMB\":6098942127121377639}").toObject(GalleryOSDiskImage.class); + = BinaryData.fromString("{\"sizeInMB\":8523359422088474782}").toObject(GalleryOSDiskImage.class); } @org.junit.jupiter.api.Test diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/HardwareProfileUpdateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/HardwareProfileUpdateTests.java index 66fc0c4302a69..b3be8e8b69d19 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/HardwareProfileUpdateTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/HardwareProfileUpdateTests.java @@ -7,6 +7,7 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.azurestackhci.vm.models.GpuAssignmentTypeEnum; import com.azure.resourcemanager.azurestackhci.vm.models.HardwareProfileUpdate; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU; import com.azure.resourcemanager.azurestackhci.vm.models.VmSizeEnum; import java.util.Arrays; @@ -16,44 +17,44 @@ public final class HardwareProfileUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HardwareProfileUpdate model = BinaryData.fromString( - "{\"vmSize\":\"Standard_DS3_v2\",\"processors\":709641319,\"memoryMB\":4884898065707354513,\"virtualMachineGPUs\":[{\"assignmentType\":\"GpuDDA\",\"partitionSizeMB\":3591916684499053606,\"gpuName\":\"kzgxhurip\"},{\"assignmentType\":\"GpuP\",\"partitionSizeMB\":5090164062241027652,\"gpuName\":\"unkbebx\"},{\"assignmentType\":\"GpuDDA\",\"partitionSizeMB\":5789185793221344217,\"gpuName\":\"twlrbqt\"},{\"assignmentType\":\"GpuP\",\"partitionSizeMB\":9145634763199835148,\"gpuName\":\"eotg\"}]}") + "{\"vmSize\":\"Standard_A4_v2\",\"processors\":324291601,\"memoryMB\":4869228650041535310,\"virtualMachineGPUs\":[{\"assignmentType\":\"GpuP\",\"partitionSizeMB\":6968746441071799209,\"gpuName\":\"mareqnajxqugj\"}],\"dynamicMemoryConfig\":{\"maximumMemoryMB\":4589373462999613920,\"minimumMemoryMB\":140341677696577800,\"targetMemoryBuffer\":1615439443,\"enabled\":true}}") .toObject(HardwareProfileUpdate.class); - Assertions.assertEquals(VmSizeEnum.STANDARD_DS3_V2, model.vmSize()); - Assertions.assertEquals(709641319, model.processors()); - Assertions.assertEquals(4884898065707354513L, model.memoryMB()); - Assertions.assertEquals(GpuAssignmentTypeEnum.GPU_DDA, model.virtualMachineGPUs().get(0).assignmentType()); - Assertions.assertEquals(3591916684499053606L, model.virtualMachineGPUs().get(0).partitionSizeMB()); - Assertions.assertEquals("kzgxhurip", model.virtualMachineGPUs().get(0).gpuName()); + Assertions.assertEquals(VmSizeEnum.STANDARD_A4_V2, model.vmSize()); + Assertions.assertEquals(324291601, model.processors()); + Assertions.assertEquals(4869228650041535310L, model.memoryMB()); + Assertions.assertEquals(GpuAssignmentTypeEnum.GPUP, model.virtualMachineGPUs().get(0).assignmentType()); + Assertions.assertEquals(6968746441071799209L, model.virtualMachineGPUs().get(0).partitionSizeMB()); + Assertions.assertEquals("mareqnajxqugj", model.virtualMachineGPUs().get(0).gpuName()); + Assertions.assertEquals(4589373462999613920L, model.dynamicMemoryConfig().maximumMemoryMB()); + Assertions.assertEquals(140341677696577800L, model.dynamicMemoryConfig().minimumMemoryMB()); + Assertions.assertEquals(1615439443, model.dynamicMemoryConfig().targetMemoryBuffer()); + Assertions.assertTrue(model.dynamicMemoryConfig().enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HardwareProfileUpdate model = new HardwareProfileUpdate().withVmSize(VmSizeEnum.STANDARD_DS3_V2) - .withProcessors(709641319) - .withMemoryMB(4884898065707354513L) - .withVirtualMachineGPUs(Arrays.asList( - new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() - .withAssignmentType(GpuAssignmentTypeEnum.GPU_DDA) - .withPartitionSizeMB(3591916684499053606L) - .withGpuName("kzgxhurip"), - new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() - .withAssignmentType(GpuAssignmentTypeEnum.GPUP) - .withPartitionSizeMB(5090164062241027652L) - .withGpuName("unkbebx"), - new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() - .withAssignmentType(GpuAssignmentTypeEnum.GPU_DDA) - .withPartitionSizeMB(5789185793221344217L) - .withGpuName("twlrbqt"), - new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() - .withAssignmentType(GpuAssignmentTypeEnum.GPUP) - .withPartitionSizeMB(9145634763199835148L) - .withGpuName("eotg"))); + HardwareProfileUpdate model = new HardwareProfileUpdate().withVmSize(VmSizeEnum.STANDARD_A4_V2) + .withProcessors(324291601) + .withMemoryMB(4869228650041535310L) + .withVirtualMachineGPUs(Arrays.asList(new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() + .withAssignmentType(GpuAssignmentTypeEnum.GPUP) + .withPartitionSizeMB(6968746441071799209L) + .withGpuName("mareqnajxqugj"))) + .withDynamicMemoryConfig(new VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig() + .withMaximumMemoryMB(4589373462999613920L) + .withMinimumMemoryMB(140341677696577800L) + .withTargetMemoryBuffer(1615439443) + .withEnabled(true)); model = BinaryData.fromObject(model).toObject(HardwareProfileUpdate.class); - Assertions.assertEquals(VmSizeEnum.STANDARD_DS3_V2, model.vmSize()); - Assertions.assertEquals(709641319, model.processors()); - Assertions.assertEquals(4884898065707354513L, model.memoryMB()); - Assertions.assertEquals(GpuAssignmentTypeEnum.GPU_DDA, model.virtualMachineGPUs().get(0).assignmentType()); - Assertions.assertEquals(3591916684499053606L, model.virtualMachineGPUs().get(0).partitionSizeMB()); - Assertions.assertEquals("kzgxhurip", model.virtualMachineGPUs().get(0).gpuName()); + Assertions.assertEquals(VmSizeEnum.STANDARD_A4_V2, model.vmSize()); + Assertions.assertEquals(324291601, model.processors()); + Assertions.assertEquals(4869228650041535310L, model.memoryMB()); + Assertions.assertEquals(GpuAssignmentTypeEnum.GPUP, model.virtualMachineGPUs().get(0).assignmentType()); + Assertions.assertEquals(6968746441071799209L, model.virtualMachineGPUs().get(0).partitionSizeMB()); + Assertions.assertEquals("mareqnajxqugj", model.virtualMachineGPUs().get(0).gpuName()); + Assertions.assertEquals(4589373462999613920L, model.dynamicMemoryConfig().maximumMemoryMB()); + Assertions.assertEquals(140341677696577800L, model.dynamicMemoryConfig().minimumMemoryMB()); + Assertions.assertEquals(1615439443, model.dynamicMemoryConfig().targetMemoryBuffer()); + Assertions.assertTrue(model.dynamicMemoryConfig().enabled()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/HttpProxyConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/HttpProxyConfigurationTests.java index 9bd8cca2f750b..24a004a07b2f0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/HttpProxyConfigurationTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/HttpProxyConfigurationTests.java @@ -13,24 +13,24 @@ public final class HttpProxyConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HttpProxyConfiguration model = BinaryData.fromString( - "{\"httpProxy\":\"gpfqbuace\",\"httpsProxy\":\"zfq\",\"noProxy\":[\"uaopppcqeq\",\"ol\"],\"trustedCa\":\"ahzxctobgbk\"}") + "{\"httpProxy\":\"aeaeneqnzarrw\",\"httpsProxy\":\"uu\",\"noProxy\":[\"qkacewii\"],\"trustedCa\":\"pubjibw\"}") .toObject(HttpProxyConfiguration.class); - Assertions.assertEquals("gpfqbuace", model.httpProxy()); - Assertions.assertEquals("zfq", model.httpsProxy()); - Assertions.assertEquals("uaopppcqeq", model.noProxy().get(0)); - Assertions.assertEquals("ahzxctobgbk", model.trustedCa()); + Assertions.assertEquals("aeaeneqnzarrw", model.httpProxy()); + Assertions.assertEquals("uu", model.httpsProxy()); + Assertions.assertEquals("qkacewii", model.noProxy().get(0)); + Assertions.assertEquals("pubjibw", model.trustedCa()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HttpProxyConfiguration model = new HttpProxyConfiguration().withHttpProxy("gpfqbuace") - .withHttpsProxy("zfq") - .withNoProxy(Arrays.asList("uaopppcqeq", "ol")) - .withTrustedCa("ahzxctobgbk"); + HttpProxyConfiguration model = new HttpProxyConfiguration().withHttpProxy("aeaeneqnzarrw") + .withHttpsProxy("uu") + .withNoProxy(Arrays.asList("qkacewii")) + .withTrustedCa("pubjibw"); model = BinaryData.fromObject(model).toObject(HttpProxyConfiguration.class); - Assertions.assertEquals("gpfqbuace", model.httpProxy()); - Assertions.assertEquals("zfq", model.httpsProxy()); - Assertions.assertEquals("uaopppcqeq", model.noProxy().get(0)); - Assertions.assertEquals("ahzxctobgbk", model.trustedCa()); + Assertions.assertEquals("aeaeneqnzarrw", model.httpProxy()); + Assertions.assertEquals("uu", model.httpsProxy()); + Assertions.assertEquals("qkacewii", model.noProxy().get(0)); + Assertions.assertEquals("pubjibw", model.trustedCa()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPConfigurationArmReferenceTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPConfigurationArmReferenceTests.java new file mode 100644 index 0000000000000..57cebf12ec3c9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPConfigurationArmReferenceTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.IPConfigurationArmReference; +import org.junit.jupiter.api.Assertions; + +public final class IPConfigurationArmReferenceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IPConfigurationArmReference model + = BinaryData.fromString("{\"resourceId\":\"qaatjinrv\"}").toObject(IPConfigurationArmReference.class); + Assertions.assertEquals("qaatjinrv", model.resourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IPConfigurationArmReference model = new IPConfigurationArmReference().withResourceId("qaatjinrv"); + model = BinaryData.fromObject(model).toObject(IPConfigurationArmReference.class); + Assertions.assertEquals("qaatjinrv", model.resourceId()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPConfigurationPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPConfigurationPropertiesTests.java index 90f63779a3150..741e0fba1ac1f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPConfigurationPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPConfigurationPropertiesTests.java @@ -13,18 +13,18 @@ public final class IPConfigurationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IPConfigurationProperties model = BinaryData.fromString( - "{\"gateway\":\"uwiqzb\",\"prefixLength\":\"vsovmyokac\",\"privateIPAddress\":\"kwlhzdo\",\"subnet\":{\"id\":\"jmflbvvnch\"}}") + "{\"gateway\":\"dhibnuq\",\"prefixLength\":\"pikad\",\"privateIPAddress\":\"vtq\",\"subnet\":{\"id\":\"buynhijggm\"}}") .toObject(IPConfigurationProperties.class); - Assertions.assertEquals("kwlhzdo", model.privateIPAddress()); - Assertions.assertEquals("jmflbvvnch", model.subnet().id()); + Assertions.assertEquals("vtq", model.privateIPAddress()); + Assertions.assertEquals("buynhijggm", model.subnet().id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IPConfigurationProperties model = new IPConfigurationProperties().withPrivateIPAddress("kwlhzdo") - .withSubnet(new LogicalNetworkArmReference().withId("jmflbvvnch")); + IPConfigurationProperties model = new IPConfigurationProperties().withPrivateIPAddress("vtq") + .withSubnet(new LogicalNetworkArmReference().withId("buynhijggm")); model = BinaryData.fromObject(model).toObject(IPConfigurationProperties.class); - Assertions.assertEquals("kwlhzdo", model.privateIPAddress()); - Assertions.assertEquals("jmflbvvnch", model.subnet().id()); + Assertions.assertEquals("vtq", model.privateIPAddress()); + Assertions.assertEquals("buynhijggm", model.subnet().id()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPConfigurationTests.java index 489c1e56efd47..63d84a0710fb3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPConfigurationTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPConfigurationTests.java @@ -14,21 +14,21 @@ public final class IPConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IPConfiguration model = BinaryData.fromString( - "{\"name\":\"udxorrqn\",\"properties\":{\"gateway\":\"czvyifq\",\"prefixLength\":\"kdvjsll\",\"privateIPAddress\":\"vvdfwatkpnpul\",\"subnet\":{\"id\":\"bczw\"}}}") + "{\"name\":\"smx\",\"properties\":{\"gateway\":\"mpvecxgodebfqk\",\"prefixLength\":\"bmpukgriwflz\",\"privateIPAddress\":\"bxzpuzycisp\",\"subnet\":{\"id\":\"ahmgkbrp\"}}}") .toObject(IPConfiguration.class); - Assertions.assertEquals("udxorrqn", model.name()); - Assertions.assertEquals("vvdfwatkpnpul", model.properties().privateIPAddress()); - Assertions.assertEquals("bczw", model.properties().subnet().id()); + Assertions.assertEquals("smx", model.name()); + Assertions.assertEquals("bxzpuzycisp", model.properties().privateIPAddress()); + Assertions.assertEquals("ahmgkbrp", model.properties().subnet().id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IPConfiguration model = new IPConfiguration().withName("udxorrqn") - .withProperties(new IPConfigurationProperties().withPrivateIPAddress("vvdfwatkpnpul") - .withSubnet(new LogicalNetworkArmReference().withId("bczw"))); + IPConfiguration model = new IPConfiguration().withName("smx") + .withProperties(new IPConfigurationProperties().withPrivateIPAddress("bxzpuzycisp") + .withSubnet(new LogicalNetworkArmReference().withId("ahmgkbrp"))); model = BinaryData.fromObject(model).toObject(IPConfiguration.class); - Assertions.assertEquals("udxorrqn", model.name()); - Assertions.assertEquals("vvdfwatkpnpul", model.properties().privateIPAddress()); - Assertions.assertEquals("bczw", model.properties().subnet().id()); + Assertions.assertEquals("smx", model.name()); + Assertions.assertEquals("bxzpuzycisp", model.properties().privateIPAddress()); + Assertions.assertEquals("ahmgkbrp", model.properties().subnet().id()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPPoolInfoTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPPoolInfoTests.java index c10faade13742..02a98f359a8ad 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPPoolInfoTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPPoolInfoTests.java @@ -11,7 +11,7 @@ public final class IPPoolInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IPPoolInfo model - = BinaryData.fromString("{\"used\":\"wndeicbtwnp\",\"available\":\"oqvuhr\"}").toObject(IPPoolInfo.class); + = BinaryData.fromString("{\"used\":\"bisnja\",\"available\":\"mngnzscxaqw\"}").toObject(IPPoolInfo.class); } @org.junit.jupiter.api.Test diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPPoolTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPPoolTests.java index 365f0842e1bdf..bd4fea95878dc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPPoolTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IPPoolTests.java @@ -14,25 +14,25 @@ public final class IPPoolTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IPPool model = BinaryData.fromString( - "{\"name\":\"kbfkg\",\"ipPoolType\":\"vippool\",\"start\":\"exxppofmxaxcfjp\",\"end\":\"dtocj\",\"info\":{\"used\":\"vpmouexhdzxib\",\"available\":\"ojnxqbzvdd\"}}") + "{\"name\":\"mivkwlzuvcc\",\"ipPoolType\":\"vippool\",\"start\":\"nbacfi\",\"end\":\"l\",\"info\":{\"used\":\"etqgtzxdpnq\",\"available\":\"qwxrjfeallnw\"}}") .toObject(IPPool.class); - Assertions.assertEquals("kbfkg", model.name()); + Assertions.assertEquals("mivkwlzuvcc", model.name()); Assertions.assertEquals(IPPoolTypeEnum.VIPPOOL, model.ipPoolType()); - Assertions.assertEquals("exxppofmxaxcfjp", model.start()); - Assertions.assertEquals("dtocj", model.end()); + Assertions.assertEquals("nbacfi", model.start()); + Assertions.assertEquals("l", model.end()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IPPool model = new IPPool().withName("kbfkg") + IPPool model = new IPPool().withName("mivkwlzuvcc") .withIpPoolType(IPPoolTypeEnum.VIPPOOL) - .withStart("exxppofmxaxcfjp") - .withEnd("dtocj") + .withStart("nbacfi") + .withEnd("l") .withInfo(new IPPoolInfo()); model = BinaryData.fromObject(model).toObject(IPPool.class); - Assertions.assertEquals("kbfkg", model.name()); + Assertions.assertEquals("mivkwlzuvcc", model.name()); Assertions.assertEquals(IPPoolTypeEnum.VIPPOOL, model.ipPoolType()); - Assertions.assertEquals("exxppofmxaxcfjp", model.start()); - Assertions.assertEquals("dtocj", model.end()); + Assertions.assertEquals("nbacfi", model.start()); + Assertions.assertEquals("l", model.end()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IdentityTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IdentityTests.java index 6425a50b04b7f..ac7dbc40cb749 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IdentityTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/IdentityTests.java @@ -13,7 +13,7 @@ public final class IdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Identity model = BinaryData - .fromString("{\"principalId\":\"gohdneuelfphsd\",\"tenantId\":\"t\",\"type\":\"SystemAssigned\"}") + .fromString("{\"principalId\":\"oaxoruzfgsqu\",\"tenantId\":\"xrxxlep\",\"type\":\"SystemAssigned\"}") .toObject(Identity.class); Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.type()); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ImageArmReferenceTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ImageArmReferenceTests.java index dfe75919a1451..e5ffd0ea485eb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ImageArmReferenceTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ImageArmReferenceTests.java @@ -11,14 +11,14 @@ public final class ImageArmReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ImageArmReference model = BinaryData.fromString("{\"id\":\"hxg\"}").toObject(ImageArmReference.class); - Assertions.assertEquals("hxg", model.id()); + ImageArmReference model = BinaryData.fromString("{\"id\":\"eqnovvqfovl\"}").toObject(ImageArmReference.class); + Assertions.assertEquals("eqnovvqfovl", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ImageArmReference model = new ImageArmReference().withId("hxg"); + ImageArmReference model = new ImageArmReference().withId("eqnovvqfovl"); model = BinaryData.fromObject(model).toObject(ImageArmReference.class); - Assertions.assertEquals("hxg", model.id()); + Assertions.assertEquals("eqnovvqfovl", model.id()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/InboundRuleStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/InboundRuleStatusProvisioningStatusTests.java new file mode 100644 index 0000000000000..561de6809b42f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/InboundRuleStatusProvisioningStatusTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.InboundRuleStatusProvisioningStatus; +import com.azure.resourcemanager.azurestackhci.vm.models.Status; +import org.junit.jupiter.api.Assertions; + +public final class InboundRuleStatusProvisioningStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InboundRuleStatusProvisioningStatus model + = BinaryData.fromString("{\"operationId\":\"dsofbshrns\",\"status\":\"Failed\"}") + .toObject(InboundRuleStatusProvisioningStatus.class); + Assertions.assertEquals("dsofbshrns", model.operationId()); + Assertions.assertEquals(Status.FAILED, model.status()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/InterfaceDNSSettingsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/InterfaceDNSSettingsTests.java index 37eb66ece329b..458aa9413d2ae 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/InterfaceDNSSettingsTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/InterfaceDNSSettingsTests.java @@ -13,14 +13,14 @@ public final class InterfaceDNSSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InterfaceDNSSettings model - = BinaryData.fromString("{\"dnsServers\":[\"uqkhrsajiwku\"]}").toObject(InterfaceDNSSettings.class); - Assertions.assertEquals("uqkhrsajiwku", model.dnsServers().get(0)); + = BinaryData.fromString("{\"dnsServers\":[\"na\",\"zmhjrunmp\"]}").toObject(InterfaceDNSSettings.class); + Assertions.assertEquals("na", model.dnsServers().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InterfaceDNSSettings model = new InterfaceDNSSettings().withDnsServers(Arrays.asList("uqkhrsajiwku")); + InterfaceDNSSettings model = new InterfaceDNSSettings().withDnsServers(Arrays.asList("na", "zmhjrunmp")); model = BinaryData.fromObject(model).toObject(InterfaceDNSSettings.class); - Assertions.assertEquals("uqkhrsajiwku", model.dnsServers().get(0)); + Assertions.assertEquals("na", model.dnsServers().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerBackendAddressPoolReferenceTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerBackendAddressPoolReferenceTests.java new file mode 100644 index 0000000000000..d8476d416c9cf --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerBackendAddressPoolReferenceTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressPoolReference; +import org.junit.jupiter.api.Assertions; + +public final class LoadBalancerBackendAddressPoolReferenceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LoadBalancerBackendAddressPoolReference model = BinaryData.fromString("{\"name\":\"pgogtqxepny\"}") + .toObject(LoadBalancerBackendAddressPoolReference.class); + Assertions.assertEquals("pgogtqxepny", model.name()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LoadBalancerBackendAddressPoolReference model + = new LoadBalancerBackendAddressPoolReference().withName("pgogtqxepny"); + model = BinaryData.fromObject(model).toObject(LoadBalancerBackendAddressPoolReference.class); + Assertions.assertEquals("pgogtqxepny", model.name()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerBackendAddressPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerBackendAddressPropertiesTests.java new file mode 100644 index 0000000000000..19945937bd1b5 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerBackendAddressPropertiesTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.IPConfigurationArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressAdminState; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressProperties; +import org.junit.jupiter.api.Assertions; + +public final class LoadBalancerBackendAddressPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LoadBalancerBackendAddressProperties model = BinaryData.fromString( + "{\"adminState\":\"Down\",\"ipAddress\":\"ohpfkyrkdbdgiog\",\"subnet\":{\"resourceId\":\"mnwqj\"},\"virtualNetwork\":{\"resourceId\":\"aiy\"},\"logicalNetwork\":{\"id\":\"viacegfnmntfpmv\"},\"networkInterfaceIPConfiguration\":{\"resourceId\":\"fnczdwvvbalx\"}}") + .toObject(LoadBalancerBackendAddressProperties.class); + Assertions.assertEquals(LoadBalancerBackendAddressAdminState.DOWN, model.adminState()); + Assertions.assertEquals("fnczdwvvbalx", model.networkInterfaceIPConfiguration().resourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LoadBalancerBackendAddressProperties model + = new LoadBalancerBackendAddressProperties().withAdminState(LoadBalancerBackendAddressAdminState.DOWN) + .withNetworkInterfaceIPConfiguration(new IPConfigurationArmReference().withResourceId("fnczdwvvbalx")); + model = BinaryData.fromObject(model).toObject(LoadBalancerBackendAddressProperties.class); + Assertions.assertEquals(LoadBalancerBackendAddressAdminState.DOWN, model.adminState()); + Assertions.assertEquals("fnczdwvvbalx", model.networkInterfaceIPConfiguration().resourceId()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerBackendAddressTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerBackendAddressTests.java new file mode 100644 index 0000000000000..dfa5c86f5fa49 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerBackendAddressTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.IPConfigurationArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddress; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressAdminState; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressProperties; +import org.junit.jupiter.api.Assertions; + +public final class LoadBalancerBackendAddressTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LoadBalancerBackendAddress model = BinaryData.fromString( + "{\"name\":\"kgkxn\",\"properties\":{\"adminState\":\"Up\",\"ipAddress\":\"b\",\"subnet\":{\"resourceId\":\"udtjuewbc\"},\"virtualNetwork\":{\"resourceId\":\"uuwhcjyxcc\"},\"logicalNetwork\":{\"id\":\"payakkud\"},\"networkInterfaceIPConfiguration\":{\"resourceId\":\"gwjplmag\"}}}") + .toObject(LoadBalancerBackendAddress.class); + Assertions.assertEquals("kgkxn", model.name()); + Assertions.assertEquals(LoadBalancerBackendAddressAdminState.UP, model.properties().adminState()); + Assertions.assertEquals("gwjplmag", model.properties().networkInterfaceIPConfiguration().resourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LoadBalancerBackendAddress model + = new LoadBalancerBackendAddress().withName("kgkxn") + .withProperties(new LoadBalancerBackendAddressProperties() + .withAdminState(LoadBalancerBackendAddressAdminState.UP) + .withNetworkInterfaceIPConfiguration(new IPConfigurationArmReference().withResourceId("gwjplmag"))); + model = BinaryData.fromObject(model).toObject(LoadBalancerBackendAddress.class); + Assertions.assertEquals("kgkxn", model.name()); + Assertions.assertEquals(LoadBalancerBackendAddressAdminState.UP, model.properties().adminState()); + Assertions.assertEquals("gwjplmag", model.properties().networkInterfaceIPConfiguration().resourceId()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerFrontendIPConfigurationReferenceTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerFrontendIPConfigurationReferenceTests.java new file mode 100644 index 0000000000000..9e956dac29a30 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerFrontendIPConfigurationReferenceTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerFrontendIPConfigurationReference; +import org.junit.jupiter.api.Assertions; + +public final class LoadBalancerFrontendIPConfigurationReferenceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LoadBalancerFrontendIPConfigurationReference model = BinaryData.fromString("{\"name\":\"onbzoggculapzwy\"}") + .toObject(LoadBalancerFrontendIPConfigurationReference.class); + Assertions.assertEquals("onbzoggculapzwy", model.name()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LoadBalancerFrontendIPConfigurationReference model + = new LoadBalancerFrontendIPConfigurationReference().withName("onbzoggculapzwy"); + model = BinaryData.fromObject(model).toObject(LoadBalancerFrontendIPConfigurationReference.class); + Assertions.assertEquals("onbzoggculapzwy", model.name()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerProbeReferenceTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerProbeReferenceTests.java new file mode 100644 index 0000000000000..b1e29acae02a6 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerProbeReferenceTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerProbeReference; +import org.junit.jupiter.api.Assertions; + +public final class LoadBalancerProbeReferenceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LoadBalancerProbeReference model + = BinaryData.fromString("{\"name\":\"b\"}").toObject(LoadBalancerProbeReference.class); + Assertions.assertEquals("b", model.name()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LoadBalancerProbeReference model = new LoadBalancerProbeReference().withName("b"); + model = BinaryData.fromObject(model).toObject(LoadBalancerProbeReference.class); + Assertions.assertEquals("b", model.name()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerRulePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerRulePropertiesTests.java new file mode 100644 index 0000000000000..905b17bcf294e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerRulePropertiesTests.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressPoolReference; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerFrontendIPConfigurationReference; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerProbeReference; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRuleProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRuleSessionPersistenceType; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRuleTransportProtocol; +import org.junit.jupiter.api.Assertions; + +public final class LoadBalancerRulePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LoadBalancerRuleProperties model = BinaryData.fromString( + "{\"frontendIPConfiguration\":{\"name\":\"drihpfhoqcaaewda\"},\"backendAddressPool\":{\"name\":\"mdjvlpj\"},\"frontendPort\":945284283,\"backendPort\":1119660278,\"protocol\":\"All\",\"probe\":{\"name\":\"rmsgeivsiykzkd\"},\"loadDistribution\":\"SourceIP\",\"idleTimeoutInMinutes\":1416610190}") + .toObject(LoadBalancerRuleProperties.class); + Assertions.assertEquals("drihpfhoqcaaewda", model.frontendIPConfiguration().name()); + Assertions.assertEquals("mdjvlpj", model.backendAddressPool().name()); + Assertions.assertEquals(945284283, model.frontendPort()); + Assertions.assertEquals(1119660278, model.backendPort()); + Assertions.assertEquals(LoadBalancerRuleTransportProtocol.ALL, model.protocol()); + Assertions.assertEquals("rmsgeivsiykzkd", model.probe().name()); + Assertions.assertEquals(LoadBalancerRuleSessionPersistenceType.SOURCE_IP, model.loadDistribution()); + Assertions.assertEquals(1416610190, model.idleTimeoutInMinutes()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LoadBalancerRuleProperties model = new LoadBalancerRuleProperties() + .withFrontendIPConfiguration( + new LoadBalancerFrontendIPConfigurationReference().withName("drihpfhoqcaaewda")) + .withBackendAddressPool(new LoadBalancerBackendAddressPoolReference().withName("mdjvlpj")) + .withFrontendPort(945284283) + .withBackendPort(1119660278) + .withProtocol(LoadBalancerRuleTransportProtocol.ALL) + .withProbe(new LoadBalancerProbeReference().withName("rmsgeivsiykzkd")) + .withLoadDistribution(LoadBalancerRuleSessionPersistenceType.SOURCE_IP) + .withIdleTimeoutInMinutes(1416610190); + model = BinaryData.fromObject(model).toObject(LoadBalancerRuleProperties.class); + Assertions.assertEquals("drihpfhoqcaaewda", model.frontendIPConfiguration().name()); + Assertions.assertEquals("mdjvlpj", model.backendAddressPool().name()); + Assertions.assertEquals(945284283, model.frontendPort()); + Assertions.assertEquals(1119660278, model.backendPort()); + Assertions.assertEquals(LoadBalancerRuleTransportProtocol.ALL, model.protocol()); + Assertions.assertEquals("rmsgeivsiykzkd", model.probe().name()); + Assertions.assertEquals(LoadBalancerRuleSessionPersistenceType.SOURCE_IP, model.loadDistribution()); + Assertions.assertEquals(1416610190, model.idleTimeoutInMinutes()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerRuleTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerRuleTests.java new file mode 100644 index 0000000000000..a43ae4dd91aea --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerRuleTests.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerBackendAddressPoolReference; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerFrontendIPConfigurationReference; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerProbeReference; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRule; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRuleProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRuleSessionPersistenceType; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerRuleTransportProtocol; +import org.junit.jupiter.api.Assertions; + +public final class LoadBalancerRuleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LoadBalancerRule model = BinaryData.fromString( + "{\"name\":\"fukuvsjcswsmystu\",\"properties\":{\"frontendIPConfiguration\":{\"name\":\"uqypfcvle\"},\"backendAddressPool\":{\"name\":\"chpqbmfpjba\"},\"frontendPort\":877892499,\"backendPort\":2011821000,\"protocol\":\"All\",\"probe\":{\"name\":\"cxsspuunnoxyh\"},\"loadDistribution\":\"Default\",\"idleTimeoutInMinutes\":1867309112}}") + .toObject(LoadBalancerRule.class); + Assertions.assertEquals("fukuvsjcswsmystu", model.name()); + Assertions.assertEquals("uqypfcvle", model.properties().frontendIPConfiguration().name()); + Assertions.assertEquals("chpqbmfpjba", model.properties().backendAddressPool().name()); + Assertions.assertEquals(877892499, model.properties().frontendPort()); + Assertions.assertEquals(2011821000, model.properties().backendPort()); + Assertions.assertEquals(LoadBalancerRuleTransportProtocol.ALL, model.properties().protocol()); + Assertions.assertEquals("cxsspuunnoxyh", model.properties().probe().name()); + Assertions.assertEquals(LoadBalancerRuleSessionPersistenceType.DEFAULT, model.properties().loadDistribution()); + Assertions.assertEquals(1867309112, model.properties().idleTimeoutInMinutes()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LoadBalancerRule model = new LoadBalancerRule().withName("fukuvsjcswsmystu") + .withProperties(new LoadBalancerRuleProperties() + .withFrontendIPConfiguration(new LoadBalancerFrontendIPConfigurationReference().withName("uqypfcvle")) + .withBackendAddressPool(new LoadBalancerBackendAddressPoolReference().withName("chpqbmfpjba")) + .withFrontendPort(877892499) + .withBackendPort(2011821000) + .withProtocol(LoadBalancerRuleTransportProtocol.ALL) + .withProbe(new LoadBalancerProbeReference().withName("cxsspuunnoxyh")) + .withLoadDistribution(LoadBalancerRuleSessionPersistenceType.DEFAULT) + .withIdleTimeoutInMinutes(1867309112)); + model = BinaryData.fromObject(model).toObject(LoadBalancerRule.class); + Assertions.assertEquals("fukuvsjcswsmystu", model.name()); + Assertions.assertEquals("uqypfcvle", model.properties().frontendIPConfiguration().name()); + Assertions.assertEquals("chpqbmfpjba", model.properties().backendAddressPool().name()); + Assertions.assertEquals(877892499, model.properties().frontendPort()); + Assertions.assertEquals(2011821000, model.properties().backendPort()); + Assertions.assertEquals(LoadBalancerRuleTransportProtocol.ALL, model.properties().protocol()); + Assertions.assertEquals("cxsspuunnoxyh", model.properties().probe().name()); + Assertions.assertEquals(LoadBalancerRuleSessionPersistenceType.DEFAULT, model.properties().loadDistribution()); + Assertions.assertEquals(1867309112, model.properties().idleTimeoutInMinutes()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerStatusProvisioningStatusTests.java new file mode 100644 index 0000000000000..a2dd061b13a58 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerStatusProvisioningStatusTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerStatusProvisioningStatus; +import com.azure.resourcemanager.azurestackhci.vm.models.Status; +import org.junit.jupiter.api.Assertions; + +public final class LoadBalancerStatusProvisioningStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LoadBalancerStatusProvisioningStatus model + = BinaryData.fromString("{\"operationId\":\"negvmnvuqe\",\"status\":\"InProgress\"}") + .toObject(LoadBalancerStatusProvisioningStatus.class); + Assertions.assertEquals("negvmnvuqe", model.operationId()); + Assertions.assertEquals(Status.IN_PROGRESS, model.status()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerTagsUpdateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerTagsUpdateTests.java new file mode 100644 index 0000000000000..e4574ae7295cf --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LoadBalancerTagsUpdateTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerTagsUpdate; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class LoadBalancerTagsUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LoadBalancerTagsUpdate model = BinaryData + .fromString("{\"tags\":{\"tjb\":\"pa\",\"ril\":\"kdmflvestmjlx\",\"ktwkuziyc\":\"zapeewchpx\"}}") + .toObject(LoadBalancerTagsUpdate.class); + Assertions.assertEquals("pa", model.tags().get("tjb")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LoadBalancerTagsUpdate model = new LoadBalancerTagsUpdate() + .withTags(mapOf("tjb", "pa", "ril", "kdmflvestmjlx", "ktwkuziyc", "zapeewchpx")); + model = BinaryData.fromObject(model).toObject(LoadBalancerTagsUpdate.class); + Assertions.assertEquals("pa", model.tags().get("tjb")); + } + + // 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/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworkArmReferenceTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworkArmReferenceTests.java index 4744587446c25..5561f89da9367 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworkArmReferenceTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworkArmReferenceTests.java @@ -12,14 +12,14 @@ public final class LogicalNetworkArmReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LogicalNetworkArmReference model - = BinaryData.fromString("{\"id\":\"cciw\"}").toObject(LogicalNetworkArmReference.class); - Assertions.assertEquals("cciw", model.id()); + = BinaryData.fromString("{\"id\":\"fsiarbutr\"}").toObject(LogicalNetworkArmReference.class); + Assertions.assertEquals("fsiarbutr", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LogicalNetworkArmReference model = new LogicalNetworkArmReference().withId("cciw"); + LogicalNetworkArmReference model = new LogicalNetworkArmReference().withId("fsiarbutr"); model = BinaryData.fromObject(model).toObject(LogicalNetworkArmReference.class); - Assertions.assertEquals("cciw", model.id()); + Assertions.assertEquals("fsiarbutr", model.id()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworkPropertiesDhcpOptionsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworkPropertiesDhcpOptionsTests.java index 3956b8a40417f..926a3f0eee7fb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworkPropertiesDhcpOptionsTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworkPropertiesDhcpOptionsTests.java @@ -12,16 +12,17 @@ public final class LogicalNetworkPropertiesDhcpOptionsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LogicalNetworkPropertiesDhcpOptions model = BinaryData.fromString("{\"dnsServers\":[\"tusivyevcciqihn\"]}") + LogicalNetworkPropertiesDhcpOptions model = BinaryData + .fromString("{\"dnsServers\":[\"lyxwjkcprbnwbx\",\"jvtbvpyss\",\"dnrujqguhmuouqfp\",\"wzwbnguitn\"]}") .toObject(LogicalNetworkPropertiesDhcpOptions.class); - Assertions.assertEquals("tusivyevcciqihn", model.dnsServers().get(0)); + Assertions.assertEquals("lyxwjkcprbnwbx", model.dnsServers().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LogicalNetworkPropertiesDhcpOptions model - = new LogicalNetworkPropertiesDhcpOptions().withDnsServers(Arrays.asList("tusivyevcciqihn")); + LogicalNetworkPropertiesDhcpOptions model = new LogicalNetworkPropertiesDhcpOptions() + .withDnsServers(Arrays.asList("lyxwjkcprbnwbx", "jvtbvpyss", "dnrujqguhmuouqfp", "wzwbnguitn")); model = BinaryData.fromObject(model).toObject(LogicalNetworkPropertiesDhcpOptions.class); - Assertions.assertEquals("tusivyevcciqihn", model.dnsServers().get(0)); + Assertions.assertEquals("lyxwjkcprbnwbx", model.dnsServers().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworkStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworkStatusProvisioningStatusTests.java index ea849a8610cdb..20a08275343bb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworkStatusProvisioningStatusTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworkStatusProvisioningStatusTests.java @@ -13,9 +13,9 @@ public final class LogicalNetworkStatusProvisioningStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LogicalNetworkStatusProvisioningStatus model - = BinaryData.fromString("{\"operationId\":\"yd\",\"status\":\"Succeeded\"}") + = BinaryData.fromString("{\"operationId\":\"seiphe\",\"status\":\"Succeeded\"}") .toObject(LogicalNetworkStatusProvisioningStatus.class); - Assertions.assertEquals("yd", model.operationId()); + Assertions.assertEquals("seiphe", model.operationId()); Assertions.assertEquals(Status.SUCCEEDED, model.status()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksUpdateRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksUpdateRequestTests.java index 7184658c68c0c..b8f8a1d3a4958 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksUpdateRequestTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/LogicalNetworksUpdateRequestTests.java @@ -13,18 +13,17 @@ public final class LogicalNetworksUpdateRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LogicalNetworksUpdateRequest model - = BinaryData.fromString("{\"tags\":{\"jqkwpyeicx\":\"t\",\"pbobjo\":\"qciwqvhkhixuigdt\",\"w\":\"hm\"}}") - .toObject(LogicalNetworksUpdateRequest.class); - Assertions.assertEquals("t", model.tags().get("jqkwpyeicx")); + LogicalNetworksUpdateRequest model = BinaryData.fromString("{\"tags\":{\"zvdudgwdslfhotwm\":\"ualhbxxhejj\"}}") + .toObject(LogicalNetworksUpdateRequest.class); + Assertions.assertEquals("ualhbxxhejj", model.tags().get("zvdudgwdslfhotwm")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LogicalNetworksUpdateRequest model = new LogicalNetworksUpdateRequest() - .withTags(mapOf("jqkwpyeicx", "t", "pbobjo", "qciwqvhkhixuigdt", "w", "hm")); + LogicalNetworksUpdateRequest model + = new LogicalNetworksUpdateRequest().withTags(mapOf("zvdudgwdslfhotwm", "ualhbxxhejj")); model = BinaryData.fromObject(model).toObject(LogicalNetworksUpdateRequest.class); - Assertions.assertEquals("t", model.tags().get("jqkwpyeicx")); + Assertions.assertEquals("ualhbxxhejj", model.tags().get("zvdudgwdslfhotwm")); } // Use "Map.of" if available diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ManagedNetworkFabricArmReferenceTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ManagedNetworkFabricArmReferenceTests.java new file mode 100644 index 0000000000000..ec61ecf12df30 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ManagedNetworkFabricArmReferenceTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.ManagedNetworkFabricArmReference; +import org.junit.jupiter.api.Assertions; + +public final class ManagedNetworkFabricArmReferenceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedNetworkFabricArmReference model + = BinaryData.fromString("{\"resourceId\":\"izgazxu\"}").toObject(ManagedNetworkFabricArmReference.class); + Assertions.assertEquals("izgazxu", model.resourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedNetworkFabricArmReference model = new ManagedNetworkFabricArmReference().withResourceId("izgazxu"); + model = BinaryData.fromObject(model).toObject(ManagedNetworkFabricArmReference.class); + Assertions.assertEquals("izgazxu", model.resourceId()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ManagedServiceIdentityTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ManagedServiceIdentityTests.java index 149a300aa71a8..7907e1aa0c6e4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ManagedServiceIdentityTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ManagedServiceIdentityTests.java @@ -16,17 +16,18 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"pe\",\"tenantId\":\"wfbkrvrns\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"hsqfsubcgjbirxbp\":{\"principalId\":\"ohxcrsbfova\",\"clientId\":\"ruvw\"}}}") + "{\"principalId\":\"wwrlkdmtncv\",\"tenantId\":\"otllxdyhgsyo\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"queziky\":{\"principalId\":\"tdtbnnhadooc\",\"clientId\":\"vcikhnvpamqgx\"}}}") .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("hsqfsubcgjbirxbp", new UserAssignedIdentity())); + ManagedServiceIdentity model + = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("queziky", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } // Use "Map.of" if available diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImageStatusDownloadStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImageStatusDownloadStatusTests.java index ce321c3b6ca0a..02a26de38474c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImageStatusDownloadStatusTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImageStatusDownloadStatusTests.java @@ -12,8 +12,8 @@ public final class MarketplaceGalleryImageStatusDownloadStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MarketplaceGalleryImageStatusDownloadStatus model - = BinaryData.fromString("{\"downloadSizeInMB\":5538754849059417919}") + = BinaryData.fromString("{\"downloadSizeInMB\":1617028943376388649}") .toObject(MarketplaceGalleryImageStatusDownloadStatus.class); - Assertions.assertEquals(5538754849059417919L, model.downloadSizeInMB()); + Assertions.assertEquals(1617028943376388649L, model.downloadSizeInMB()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImageStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImageStatusProvisioningStatusTests.java index 7aaa1fca8f867..361694b4cb86f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImageStatusProvisioningStatusTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImageStatusProvisioningStatusTests.java @@ -13,9 +13,9 @@ public final class MarketplaceGalleryImageStatusProvisioningStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MarketplaceGalleryImageStatusProvisioningStatus model - = BinaryData.fromString("{\"operationId\":\"nj\",\"status\":\"Succeeded\"}") + = BinaryData.fromString("{\"operationId\":\"s\",\"status\":\"Succeeded\"}") .toObject(MarketplaceGalleryImageStatusProvisioningStatus.class); - Assertions.assertEquals("nj", model.operationId()); + Assertions.assertEquals("s", model.operationId()); Assertions.assertEquals(Status.SUCCEEDED, model.status()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImageTagsUpdateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImageTagsUpdateTests.java index 2c0d49b095ddb..2e54f5b984024 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImageTagsUpdateTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/MarketplaceGalleryImageTagsUpdateTests.java @@ -13,18 +13,19 @@ public final class MarketplaceGalleryImageTagsUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MarketplaceGalleryImageTagsUpdate model = BinaryData.fromString( - "{\"tags\":{\"yegu\":\"pdjpjumasxazjp\",\"wdslfhotwmcy\":\"lhbxxhejjzzvdud\",\"cftadeh\":\"pwlbjnpg\"}}") + MarketplaceGalleryImageTagsUpdate model = BinaryData + .fromString( + "{\"tags\":{\"uxh\":\"i\",\"czvyifq\":\"yudxorrqnbp\",\"jsllrmv\":\"vkd\",\"watkpnpulexxb\":\"d\"}}") .toObject(MarketplaceGalleryImageTagsUpdate.class); - Assertions.assertEquals("pdjpjumasxazjp", model.tags().get("yegu")); + Assertions.assertEquals("i", model.tags().get("uxh")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MarketplaceGalleryImageTagsUpdate model = new MarketplaceGalleryImageTagsUpdate() - .withTags(mapOf("yegu", "pdjpjumasxazjp", "wdslfhotwmcy", "lhbxxhejjzzvdud", "cftadeh", "pwlbjnpg")); + .withTags(mapOf("uxh", "i", "czvyifq", "yudxorrqnbp", "jsllrmv", "vkd", "watkpnpulexxb", "d")); model = BinaryData.fromObject(model).toObject(MarketplaceGalleryImageTagsUpdate.class); - Assertions.assertEquals("pdjpjumasxazjp", model.tags().get("yegu")); + Assertions.assertEquals("i", model.tags().get("uxh")); } // Use "Map.of" if available diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewayArmReferenceTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewayArmReferenceTests.java new file mode 100644 index 0000000000000..561971ef3f411 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewayArmReferenceTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.NatGatewayArmReference; +import org.junit.jupiter.api.Assertions; + +public final class NatGatewayArmReferenceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NatGatewayArmReference model + = BinaryData.fromString("{\"resourceId\":\"okixrjqcir\"}").toObject(NatGatewayArmReference.class); + Assertions.assertEquals("okixrjqcir", model.resourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NatGatewayArmReference model = new NatGatewayArmReference().withResourceId("okixrjqcir"); + model = BinaryData.fromObject(model).toObject(NatGatewayArmReference.class); + Assertions.assertEquals("okixrjqcir", model.resourceId()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewayStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewayStatusProvisioningStatusTests.java new file mode 100644 index 0000000000000..d1744a80e74c9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewayStatusProvisioningStatusTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.NatGatewayStatusProvisioningStatus; +import com.azure.resourcemanager.azurestackhci.vm.models.Status; +import org.junit.jupiter.api.Assertions; + +public final class NatGatewayStatusProvisioningStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NatGatewayStatusProvisioningStatus model + = BinaryData.fromString("{\"operationId\":\"ool\",\"status\":\"Failed\"}") + .toObject(NatGatewayStatusProvisioningStatus.class); + Assertions.assertEquals("ool", model.operationId()); + Assertions.assertEquals(Status.FAILED, model.status()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewayTagsUpdateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewayTagsUpdateTests.java new file mode 100644 index 0000000000000..62d7f9300693e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NatGatewayTagsUpdateTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.NatGatewayTagsUpdate; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class NatGatewayTagsUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NatGatewayTagsUpdate model = BinaryData + .fromString("{\"tags\":{\"jrywvtylbfpnc\":\"iwkkbn\",\"iwii\":\"rd\",\"nfdn\":\"htywubxcbihwq\"}}") + .toObject(NatGatewayTagsUpdate.class); + Assertions.assertEquals("iwkkbn", model.tags().get("jrywvtylbfpnc")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NatGatewayTagsUpdate model = new NatGatewayTagsUpdate() + .withTags(mapOf("jrywvtylbfpnc", "iwkkbn", "iwii", "rd", "nfdn", "htywubxcbihwq")); + model = BinaryData.fromObject(model).toObject(NatGatewayTagsUpdate.class); + Assertions.assertEquals("iwkkbn", model.tags().get("jrywvtylbfpnc")); + } + + // 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/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfaceArmReferenceTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfaceArmReferenceTests.java index 842461c0b8cb7..a929ad8c6ff78 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfaceArmReferenceTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfaceArmReferenceTests.java @@ -12,14 +12,14 @@ public final class NetworkInterfaceArmReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkInterfaceArmReference model - = BinaryData.fromString("{\"id\":\"tcxsenhwlrs\"}").toObject(NetworkInterfaceArmReference.class); - Assertions.assertEquals("tcxsenhwlrs", model.id()); + = BinaryData.fromString("{\"id\":\"fudwpznt\"}").toObject(NetworkInterfaceArmReference.class); + Assertions.assertEquals("fudwpznt", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkInterfaceArmReference model = new NetworkInterfaceArmReference().withId("tcxsenhwlrs"); + NetworkInterfaceArmReference model = new NetworkInterfaceArmReference().withId("fudwpznt"); model = BinaryData.fromObject(model).toObject(NetworkInterfaceArmReference.class); - Assertions.assertEquals("tcxsenhwlrs", model.id()); + Assertions.assertEquals("fudwpznt", model.id()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfaceStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfaceStatusProvisioningStatusTests.java index d740b4e10421e..86965a2bacbd1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfaceStatusProvisioningStatusTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfaceStatusProvisioningStatusTests.java @@ -13,9 +13,9 @@ public final class NetworkInterfaceStatusProvisioningStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkInterfaceStatusProvisioningStatus model - = BinaryData.fromString("{\"operationId\":\"auu\",\"status\":\"InProgress\"}") + = BinaryData.fromString("{\"operationId\":\"xmyskp\",\"status\":\"Succeeded\"}") .toObject(NetworkInterfaceStatusProvisioningStatus.class); - Assertions.assertEquals("auu", model.operationId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.status()); + Assertions.assertEquals("xmyskp", model.operationId()); + Assertions.assertEquals(Status.SUCCEEDED, model.status()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesUpdatePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesUpdatePropertiesTests.java index ac20f4a97e29f..3de013f62686b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesUpdatePropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesUpdatePropertiesTests.java @@ -15,20 +15,23 @@ public final class NetworkInterfacesUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkInterfacesUpdateProperties model = BinaryData.fromString( - "{\"networkSecurityGroup\":{\"id\":\"vmezy\"},\"dnsSettings\":{\"dnsServers\":[\"mzsb\",\"zoggigrxwburvjxx\",\"nspydptkoenkoukn\"]}}") + "{\"networkSecurityGroup\":{\"id\":\"wzbhvgyugu\"},\"dnsSettings\":{\"dnsServers\":[\"kfssxqukkf\",\"l\",\"mg\",\"xnkjzkdesl\"]},\"bypassSdnPolicies\":false}") .toObject(NetworkInterfacesUpdateProperties.class); - Assertions.assertEquals("vmezy", model.networkSecurityGroup().id()); - Assertions.assertEquals("mzsb", model.dnsSettings().dnsServers().get(0)); + Assertions.assertEquals("wzbhvgyugu", model.networkSecurityGroup().id()); + Assertions.assertEquals("kfssxqukkf", model.dnsSettings().dnsServers().get(0)); + Assertions.assertFalse(model.bypassSdnPolicies()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NetworkInterfacesUpdateProperties model = new NetworkInterfacesUpdateProperties() - .withNetworkSecurityGroup(new NetworkSecurityGroupArmReference().withId("vmezy")) - .withDnsSettings(new InterfaceDNSSettings() - .withDnsServers(Arrays.asList("mzsb", "zoggigrxwburvjxx", "nspydptkoenkoukn"))); + .withNetworkSecurityGroup(new NetworkSecurityGroupArmReference().withId("wzbhvgyugu")) + .withDnsSettings( + new InterfaceDNSSettings().withDnsServers(Arrays.asList("kfssxqukkf", "l", "mg", "xnkjzkdesl"))) + .withBypassSdnPolicies(false); model = BinaryData.fromObject(model).toObject(NetworkInterfacesUpdateProperties.class); - Assertions.assertEquals("vmezy", model.networkSecurityGroup().id()); - Assertions.assertEquals("mzsb", model.dnsSettings().dnsServers().get(0)); + Assertions.assertEquals("wzbhvgyugu", model.networkSecurityGroup().id()); + Assertions.assertEquals("kfssxqukkf", model.dnsSettings().dnsServers().get(0)); + Assertions.assertFalse(model.bypassSdnPolicies()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesUpdateRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesUpdateRequestTests.java index 555a99291002d..95c59a524f7a1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesUpdateRequestTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkInterfacesUpdateRequestTests.java @@ -18,24 +18,29 @@ public final class NetworkInterfacesUpdateRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkInterfacesUpdateRequest model = BinaryData.fromString( - "{\"tags\":{\"byao\":\"xieduugidyjrr\",\"xc\":\"v\",\"hocohslkev\":\"onpc\"},\"properties\":{\"networkSecurityGroup\":{\"id\":\"zfbuhf\"},\"dnsSettings\":{\"dnsServers\":[\"x\",\"ffeii\"]}}}") + "{\"tags\":{\"lqidyby\":\"tkcxywnytnrsy\",\"haaxdbabphl\":\"czfc\",\"yazttbtwwrqpue\":\"rqlfktsthsucocmn\",\"xibxujwbhqwalm\":\"ckzywbiexzfeyue\"},\"properties\":{\"networkSecurityGroup\":{\"id\":\"xaepdkzjancuxr\"},\"dnsSettings\":{\"dnsServers\":[\"avxbniwdjswztsdb\",\"gnxytxhpzxbz\",\"fzab\",\"lcuhxwtctyqiklb\"]},\"bypassSdnPolicies\":false}}") .toObject(NetworkInterfacesUpdateRequest.class); - Assertions.assertEquals("xieduugidyjrr", model.tags().get("byao")); - Assertions.assertEquals("zfbuhf", model.properties().networkSecurityGroup().id()); - Assertions.assertEquals("x", model.properties().dnsSettings().dnsServers().get(0)); + Assertions.assertEquals("tkcxywnytnrsy", model.tags().get("lqidyby")); + Assertions.assertEquals("xaepdkzjancuxr", model.properties().networkSecurityGroup().id()); + Assertions.assertEquals("avxbniwdjswztsdb", model.properties().dnsSettings().dnsServers().get(0)); + Assertions.assertFalse(model.properties().bypassSdnPolicies()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NetworkInterfacesUpdateRequest model = new NetworkInterfacesUpdateRequest() - .withTags(mapOf("byao", "xieduugidyjrr", "xc", "v", "hocohslkev", "onpc")) + .withTags(mapOf("lqidyby", "tkcxywnytnrsy", "haaxdbabphl", "czfc", "yazttbtwwrqpue", "rqlfktsthsucocmn", + "xibxujwbhqwalm", "ckzywbiexzfeyue")) .withProperties(new NetworkInterfacesUpdateProperties() - .withNetworkSecurityGroup(new NetworkSecurityGroupArmReference().withId("zfbuhf")) - .withDnsSettings(new InterfaceDNSSettings().withDnsServers(Arrays.asList("x", "ffeii")))); + .withNetworkSecurityGroup(new NetworkSecurityGroupArmReference().withId("xaepdkzjancuxr")) + .withDnsSettings(new InterfaceDNSSettings() + .withDnsServers(Arrays.asList("avxbniwdjswztsdb", "gnxytxhpzxbz", "fzab", "lcuhxwtctyqiklb"))) + .withBypassSdnPolicies(false)); model = BinaryData.fromObject(model).toObject(NetworkInterfacesUpdateRequest.class); - Assertions.assertEquals("xieduugidyjrr", model.tags().get("byao")); - Assertions.assertEquals("zfbuhf", model.properties().networkSecurityGroup().id()); - Assertions.assertEquals("x", model.properties().dnsSettings().dnsServers().get(0)); + Assertions.assertEquals("tkcxywnytnrsy", model.tags().get("lqidyby")); + Assertions.assertEquals("xaepdkzjancuxr", model.properties().networkSecurityGroup().id()); + Assertions.assertEquals("avxbniwdjswztsdb", model.properties().dnsSettings().dnsServers().get(0)); + Assertions.assertFalse(model.properties().bypassSdnPolicies()); } // Use "Map.of" if available diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkProfileUpdateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkProfileUpdateTests.java index 05557c067b5a5..02b6edb2e2b61 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkProfileUpdateTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkProfileUpdateTests.java @@ -13,16 +13,20 @@ public final class NetworkProfileUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NetworkProfileUpdate model = BinaryData.fromString("{\"networkInterfaces\":[{\"id\":\"pgcjefuzmuvp\"}]}") + NetworkProfileUpdate model = BinaryData.fromString( + "{\"networkInterfaces\":[{\"id\":\"imrzrtuzqog\"},{\"id\":\"xnevfdnwn\"},{\"id\":\"ewzsyyceuzsoib\"},{\"id\":\"dpfrxtrthzvaytdw\"}]}") .toObject(NetworkProfileUpdate.class); - Assertions.assertEquals("pgcjefuzmuvp", model.networkInterfaces().get(0).id()); + Assertions.assertEquals("imrzrtuzqog", model.networkInterfaces().get(0).id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NetworkProfileUpdate model = new NetworkProfileUpdate() - .withNetworkInterfaces(Arrays.asList(new NetworkInterfaceArmReference().withId("pgcjefuzmuvp"))); + .withNetworkInterfaces(Arrays.asList(new NetworkInterfaceArmReference().withId("imrzrtuzqog"), + new NetworkInterfaceArmReference().withId("xnevfdnwn"), + new NetworkInterfaceArmReference().withId("ewzsyyceuzsoib"), + new NetworkInterfaceArmReference().withId("dpfrxtrthzvaytdw"))); model = BinaryData.fromObject(model).toObject(NetworkProfileUpdate.class); - Assertions.assertEquals("pgcjefuzmuvp", model.networkInterfaces().get(0).id()); + Assertions.assertEquals("imrzrtuzqog", model.networkInterfaces().get(0).id()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupArmReferenceTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupArmReferenceTests.java index 3c0fa7b6e1100..b2b31aa49581b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupArmReferenceTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupArmReferenceTests.java @@ -12,14 +12,14 @@ public final class NetworkSecurityGroupArmReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityGroupArmReference model - = BinaryData.fromString("{\"id\":\"nohjt\"}").toObject(NetworkSecurityGroupArmReference.class); - Assertions.assertEquals("nohjt", model.id()); + = BinaryData.fromString("{\"id\":\"pyeicxm\"}").toObject(NetworkSecurityGroupArmReference.class); + Assertions.assertEquals("pyeicxm", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkSecurityGroupArmReference model = new NetworkSecurityGroupArmReference().withId("nohjt"); + NetworkSecurityGroupArmReference model = new NetworkSecurityGroupArmReference().withId("pyeicxm"); model = BinaryData.fromObject(model).toObject(NetworkSecurityGroupArmReference.class); - Assertions.assertEquals("nohjt", model.id()); + Assertions.assertEquals("pyeicxm", model.id()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupStatusProvisioningStatusTests.java index 10b2ba7349b22..8cf87670d270e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupStatusProvisioningStatusTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupStatusProvisioningStatusTests.java @@ -13,9 +13,9 @@ public final class NetworkSecurityGroupStatusProvisioningStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityGroupStatusProvisioningStatus model - = BinaryData.fromString("{\"operationId\":\"ihkaetcktvfc\",\"status\":\"Failed\"}") + = BinaryData.fromString("{\"operationId\":\"hckfrlhrx\",\"status\":\"InProgress\"}") .toObject(NetworkSecurityGroupStatusProvisioningStatus.class); - Assertions.assertEquals("ihkaetcktvfc", model.operationId()); - Assertions.assertEquals(Status.FAILED, model.status()); + Assertions.assertEquals("hckfrlhrx", model.operationId()); + Assertions.assertEquals(Status.IN_PROGRESS, model.status()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupTagsUpdateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupTagsUpdateTests.java index 98b2a83cb961f..0993f9c6387ba 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupTagsUpdateTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/NetworkSecurityGroupTagsUpdateTests.java @@ -13,19 +13,18 @@ public final class NetworkSecurityGroupTagsUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NetworkSecurityGroupTagsUpdate model = BinaryData.fromString( - "{\"tags\":{\"cxerf\":\"kymuctqhjfbebr\",\"phxepcyvahf\":\"wutttxfvjrbi\",\"gidokgjljyoxgvcl\":\"ljkyqxjvuuj\",\"jhtxfvgxbfsmxne\":\"bgsncghkjeszzhb\"}}") + NetworkSecurityGroupTagsUpdate model = BinaryData + .fromString("{\"tags\":{\"afkuwb\":\"pycanuzbpz\",\"ehhseyvjusrts\":\"rnwb\",\"mx\":\"hspkdeemao\"}}") .toObject(NetworkSecurityGroupTagsUpdate.class); - Assertions.assertEquals("kymuctqhjfbebr", model.tags().get("cxerf")); + Assertions.assertEquals("pycanuzbpz", model.tags().get("afkuwb")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkSecurityGroupTagsUpdate model - = new NetworkSecurityGroupTagsUpdate().withTags(mapOf("cxerf", "kymuctqhjfbebr", "phxepcyvahf", - "wutttxfvjrbi", "gidokgjljyoxgvcl", "ljkyqxjvuuj", "jhtxfvgxbfsmxne", "bgsncghkjeszzhb")); + NetworkSecurityGroupTagsUpdate model = new NetworkSecurityGroupTagsUpdate() + .withTags(mapOf("afkuwb", "pycanuzbpz", "ehhseyvjusrts", "rnwb", "mx", "hspkdeemao")); model = BinaryData.fromObject(model).toObject(NetworkSecurityGroupTagsUpdate.class); - Assertions.assertEquals("kymuctqhjfbebr", model.tags().get("cxerf")); + Assertions.assertEquals("pycanuzbpz", model.tags().get("afkuwb")); } // Use "Map.of" if available diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OperationDisplayTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OperationDisplayTests.java new file mode 100644 index 0000000000000..f27fe88d94855 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OperationDisplayTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.OperationDisplay; + +public final class OperationDisplayTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationDisplay model = BinaryData.fromString( + "{\"provider\":\"bhmfdnbz\",\"resource\":\"vfvfcj\",\"operation\":\"eoisrvhmgor\",\"description\":\"ukiscvwmzhw\"}") + .toObject(OperationDisplay.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OperationInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OperationInnerTests.java new file mode 100644 index 0000000000000..a2d4a6e149088 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OperationInnerTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.OperationInner; + +public final class OperationInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationInner model = BinaryData.fromString( + "{\"name\":\"ckh\",\"isDataAction\":false,\"display\":{\"provider\":\"fffwafqroudaspav\",\"resource\":\"hrv\",\"operation\":\"unzo\",\"description\":\"dhcxgkmoy\"},\"origin\":\"user\",\"actionType\":\"Internal\"}") + .toObject(OperationInner.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OperationListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OperationListResultTests.java new file mode 100644 index 0000000000000..4d693aa9fe04e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OperationListResultTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.implementation.models.OperationListResult; +import org.junit.jupiter.api.Assertions; + +public final class OperationListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationListResult model = BinaryData.fromString( + "{\"value\":[{\"name\":\"xhom\",\"isDataAction\":true,\"display\":{\"provider\":\"wdigumbnraauz\",\"resource\":\"tj\",\"operation\":\"ysdzhez\",\"description\":\"vaiqyuvvf\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"qyikvy\",\"isDataAction\":false,\"display\":{\"provider\":\"vluwmncsttij\",\"resource\":\"bvpoekrsgsgbdhu\",\"operation\":\"gnjdgkynscliqhz\",\"description\":\"xnkomtkubo\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"xz\",\"isDataAction\":true,\"display\":{\"provider\":\"rbbcevq\",\"resource\":\"tltdhlfkqojpy\",\"operation\":\"gtrd\",\"description\":\"ifmzzsd\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"suxmpraf\"}") + .toObject(OperationListResult.class); + Assertions.assertEquals("suxmpraf", model.nextLink()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OperationStepResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OperationStepResultTests.java new file mode 100644 index 0000000000000..bb00ab48c5dd4 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OperationStepResultTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.OperationStepResult; +import com.azure.resourcemanager.azurestackhci.vm.models.Status; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class OperationStepResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationStepResult model = BinaryData.fromString( + "{\"name\":\"wit\",\"status\":\"Succeeded\",\"message\":\"pyy\",\"completedTime\":\"2021-06-02T12:49:15Z\"}") + .toObject(OperationStepResult.class); + Assertions.assertEquals("wit", model.name()); + Assertions.assertEquals(Status.SUCCEEDED, model.status()); + Assertions.assertEquals("pyy", model.message()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-02T12:49:15Z"), model.completedTime()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OperationsListMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OperationsListMockTests.java new file mode 100644 index 0000000000000..5cddc9056e020 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OperationsListMockTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.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.azurestackhci.vm.AzureStackHciVmManager; +import com.azure.resourcemanager.azurestackhci.vm.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\":\"ukdqkkyihztg\",\"isDataAction\":true,\"display\":{\"provider\":\"zgwldoychillcec\",\"resource\":\"huwaoaguhic\",\"operation\":\"lizst\",\"description\":\"sjvh\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AzureStackHciVmManager manager = AzureStackHciVmManager.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/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OsProfileUpdateLinuxConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OsProfileUpdateLinuxConfigurationTests.java index e6e148c8faf71..5445a9c9180ae 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OsProfileUpdateLinuxConfigurationTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OsProfileUpdateLinuxConfigurationTests.java @@ -12,18 +12,18 @@ public final class OsProfileUpdateLinuxConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OsProfileUpdateLinuxConfiguration model - = BinaryData.fromString("{\"provisionVMAgent\":true,\"provisionVMConfigAgent\":true}") + = BinaryData.fromString("{\"provisionVMAgent\":true,\"provisionVMConfigAgent\":false}") .toObject(OsProfileUpdateLinuxConfiguration.class); Assertions.assertTrue(model.provisionVMAgent()); - Assertions.assertTrue(model.provisionVMConfigAgent()); + Assertions.assertFalse(model.provisionVMConfigAgent()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { OsProfileUpdateLinuxConfiguration model - = new OsProfileUpdateLinuxConfiguration().withProvisionVMAgent(true).withProvisionVMConfigAgent(true); + = new OsProfileUpdateLinuxConfiguration().withProvisionVMAgent(true).withProvisionVMConfigAgent(false); model = BinaryData.fromObject(model).toObject(OsProfileUpdateLinuxConfiguration.class); Assertions.assertTrue(model.provisionVMAgent()); - Assertions.assertTrue(model.provisionVMConfigAgent()); + Assertions.assertFalse(model.provisionVMConfigAgent()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OsProfileUpdateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OsProfileUpdateTests.java index b916bef521461..31396f0ae6f49 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OsProfileUpdateTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OsProfileUpdateTests.java @@ -14,27 +14,27 @@ public final class OsProfileUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OsProfileUpdate model = BinaryData.fromString( - "{\"computerName\":\"tdum\",\"linuxConfiguration\":{\"provisionVMAgent\":true,\"provisionVMConfigAgent\":true},\"windowsConfiguration\":{\"provisionVMAgent\":false,\"provisionVMConfigAgent\":true}}") + "{\"computerName\":\"brqubp\",\"linuxConfiguration\":{\"provisionVMAgent\":false,\"provisionVMConfigAgent\":true},\"windowsConfiguration\":{\"provisionVMAgent\":false,\"provisionVMConfigAgent\":false}}") .toObject(OsProfileUpdate.class); - Assertions.assertEquals("tdum", model.computerName()); - Assertions.assertTrue(model.linuxConfiguration().provisionVMAgent()); + Assertions.assertEquals("brqubp", model.computerName()); + Assertions.assertFalse(model.linuxConfiguration().provisionVMAgent()); Assertions.assertTrue(model.linuxConfiguration().provisionVMConfigAgent()); Assertions.assertFalse(model.windowsConfiguration().provisionVMAgent()); - Assertions.assertTrue(model.windowsConfiguration().provisionVMConfigAgent()); + Assertions.assertFalse(model.windowsConfiguration().provisionVMConfigAgent()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OsProfileUpdate model = new OsProfileUpdate().withComputerName("tdum") + OsProfileUpdate model = new OsProfileUpdate().withComputerName("brqubp") .withLinuxConfiguration( - new OsProfileUpdateLinuxConfiguration().withProvisionVMAgent(true).withProvisionVMConfigAgent(true)) - .withWindowsConfiguration( - new OsProfileUpdateWindowsConfiguration().withProvisionVMAgent(false).withProvisionVMConfigAgent(true)); + new OsProfileUpdateLinuxConfiguration().withProvisionVMAgent(false).withProvisionVMConfigAgent(true)) + .withWindowsConfiguration(new OsProfileUpdateWindowsConfiguration().withProvisionVMAgent(false) + .withProvisionVMConfigAgent(false)); model = BinaryData.fromObject(model).toObject(OsProfileUpdate.class); - Assertions.assertEquals("tdum", model.computerName()); - Assertions.assertTrue(model.linuxConfiguration().provisionVMAgent()); + Assertions.assertEquals("brqubp", model.computerName()); + Assertions.assertFalse(model.linuxConfiguration().provisionVMAgent()); Assertions.assertTrue(model.linuxConfiguration().provisionVMConfigAgent()); Assertions.assertFalse(model.windowsConfiguration().provisionVMAgent()); - Assertions.assertTrue(model.windowsConfiguration().provisionVMConfigAgent()); + Assertions.assertFalse(model.windowsConfiguration().provisionVMConfigAgent()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OsProfileUpdateWindowsConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OsProfileUpdateWindowsConfigurationTests.java index 66ab352d01394..dfc7bfdbb82fc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OsProfileUpdateWindowsConfigurationTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/OsProfileUpdateWindowsConfigurationTests.java @@ -12,18 +12,18 @@ public final class OsProfileUpdateWindowsConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OsProfileUpdateWindowsConfiguration model - = BinaryData.fromString("{\"provisionVMAgent\":false,\"provisionVMConfigAgent\":true}") + = BinaryData.fromString("{\"provisionVMAgent\":false,\"provisionVMConfigAgent\":false}") .toObject(OsProfileUpdateWindowsConfiguration.class); Assertions.assertFalse(model.provisionVMAgent()); - Assertions.assertTrue(model.provisionVMConfigAgent()); + Assertions.assertFalse(model.provisionVMConfigAgent()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { OsProfileUpdateWindowsConfiguration model - = new OsProfileUpdateWindowsConfiguration().withProvisionVMAgent(false).withProvisionVMConfigAgent(true); + = new OsProfileUpdateWindowsConfiguration().withProvisionVMAgent(false).withProvisionVMConfigAgent(false); model = BinaryData.fromObject(model).toObject(OsProfileUpdateWindowsConfiguration.class); Assertions.assertFalse(model.provisionVMAgent()); - Assertions.assertTrue(model.provisionVMConfigAgent()); + Assertions.assertFalse(model.provisionVMConfigAgent()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PowerOffVirtualMachineOptionsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PowerOffVirtualMachineOptionsTests.java new file mode 100644 index 0000000000000..589fb3c6ea048 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PowerOffVirtualMachineOptionsTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.PowerOffVirtualMachineOptions; +import org.junit.jupiter.api.Assertions; + +public final class PowerOffVirtualMachineOptionsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PowerOffVirtualMachineOptions model + = BinaryData.fromString("{\"skipShutdown\":false}").toObject(PowerOffVirtualMachineOptions.class); + Assertions.assertFalse(model.skipShutdown()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PowerOffVirtualMachineOptions model = new PowerOffVirtualMachineOptions().withSkipShutdown(false); + model = BinaryData.fromObject(model).toObject(PowerOffVirtualMachineOptions.class); + Assertions.assertFalse(model.skipShutdown()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ProbePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ProbePropertiesTests.java new file mode 100644 index 0000000000000..60d15078b44e8 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ProbePropertiesTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerProbeProtocol; +import com.azure.resourcemanager.azurestackhci.vm.models.ProbeProperties; +import org.junit.jupiter.api.Assertions; + +public final class ProbePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ProbeProperties model = BinaryData.fromString( + "{\"protocol\":\"Tcp\",\"port\":1838892910,\"requestPath\":\"wuxrkjpvdwxfzwi\",\"intervalInSeconds\":1157352083,\"numberOfProbes\":1754263967}") + .toObject(ProbeProperties.class); + Assertions.assertEquals(LoadBalancerProbeProtocol.TCP, model.protocol()); + Assertions.assertEquals(1838892910, model.port()); + Assertions.assertEquals("wuxrkjpvdwxfzwi", model.requestPath()); + Assertions.assertEquals(1157352083, model.intervalInSeconds()); + Assertions.assertEquals(1754263967, model.numberOfProbes()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ProbeProperties model = new ProbeProperties().withProtocol(LoadBalancerProbeProtocol.TCP) + .withPort(1838892910) + .withRequestPath("wuxrkjpvdwxfzwi") + .withIntervalInSeconds(1157352083) + .withNumberOfProbes(1754263967); + model = BinaryData.fromObject(model).toObject(ProbeProperties.class); + Assertions.assertEquals(LoadBalancerProbeProtocol.TCP, model.protocol()); + Assertions.assertEquals(1838892910, model.port()); + Assertions.assertEquals("wuxrkjpvdwxfzwi", model.requestPath()); + Assertions.assertEquals(1157352083, model.intervalInSeconds()); + Assertions.assertEquals(1754263967, model.numberOfProbes()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ProbeTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ProbeTests.java new file mode 100644 index 0000000000000..05e548aaa64bf --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/ProbeTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.LoadBalancerProbeProtocol; +import com.azure.resourcemanager.azurestackhci.vm.models.Probe; +import com.azure.resourcemanager.azurestackhci.vm.models.ProbeProperties; +import org.junit.jupiter.api.Assertions; + +public final class ProbeTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Probe model = BinaryData.fromString( + "{\"name\":\"uajlyj\",\"properties\":{\"protocol\":\"Http\",\"port\":21548435,\"requestPath\":\"fqzhv\",\"intervalInSeconds\":1580266173,\"numberOfProbes\":595342906}}") + .toObject(Probe.class); + Assertions.assertEquals("uajlyj", model.name()); + Assertions.assertEquals(LoadBalancerProbeProtocol.HTTP, model.properties().protocol()); + Assertions.assertEquals(21548435, model.properties().port()); + Assertions.assertEquals("fqzhv", model.properties().requestPath()); + Assertions.assertEquals(1580266173, model.properties().intervalInSeconds()); + Assertions.assertEquals(595342906, model.properties().numberOfProbes()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Probe model = new Probe().withName("uajlyj") + .withProperties(new ProbeProperties().withProtocol(LoadBalancerProbeProtocol.HTTP) + .withPort(21548435) + .withRequestPath("fqzhv") + .withIntervalInSeconds(1580266173) + .withNumberOfProbes(595342906)); + model = BinaryData.fromObject(model).toObject(Probe.class); + Assertions.assertEquals("uajlyj", model.name()); + Assertions.assertEquals(LoadBalancerProbeProtocol.HTTP, model.properties().protocol()); + Assertions.assertEquals(21548435, model.properties().port()); + Assertions.assertEquals("fqzhv", model.properties().requestPath()); + Assertions.assertEquals(1580266173, model.properties().intervalInSeconds()); + Assertions.assertEquals(595342906, model.properties().numberOfProbes()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressArmReferenceTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressArmReferenceTests.java new file mode 100644 index 0000000000000..af45a70b463fc --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressArmReferenceTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressArmReference; +import org.junit.jupiter.api.Assertions; + +public final class PublicIPAddressArmReferenceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PublicIPAddressArmReference model + = BinaryData.fromString("{\"resourceId\":\"ojujbyp\"}").toObject(PublicIPAddressArmReference.class); + Assertions.assertEquals("ojujbyp", model.resourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PublicIPAddressArmReference model = new PublicIPAddressArmReference().withResourceId("ojujbyp"); + model = BinaryData.fromObject(model).toObject(PublicIPAddressArmReference.class); + Assertions.assertEquals("ojujbyp", model.resourceId()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressInnerTests.java new file mode 100644 index 0000000000000..5c027fdf73a48 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressInnerTests.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.fluent.models.PublicIPAddressInner; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressType; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class PublicIPAddressInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PublicIPAddressInner model = BinaryData.fromString( + "{\"properties\":{\"publicIPAddressVersion\":\"IPv6\",\"ipAllocationScope\":\"vkay\",\"ipAddress\":\"tnvyqiatkzwp\",\"ipConfiguration\":{\"resourceId\":\"wzcjaesgvvsccy\"},\"natGateway\":{\"resourceId\":\"uq\"},\"provisioningState\":\"Accepted\"},\"extendedLocation\":{\"name\":\"zlvdnkfxusemdw\",\"type\":\"CustomLocation\"},\"location\":\"hapfcqdpsqx\",\"tags\":{\"mgccelvezrypq\":\"svuo\",\"kerqwkyh\":\"mfe\",\"pg\":\"ob\"},\"id\":\"edkowepbqpcrfk\",\"name\":\"wccsnjvcdwxlpqek\",\"type\":\"tn\"}") + .toObject(PublicIPAddressInner.class); + Assertions.assertEquals("hapfcqdpsqx", model.location()); + Assertions.assertEquals("svuo", model.tags().get("mgccelvezrypq")); + Assertions.assertEquals(PublicIPAddressType.IPV6, model.properties().publicIPAddressVersion()); + Assertions.assertEquals("vkay", model.properties().ipAllocationScope()); + Assertions.assertEquals("tnvyqiatkzwp", model.properties().ipAddress()); + Assertions.assertEquals("zlvdnkfxusemdw", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.extendedLocation().type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PublicIPAddressInner model = new PublicIPAddressInner().withLocation("hapfcqdpsqx") + .withTags(mapOf("mgccelvezrypq", "svuo", "kerqwkyh", "mfe", "pg", "ob")) + .withProperties(new PublicIPAddressProperties().withPublicIPAddressVersion(PublicIPAddressType.IPV6) + .withIpAllocationScope("vkay") + .withIpAddress("tnvyqiatkzwp")) + .withExtendedLocation( + new ExtendedLocation().withName("zlvdnkfxusemdw").withType(ExtendedLocationTypes.CUSTOM_LOCATION)); + model = BinaryData.fromObject(model).toObject(PublicIPAddressInner.class); + Assertions.assertEquals("hapfcqdpsqx", model.location()); + Assertions.assertEquals("svuo", model.tags().get("mgccelvezrypq")); + Assertions.assertEquals(PublicIPAddressType.IPV6, model.properties().publicIPAddressVersion()); + Assertions.assertEquals("vkay", model.properties().ipAllocationScope()); + Assertions.assertEquals("tnvyqiatkzwp", model.properties().ipAddress()); + Assertions.assertEquals("zlvdnkfxusemdw", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.extendedLocation().type()); + } + + // 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/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressListResultTests.java new file mode 100644 index 0000000000000..ae4b72cd3ce32 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressListResultTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.implementation.models.PublicIPAddressListResult; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressType; +import org.junit.jupiter.api.Assertions; + +public final class PublicIPAddressListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PublicIPAddressListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"publicIPAddressVersion\":\"IPv4\",\"ipAllocationScope\":\"vyhgs\",\"ipAddress\":\"byrqufeg\",\"ipConfiguration\":{\"resourceId\":\"wz\"},\"natGateway\":{\"resourceId\":\"hlmctlpdngitvgb\"},\"provisioningState\":\"Accepted\"},\"extendedLocation\":{\"name\":\"kw\",\"type\":\"CustomLocation\"},\"location\":\"ejvegrhbpnaixex\",\"tags\":{\"exdrrvqahqkg\":\"dreaxh\"},\"id\":\"tpwijnh\",\"name\":\"jsvfycxzbfvoowv\",\"type\":\"vmtgjqppy\"},{\"properties\":{\"publicIPAddressVersion\":\"IPv6\",\"ipAllocationScope\":\"nzm\",\"ipAddress\":\"gfipnsxk\",\"ipConfiguration\":{\"resourceId\":\"a\"},\"natGateway\":{\"resourceId\":\"rjreafxts\"},\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"name\":\"glikkxwslolb\",\"type\":\"CustomLocation\"},\"location\":\"zlmvfelfktgp\",\"tags\":{\"igbrnjw\":\"pwjxezn\"},\"id\":\"wkpnbsaz\",\"name\":\"jjoqkagf\",\"type\":\"sxtta\"}],\"nextLink\":\"zxnfaaz\"}") + .toObject(PublicIPAddressListResult.class); + Assertions.assertEquals("ejvegrhbpnaixex", model.value().get(0).location()); + Assertions.assertEquals("dreaxh", model.value().get(0).tags().get("exdrrvqahqkg")); + Assertions.assertEquals(PublicIPAddressType.IPV4, model.value().get(0).properties().publicIPAddressVersion()); + Assertions.assertEquals("vyhgs", model.value().get(0).properties().ipAllocationScope()); + Assertions.assertEquals("byrqufeg", model.value().get(0).properties().ipAddress()); + Assertions.assertEquals("kw", model.value().get(0).extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); + Assertions.assertEquals("zxnfaaz", model.nextLink()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressPropertiesTests.java new file mode 100644 index 0000000000000..75dbce9cc890a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressPropertiesTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressType; +import org.junit.jupiter.api.Assertions; + +public final class PublicIPAddressPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PublicIPAddressProperties model = BinaryData.fromString( + "{\"publicIPAddressVersion\":\"IPv4\",\"ipAllocationScope\":\"syingwfqatmtdht\",\"ipAddress\":\"vypgikdg\",\"ipConfiguration\":{\"resourceId\":\"w\"},\"natGateway\":{\"resourceId\":\"rryuzhlhkjo\"},\"provisioningState\":\"Accepted\"}") + .toObject(PublicIPAddressProperties.class); + Assertions.assertEquals(PublicIPAddressType.IPV4, model.publicIPAddressVersion()); + Assertions.assertEquals("syingwfqatmtdht", model.ipAllocationScope()); + Assertions.assertEquals("vypgikdg", model.ipAddress()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PublicIPAddressProperties model + = new PublicIPAddressProperties().withPublicIPAddressVersion(PublicIPAddressType.IPV4) + .withIpAllocationScope("syingwfqatmtdht") + .withIpAddress("vypgikdg"); + model = BinaryData.fromObject(model).toObject(PublicIPAddressProperties.class); + Assertions.assertEquals(PublicIPAddressType.IPV4, model.publicIPAddressVersion()); + Assertions.assertEquals("syingwfqatmtdht", model.ipAllocationScope()); + Assertions.assertEquals("vypgikdg", model.ipAddress()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressTagsUpdateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressTagsUpdateTests.java new file mode 100644 index 0000000000000..5241db897b196 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressTagsUpdateTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressTagsUpdate; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class PublicIPAddressTagsUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PublicIPAddressTagsUpdate model + = BinaryData.fromString("{\"tags\":{\"bfggjioolvr\":\"pmfi\",\"v\":\"x\",\"wjygvjayvblmhvk\":\"kkgll\"}}") + .toObject(PublicIPAddressTagsUpdate.class); + Assertions.assertEquals("pmfi", model.tags().get("bfggjioolvr")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PublicIPAddressTagsUpdate model = new PublicIPAddressTagsUpdate() + .withTags(mapOf("bfggjioolvr", "pmfi", "v", "x", "wjygvjayvblmhvk", "kkgll")); + model = BinaryData.fromObject(model).toObject(PublicIPAddressTagsUpdate.class); + Assertions.assertEquals("pmfi", model.tags().get("bfggjioolvr")); + } + + // 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/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesCreateOrUpdateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesCreateOrUpdateMockTests.java new file mode 100644 index 0000000000000..efa10b6050cc3 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesCreateOrUpdateMockTests.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddress; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressType; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PublicIPAddressesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"publicIPAddressVersion\":\"IPv6\",\"ipAllocationScope\":\"eofiz\",\"ipAddress\":\"jfnmjmvlwyz\",\"ipConfiguration\":{\"resourceId\":\"lkujrllfojui\"},\"natGateway\":{\"resourceId\":\"uuyjucejikz\"},\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"name\":\"tzejetjklnt\",\"type\":\"CustomLocation\"},\"location\":\"uzk\",\"tags\":{\"tgvgzp\":\"zolxrzvhqjwtr\",\"wro\":\"rrkolawjmjs\",\"guyn\":\"cdxfzzzwyjafitl\"},\"id\":\"chl\",\"name\":\"mltx\",\"type\":\"whmozusgzvlnsnnj\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AzureStackHciVmManager manager = AzureStackHciVmManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PublicIPAddress response = manager.publicIPAddresses() + .define("mykyujxsglhs") + .withRegion("pzdqtvhcspod") + .withExistingResourceGroup("jk") + .withTags(mapOf("ietgbebjfu", "xsi", "pnfpubntnbat", "bmoichd", "uhplrvkmjcwmjv", "viqsowsaaelcattc")) + .withProperties(new PublicIPAddressProperties().withPublicIPAddressVersion(PublicIPAddressType.IPV6) + .withIpAllocationScope("jylmbkzudnigr") + .withIpAddress("hotj")) + .withExtendedLocation( + new ExtendedLocation().withName("kydiwf").withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .create(); + + Assertions.assertEquals("uzk", response.location()); + Assertions.assertEquals("zolxrzvhqjwtr", response.tags().get("tgvgzp")); + Assertions.assertEquals(PublicIPAddressType.IPV6, response.properties().publicIPAddressVersion()); + Assertions.assertEquals("eofiz", response.properties().ipAllocationScope()); + Assertions.assertEquals("jfnmjmvlwyz", response.properties().ipAddress()); + Assertions.assertEquals("tzejetjklnt", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.extendedLocation().type()); + } + + // 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/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesGetByResourceGroupWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesGetByResourceGroupWithResponseMockTests.java new file mode 100644 index 0000000000000..522eb85fa477b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesGetByResourceGroupWithResponseMockTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.azurestackhci.vm.AzureStackHciVmManager; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddress; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressType; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PublicIPAddressesGetByResourceGroupWithResponseMockTests { + @Test + public void testGetByResourceGroupWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"publicIPAddressVersion\":\"IPv6\",\"ipAllocationScope\":\"bzxliohrdddtfgxq\",\"ipAddress\":\"wpcbbnzqcy\",\"ipConfiguration\":{\"resourceId\":\"p\"},\"natGateway\":{\"resourceId\":\"yuicdhzbdy\"},\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"name\":\"d\",\"type\":\"CustomLocation\"},\"location\":\"dmhm\",\"tags\":{\"yoxoy\":\"plfmuvapckccrrvw\"},\"id\":\"ukphaimmoiroq\",\"name\":\"oshbragapyy\",\"type\":\"mfsvbpav\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AzureStackHciVmManager manager = AzureStackHciVmManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PublicIPAddress response = manager.publicIPAddresses() + .getByResourceGroupWithResponse("lobdxna", "pmkmlmvevfx", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("dmhm", response.location()); + Assertions.assertEquals("plfmuvapckccrrvw", response.tags().get("yoxoy")); + Assertions.assertEquals(PublicIPAddressType.IPV6, response.properties().publicIPAddressVersion()); + Assertions.assertEquals("bzxliohrdddtfgxq", response.properties().ipAllocationScope()); + Assertions.assertEquals("wpcbbnzqcy", response.properties().ipAddress()); + Assertions.assertEquals("d", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.extendedLocation().type()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesListByResourceGroupMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesListByResourceGroupMockTests.java new file mode 100644 index 0000000000000..65f941efba6ad --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesListByResourceGroupMockTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.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.azurestackhci.vm.AzureStackHciVmManager; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddress; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressType; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PublicIPAddressesListByResourceGroupMockTests { + @Test + public void testListByResourceGroup() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"publicIPAddressVersion\":\"IPv4\",\"ipAllocationScope\":\"sjcaacfdmmcpugm\",\"ipAddress\":\"qepvufhbzeh\",\"ipConfiguration\":{\"resourceId\":\"oqhnlb\"},\"natGateway\":{\"resourceId\":\"ldxea\"},\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"name\":\"horimkr\",\"type\":\"CustomLocation\"},\"location\":\"oucs\",\"tags\":{\"aabeolhbhlvbmxuq\":\"dpuviyf\",\"owlkjxnqpv\":\"bsxtkcudfbsfarfs\"},\"id\":\"gf\",\"name\":\"tmhqykiz\",\"type\":\"d\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AzureStackHciVmManager manager = AzureStackHciVmManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.publicIPAddresses().listByResourceGroup("opfppdbwnupgah", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("oucs", response.iterator().next().location()); + Assertions.assertEquals("dpuviyf", response.iterator().next().tags().get("aabeolhbhlvbmxuq")); + Assertions.assertEquals(PublicIPAddressType.IPV4, + response.iterator().next().properties().publicIPAddressVersion()); + Assertions.assertEquals("sjcaacfdmmcpugm", response.iterator().next().properties().ipAllocationScope()); + Assertions.assertEquals("qepvufhbzeh", response.iterator().next().properties().ipAddress()); + Assertions.assertEquals("horimkr", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, + response.iterator().next().extendedLocation().type()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesListMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesListMockTests.java new file mode 100644 index 0000000000000..c1d0e6d0c5ac9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/PublicIPAddressesListMockTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.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.azurestackhci.vm.AzureStackHciVmManager; +import com.azure.resourcemanager.azurestackhci.vm.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddress; +import com.azure.resourcemanager.azurestackhci.vm.models.PublicIPAddressType; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PublicIPAddressesListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"publicIPAddressVersion\":\"IPv6\",\"ipAllocationScope\":\"fcluqvo\",\"ipAddress\":\"ycjimryvwgcwwpbm\",\"ipConfiguration\":{\"resourceId\":\"esyds\"},\"natGateway\":{\"resourceId\":\"fo\"},\"provisioningState\":\"InProgress\"},\"extendedLocation\":{\"name\":\"opwndyqleallk\",\"type\":\"CustomLocation\"},\"location\":\"hlowkx\",\"tags\":{\"fjmzsyzfho\":\"br\",\"pjrtws\":\"lhikcyychunsj\",\"uic\":\"hv\",\"ubhvj\":\"hvtrrmhwrbfdpyf\"},\"id\":\"lrocuyzlwh\",\"name\":\"memhooclutnpq\",\"type\":\"emc\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + AzureStackHciVmManager manager = AzureStackHciVmManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.publicIPAddresses().list(com.azure.core.util.Context.NONE); + + Assertions.assertEquals("hlowkx", response.iterator().next().location()); + Assertions.assertEquals("br", response.iterator().next().tags().get("fjmzsyzfho")); + Assertions.assertEquals(PublicIPAddressType.IPV6, + response.iterator().next().properties().publicIPAddressVersion()); + Assertions.assertEquals("fcluqvo", response.iterator().next().properties().ipAllocationScope()); + Assertions.assertEquals("ycjimryvwgcwwpbm", response.iterator().next().properties().ipAddress()); + Assertions.assertEquals("opwndyqleallk", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, + response.iterator().next().extendedLocation().type()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/RoutePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/RoutePropertiesTests.java index f770b3e611c2b..e9ff76ed1d564 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/RoutePropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/RoutePropertiesTests.java @@ -11,18 +11,17 @@ public final class RoutePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RouteProperties model - = BinaryData.fromString("{\"addressPrefix\":\"ijcoejctb\",\"nextHopIpAddress\":\"qsqsy\"}") - .toObject(RouteProperties.class); - Assertions.assertEquals("ijcoejctb", model.addressPrefix()); - Assertions.assertEquals("qsqsy", model.nextHopIpAddress()); + RouteProperties model = BinaryData.fromString("{\"addressPrefix\":\"evgbmqjq\",\"nextHopIpAddress\":\"c\"}") + .toObject(RouteProperties.class); + Assertions.assertEquals("evgbmqjq", model.addressPrefix()); + Assertions.assertEquals("c", model.nextHopIpAddress()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RouteProperties model = new RouteProperties().withAddressPrefix("ijcoejctb").withNextHopIpAddress("qsqsy"); + RouteProperties model = new RouteProperties().withAddressPrefix("evgbmqjq").withNextHopIpAddress("c"); model = BinaryData.fromObject(model).toObject(RouteProperties.class); - Assertions.assertEquals("ijcoejctb", model.addressPrefix()); - Assertions.assertEquals("qsqsy", model.nextHopIpAddress()); + Assertions.assertEquals("evgbmqjq", model.addressPrefix()); + Assertions.assertEquals("c", model.nextHopIpAddress()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/RouteTablePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/RouteTablePropertiesTests.java index 7542527509acb..21904f00175f2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/RouteTablePropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/RouteTablePropertiesTests.java @@ -14,23 +14,21 @@ public final class RouteTablePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RouteTableProperties model = BinaryData.fromString( - "{\"routes\":[{\"properties\":{\"addressPrefix\":\"qcjm\",\"nextHopIpAddress\":\"javbqidtqajz\"},\"name\":\"l\"},{\"properties\":{\"addressPrefix\":\"dj\",\"nextHopIpAddress\":\"lkhbz\"},\"name\":\"epgzgqexz\"},{\"properties\":{\"addressPrefix\":\"xscpaierhhbc\",\"nextHopIpAddress\":\"l\"},\"name\":\"majtjaod\"},{\"properties\":{\"addressPrefix\":\"nbdxk\",\"nextHopIpAddress\":\"xo\"},\"name\":\"jionpimexgstxgc\"}]}") + "{\"routes\":[{\"properties\":{\"addressPrefix\":\"vqdra\",\"nextHopIpAddress\":\"jybige\"},\"name\":\"qfbow\"},{\"properties\":{\"addressPrefix\":\"nyktzlcuiy\",\"nextHopIpAddress\":\"qyw\"},\"name\":\"drvyn\"}]}") .toObject(RouteTableProperties.class); - Assertions.assertEquals("l", model.routes().get(0).name()); - Assertions.assertEquals("qcjm", model.routes().get(0).addressPrefix()); - Assertions.assertEquals("javbqidtqajz", model.routes().get(0).nextHopIpAddress()); + Assertions.assertEquals("qfbow", model.routes().get(0).name()); + Assertions.assertEquals("vqdra", model.routes().get(0).addressPrefix()); + Assertions.assertEquals("jybige", model.routes().get(0).nextHopIpAddress()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RouteTableProperties model = new RouteTableProperties().withRoutes( - Arrays.asList(new Route().withName("l").withAddressPrefix("qcjm").withNextHopIpAddress("javbqidtqajz"), - new Route().withName("epgzgqexz").withAddressPrefix("dj").withNextHopIpAddress("lkhbz"), - new Route().withName("majtjaod").withAddressPrefix("xscpaierhhbc").withNextHopIpAddress("l"), - new Route().withName("jionpimexgstxgc").withAddressPrefix("nbdxk").withNextHopIpAddress("xo"))); + Arrays.asList(new Route().withName("qfbow").withAddressPrefix("vqdra").withNextHopIpAddress("jybige"), + new Route().withName("drvyn").withAddressPrefix("nyktzlcuiy").withNextHopIpAddress("qyw"))); model = BinaryData.fromObject(model).toObject(RouteTableProperties.class); - Assertions.assertEquals("l", model.routes().get(0).name()); - Assertions.assertEquals("qcjm", model.routes().get(0).addressPrefix()); - Assertions.assertEquals("javbqidtqajz", model.routes().get(0).nextHopIpAddress()); + Assertions.assertEquals("qfbow", model.routes().get(0).name()); + Assertions.assertEquals("vqdra", model.routes().get(0).addressPrefix()); + Assertions.assertEquals("jybige", model.routes().get(0).nextHopIpAddress()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/RouteTableTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/RouteTableTests.java index 09c77f9d429c4..0da63878469b5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/RouteTableTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/RouteTableTests.java @@ -14,20 +14,21 @@ public final class RouteTableTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RouteTable model = BinaryData.fromString( - "{\"etag\":\"whdsoifiyip\",\"name\":\"sqwpgrjb\",\"type\":\"orcjxvsnby\",\"properties\":{\"routes\":[{\"properties\":{\"addressPrefix\":\"ocpcy\",\"nextHopIpAddress\":\"urzafb\"},\"name\":\"j\"}]}}") + "{\"etag\":\"iwqvhkh\",\"name\":\"uigdtopbobjog\",\"type\":\"e\",\"properties\":{\"routes\":[{\"properties\":{\"addressPrefix\":\"hrzayvvtpgvdf\",\"nextHopIpAddress\":\"otkftutqxlngx\"},\"name\":\"fgugnxkrxdqmid\"}]}}") .toObject(RouteTable.class); - Assertions.assertEquals("j", model.routes().get(0).name()); - Assertions.assertEquals("ocpcy", model.routes().get(0).addressPrefix()); - Assertions.assertEquals("urzafb", model.routes().get(0).nextHopIpAddress()); + Assertions.assertEquals("fgugnxkrxdqmid", model.routes().get(0).name()); + Assertions.assertEquals("hrzayvvtpgvdf", model.routes().get(0).addressPrefix()); + Assertions.assertEquals("otkftutqxlngx", model.routes().get(0).nextHopIpAddress()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RouteTable model = new RouteTable().withRoutes( - Arrays.asList(new Route().withName("j").withAddressPrefix("ocpcy").withNextHopIpAddress("urzafb"))); + RouteTable model = new RouteTable().withRoutes(Arrays.asList(new Route().withName("fgugnxkrxdqmid") + .withAddressPrefix("hrzayvvtpgvdf") + .withNextHopIpAddress("otkftutqxlngx"))); model = BinaryData.fromObject(model).toObject(RouteTable.class); - Assertions.assertEquals("j", model.routes().get(0).name()); - Assertions.assertEquals("ocpcy", model.routes().get(0).addressPrefix()); - Assertions.assertEquals("urzafb", model.routes().get(0).nextHopIpAddress()); + Assertions.assertEquals("fgugnxkrxdqmid", model.routes().get(0).name()); + Assertions.assertEquals("hrzayvvtpgvdf", model.routes().get(0).addressPrefix()); + Assertions.assertEquals("otkftutqxlngx", model.routes().get(0).nextHopIpAddress()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/RouteTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/RouteTests.java index 18c71e830c84f..117ab35a81ba9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/RouteTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/RouteTests.java @@ -13,19 +13,19 @@ public final class RouteTests { public void testDeserialize() throws Exception { Route model = BinaryData .fromString( - "{\"properties\":{\"addressPrefix\":\"gmaajrm\",\"nextHopIpAddress\":\"jwzrl\"},\"name\":\"mcl\"}") + "{\"properties\":{\"addressPrefix\":\"pphrcgynco\",\"nextHopIpAddress\":\"ecfvmm\"},\"name\":\"ofsx\"}") .toObject(Route.class); - Assertions.assertEquals("mcl", model.name()); - Assertions.assertEquals("gmaajrm", model.addressPrefix()); - Assertions.assertEquals("jwzrl", model.nextHopIpAddress()); + Assertions.assertEquals("ofsx", model.name()); + Assertions.assertEquals("pphrcgynco", model.addressPrefix()); + Assertions.assertEquals("ecfvmm", model.nextHopIpAddress()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Route model = new Route().withName("mcl").withAddressPrefix("gmaajrm").withNextHopIpAddress("jwzrl"); + Route model = new Route().withName("ofsx").withAddressPrefix("pphrcgynco").withNextHopIpAddress("ecfvmm"); model = BinaryData.fromObject(model).toObject(Route.class); - Assertions.assertEquals("mcl", model.name()); - Assertions.assertEquals("gmaajrm", model.addressPrefix()); - Assertions.assertEquals("jwzrl", model.nextHopIpAddress()); + Assertions.assertEquals("ofsx", model.name()); + Assertions.assertEquals("pphrcgynco", model.addressPrefix()); + Assertions.assertEquals("ecfvmm", model.nextHopIpAddress()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRuleInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRuleInnerTests.java index f23a9f85bed6d..3fff2a94256d7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRuleInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRuleInnerTests.java @@ -19,46 +19,46 @@ public final class SecurityRuleInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SecurityRuleInner model = BinaryData.fromString( - "{\"properties\":{\"description\":\"ahmgkbrp\",\"protocol\":\"Tcp\",\"sourceAddressPrefixes\":[\"ibnuqqkpik\",\"drgvtqagn\",\"uynhijg\"],\"destinationAddressPrefixes\":[\"bfs\"],\"sourcePortRanges\":[\"butr\"],\"destinationPortRanges\":[\"na\",\"zmhjrunmp\"],\"access\":\"Deny\",\"priority\":18555434,\"direction\":\"Outbound\",\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"name\":\"nlankxmyskpb\",\"type\":\"CustomLocation\"},\"id\":\"tkcxywnytnrsy\",\"name\":\"lqidyby\",\"type\":\"czfc\"}") + "{\"properties\":{\"description\":\"vxpvgomz\",\"protocol\":\"Udp\",\"sourceAddressPrefixes\":[\"sgwbnbbeld\",\"wkz\",\"ali\",\"urqhaka\"],\"destinationAddressPrefixes\":[\"shsfwxosowzxcu\",\"i\",\"jooxdjebw\"],\"sourcePortRanges\":[\"wwfvov\",\"vmeueci\",\"yhz\"],\"destinationPortRanges\":[\"ojgjrwjueiotwmc\",\"ytdxwit\"],\"access\":\"Deny\",\"priority\":1070997174,\"direction\":\"Inbound\",\"provisioningState\":\"Deleting\"},\"extendedLocation\":{\"name\":\"wgxhn\",\"type\":\"CustomLocation\"},\"id\":\"fbkp\",\"name\":\"cg\",\"type\":\"lwn\"}") .toObject(SecurityRuleInner.class); - Assertions.assertEquals("ahmgkbrp", model.properties().description()); - Assertions.assertEquals(SecurityRuleProtocol.TCP, model.properties().protocol()); - Assertions.assertEquals("ibnuqqkpik", model.properties().sourceAddressPrefixes().get(0)); - Assertions.assertEquals("bfs", model.properties().destinationAddressPrefixes().get(0)); - Assertions.assertEquals("butr", model.properties().sourcePortRanges().get(0)); - Assertions.assertEquals("na", model.properties().destinationPortRanges().get(0)); + Assertions.assertEquals("vxpvgomz", model.properties().description()); + Assertions.assertEquals(SecurityRuleProtocol.UDP, model.properties().protocol()); + Assertions.assertEquals("sgwbnbbeld", model.properties().sourceAddressPrefixes().get(0)); + Assertions.assertEquals("shsfwxosowzxcu", model.properties().destinationAddressPrefixes().get(0)); + Assertions.assertEquals("wwfvov", model.properties().sourcePortRanges().get(0)); + Assertions.assertEquals("ojgjrwjueiotwmc", model.properties().destinationPortRanges().get(0)); Assertions.assertEquals(SecurityRuleAccess.DENY, model.properties().access()); - Assertions.assertEquals(18555434, model.properties().priority()); - Assertions.assertEquals(SecurityRuleDirection.OUTBOUND, model.properties().direction()); - Assertions.assertEquals("nlankxmyskpb", model.extendedLocation().name()); + Assertions.assertEquals(1070997174, model.properties().priority()); + Assertions.assertEquals(SecurityRuleDirection.INBOUND, model.properties().direction()); + Assertions.assertEquals("wgxhn", model.extendedLocation().name()); Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.extendedLocation().type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SecurityRuleInner model = new SecurityRuleInner() - .withProperties(new SecurityRuleProperties().withDescription("ahmgkbrp") - .withProtocol(SecurityRuleProtocol.TCP) - .withSourceAddressPrefixes(Arrays.asList("ibnuqqkpik", "drgvtqagn", "uynhijg")) - .withDestinationAddressPrefixes(Arrays.asList("bfs")) - .withSourcePortRanges(Arrays.asList("butr")) - .withDestinationPortRanges(Arrays.asList("na", "zmhjrunmp")) + .withProperties(new SecurityRuleProperties().withDescription("vxpvgomz") + .withProtocol(SecurityRuleProtocol.UDP) + .withSourceAddressPrefixes(Arrays.asList("sgwbnbbeld", "wkz", "ali", "urqhaka")) + .withDestinationAddressPrefixes(Arrays.asList("shsfwxosowzxcu", "i", "jooxdjebw")) + .withSourcePortRanges(Arrays.asList("wwfvov", "vmeueci", "yhz")) + .withDestinationPortRanges(Arrays.asList("ojgjrwjueiotwmc", "ytdxwit")) .withAccess(SecurityRuleAccess.DENY) - .withPriority(18555434) - .withDirection(SecurityRuleDirection.OUTBOUND)) + .withPriority(1070997174) + .withDirection(SecurityRuleDirection.INBOUND)) .withExtendedLocation( - new ExtendedLocation().withName("nlankxmyskpb").withType(ExtendedLocationTypes.CUSTOM_LOCATION)); + new ExtendedLocation().withName("wgxhn").withType(ExtendedLocationTypes.CUSTOM_LOCATION)); model = BinaryData.fromObject(model).toObject(SecurityRuleInner.class); - Assertions.assertEquals("ahmgkbrp", model.properties().description()); - Assertions.assertEquals(SecurityRuleProtocol.TCP, model.properties().protocol()); - Assertions.assertEquals("ibnuqqkpik", model.properties().sourceAddressPrefixes().get(0)); - Assertions.assertEquals("bfs", model.properties().destinationAddressPrefixes().get(0)); - Assertions.assertEquals("butr", model.properties().sourcePortRanges().get(0)); - Assertions.assertEquals("na", model.properties().destinationPortRanges().get(0)); + Assertions.assertEquals("vxpvgomz", model.properties().description()); + Assertions.assertEquals(SecurityRuleProtocol.UDP, model.properties().protocol()); + Assertions.assertEquals("sgwbnbbeld", model.properties().sourceAddressPrefixes().get(0)); + Assertions.assertEquals("shsfwxosowzxcu", model.properties().destinationAddressPrefixes().get(0)); + Assertions.assertEquals("wwfvov", model.properties().sourcePortRanges().get(0)); + Assertions.assertEquals("ojgjrwjueiotwmc", model.properties().destinationPortRanges().get(0)); Assertions.assertEquals(SecurityRuleAccess.DENY, model.properties().access()); - Assertions.assertEquals(18555434, model.properties().priority()); - Assertions.assertEquals(SecurityRuleDirection.OUTBOUND, model.properties().direction()); - Assertions.assertEquals("nlankxmyskpb", model.extendedLocation().name()); + Assertions.assertEquals(1070997174, model.properties().priority()); + Assertions.assertEquals(SecurityRuleDirection.INBOUND, model.properties().direction()); + Assertions.assertEquals("wgxhn", model.extendedLocation().name()); Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.extendedLocation().type()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRuleListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRuleListResultTests.java index 6db77cf7289d1..855b7e554fefd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRuleListResultTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRuleListResultTests.java @@ -16,20 +16,19 @@ public final class SecurityRuleListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SecurityRuleListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"description\":\"nxytxh\",\"protocol\":\"Icmp\",\"sourceAddressPrefixes\":[\"zpfzabglc\",\"hxw\"],\"destinationAddressPrefixes\":[\"yqiklbbovplwzb\"],\"sourcePortRanges\":[\"yuguosvmkfssx\"],\"destinationPortRanges\":[\"kfplgmgsxnk\",\"zkd\"],\"access\":\"Allow\",\"priority\":1649575445,\"direction\":\"Outbound\",\"provisioningState\":\"Canceled\"},\"extendedLocation\":{\"name\":\"wiyighxpkdw\",\"type\":\"CustomLocation\"},\"id\":\"uebbaumnyqup\",\"name\":\"deoj\",\"type\":\"a\"}],\"nextLink\":\"khsmtxpsiebt\"}") + "{\"value\":[{\"properties\":{\"description\":\"jkbegibtnmxiebww\",\"protocol\":\"Udp\",\"sourceAddressPrefixes\":[\"yqcgwrtzjuzgwy\",\"mhtxongmtsavjcb\"],\"destinationAddressPrefixes\":[\"qpsrknftguvri\",\"hprwmdyv\",\"qtayri\"],\"sourcePortRanges\":[\"oyq\"],\"destinationPortRanges\":[\"rmcqiby\",\"nojvknmefqsg\",\"vah\",\"pjyzhpv\"],\"access\":\"Deny\",\"priority\":1600165537,\"direction\":\"Outbound\",\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"name\":\"djzlmwlx\",\"type\":\"CustomLocation\"},\"id\":\"fhzovawjvzunluth\",\"name\":\"n\",\"type\":\"rnxipei\"}],\"nextLink\":\"jzuaejxdultskzbb\"}") .toObject(SecurityRuleListResult.class); - Assertions.assertEquals("nxytxh", model.value().get(0).properties().description()); - Assertions.assertEquals(SecurityRuleProtocol.ICMP, model.value().get(0).properties().protocol()); - Assertions.assertEquals("zpfzabglc", model.value().get(0).properties().sourceAddressPrefixes().get(0)); - Assertions.assertEquals("yqiklbbovplwzb", - model.value().get(0).properties().destinationAddressPrefixes().get(0)); - Assertions.assertEquals("yuguosvmkfssx", model.value().get(0).properties().sourcePortRanges().get(0)); - Assertions.assertEquals("kfplgmgsxnk", model.value().get(0).properties().destinationPortRanges().get(0)); - Assertions.assertEquals(SecurityRuleAccess.ALLOW, model.value().get(0).properties().access()); - Assertions.assertEquals(1649575445, model.value().get(0).properties().priority()); + Assertions.assertEquals("jkbegibtnmxiebww", model.value().get(0).properties().description()); + Assertions.assertEquals(SecurityRuleProtocol.UDP, model.value().get(0).properties().protocol()); + Assertions.assertEquals("yqcgwrtzjuzgwy", model.value().get(0).properties().sourceAddressPrefixes().get(0)); + Assertions.assertEquals("qpsrknftguvri", model.value().get(0).properties().destinationAddressPrefixes().get(0)); + Assertions.assertEquals("oyq", model.value().get(0).properties().sourcePortRanges().get(0)); + Assertions.assertEquals("rmcqiby", model.value().get(0).properties().destinationPortRanges().get(0)); + Assertions.assertEquals(SecurityRuleAccess.DENY, model.value().get(0).properties().access()); + Assertions.assertEquals(1600165537, model.value().get(0).properties().priority()); Assertions.assertEquals(SecurityRuleDirection.OUTBOUND, model.value().get(0).properties().direction()); - Assertions.assertEquals("wiyighxpkdw", model.value().get(0).extendedLocation().name()); + Assertions.assertEquals("djzlmwlx", model.value().get(0).extendedLocation().name()); Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("khsmtxpsiebt", model.nextLink()); + Assertions.assertEquals("jzuaejxdultskzbb", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulePropertiesTests.java index 43cb3f031683e..9f3891b87ada8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulePropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulePropertiesTests.java @@ -16,39 +16,39 @@ public final class SecurityRulePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SecurityRuleProperties model = BinaryData.fromString( - "{\"description\":\"aaxdbabphlwrq\",\"protocol\":\"Tcp\",\"sourceAddressPrefixes\":[\"sthsu\",\"ocmnyyazttbtwwrq\",\"uedck\"],\"destinationAddressPrefixes\":[\"biexzfeyu\",\"axibxujw\",\"hqwa\"],\"sourcePortRanges\":[\"zyoxaepdkzjan\",\"ux\"],\"destinationPortRanges\":[\"wbavxbniwdj\"],\"access\":\"Allow\",\"priority\":511976912,\"direction\":\"Inbound\",\"provisioningState\":\"Succeeded\"}") + "{\"description\":\"hjdauwhvylwz\",\"protocol\":\"*\",\"sourceAddressPrefixes\":[\"xujznbmpowu\"],\"destinationAddressPrefixes\":[\"zqlveualupjmkhf\",\"obbc\"],\"sourcePortRanges\":[\"rtjriplrbpbew\"],\"destinationPortRanges\":[\"fgb\",\"c\"],\"access\":\"Deny\",\"priority\":1553365340,\"direction\":\"Outbound\",\"provisioningState\":\"Failed\"}") .toObject(SecurityRuleProperties.class); - Assertions.assertEquals("aaxdbabphlwrq", model.description()); - Assertions.assertEquals(SecurityRuleProtocol.TCP, model.protocol()); - Assertions.assertEquals("sthsu", model.sourceAddressPrefixes().get(0)); - Assertions.assertEquals("biexzfeyu", model.destinationAddressPrefixes().get(0)); - Assertions.assertEquals("zyoxaepdkzjan", model.sourcePortRanges().get(0)); - Assertions.assertEquals("wbavxbniwdj", model.destinationPortRanges().get(0)); - Assertions.assertEquals(SecurityRuleAccess.ALLOW, model.access()); - Assertions.assertEquals(511976912, model.priority()); - Assertions.assertEquals(SecurityRuleDirection.INBOUND, model.direction()); + Assertions.assertEquals("hjdauwhvylwz", model.description()); + Assertions.assertEquals(SecurityRuleProtocol.ASTERISK, model.protocol()); + Assertions.assertEquals("xujznbmpowu", model.sourceAddressPrefixes().get(0)); + Assertions.assertEquals("zqlveualupjmkhf", model.destinationAddressPrefixes().get(0)); + Assertions.assertEquals("rtjriplrbpbew", model.sourcePortRanges().get(0)); + Assertions.assertEquals("fgb", model.destinationPortRanges().get(0)); + Assertions.assertEquals(SecurityRuleAccess.DENY, model.access()); + Assertions.assertEquals(1553365340, model.priority()); + Assertions.assertEquals(SecurityRuleDirection.OUTBOUND, model.direction()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SecurityRuleProperties model = new SecurityRuleProperties().withDescription("aaxdbabphlwrq") - .withProtocol(SecurityRuleProtocol.TCP) - .withSourceAddressPrefixes(Arrays.asList("sthsu", "ocmnyyazttbtwwrq", "uedck")) - .withDestinationAddressPrefixes(Arrays.asList("biexzfeyu", "axibxujw", "hqwa")) - .withSourcePortRanges(Arrays.asList("zyoxaepdkzjan", "ux")) - .withDestinationPortRanges(Arrays.asList("wbavxbniwdj")) - .withAccess(SecurityRuleAccess.ALLOW) - .withPriority(511976912) - .withDirection(SecurityRuleDirection.INBOUND); + SecurityRuleProperties model = new SecurityRuleProperties().withDescription("hjdauwhvylwz") + .withProtocol(SecurityRuleProtocol.ASTERISK) + .withSourceAddressPrefixes(Arrays.asList("xujznbmpowu")) + .withDestinationAddressPrefixes(Arrays.asList("zqlveualupjmkhf", "obbc")) + .withSourcePortRanges(Arrays.asList("rtjriplrbpbew")) + .withDestinationPortRanges(Arrays.asList("fgb", "c")) + .withAccess(SecurityRuleAccess.DENY) + .withPriority(1553365340) + .withDirection(SecurityRuleDirection.OUTBOUND); model = BinaryData.fromObject(model).toObject(SecurityRuleProperties.class); - Assertions.assertEquals("aaxdbabphlwrq", model.description()); - Assertions.assertEquals(SecurityRuleProtocol.TCP, model.protocol()); - Assertions.assertEquals("sthsu", model.sourceAddressPrefixes().get(0)); - Assertions.assertEquals("biexzfeyu", model.destinationAddressPrefixes().get(0)); - Assertions.assertEquals("zyoxaepdkzjan", model.sourcePortRanges().get(0)); - Assertions.assertEquals("wbavxbniwdj", model.destinationPortRanges().get(0)); - Assertions.assertEquals(SecurityRuleAccess.ALLOW, model.access()); - Assertions.assertEquals(511976912, model.priority()); - Assertions.assertEquals(SecurityRuleDirection.INBOUND, model.direction()); + Assertions.assertEquals("hjdauwhvylwz", model.description()); + Assertions.assertEquals(SecurityRuleProtocol.ASTERISK, model.protocol()); + Assertions.assertEquals("xujznbmpowu", model.sourceAddressPrefixes().get(0)); + Assertions.assertEquals("zqlveualupjmkhf", model.destinationAddressPrefixes().get(0)); + Assertions.assertEquals("rtjriplrbpbew", model.sourcePortRanges().get(0)); + Assertions.assertEquals("fgb", model.destinationPortRanges().get(0)); + Assertions.assertEquals(SecurityRuleAccess.DENY, model.access()); + Assertions.assertEquals(1553365340, model.priority()); + Assertions.assertEquals(SecurityRuleDirection.OUTBOUND, model.direction()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesCreateOrUpdateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesCreateOrUpdateMockTests.java index 4ae3bc89df6e6..9473038451738 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesCreateOrUpdateMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesCreateOrUpdateMockTests.java @@ -28,7 +28,7 @@ public final class SecurityRulesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"description\":\"rywvtylbfpn\",\"protocol\":\"Udp\",\"sourceAddressPrefixes\":[\"oiwiithtywub\",\"cbihwqk\"],\"destinationAddressPrefixes\":[\"ntwjch\",\"dgoihxumwctondzj\",\"uu\"],\"sourcePortRanges\":[\"lwg\",\"ytsbwtovv\",\"gseinq\",\"iufxqknpir\"],\"destinationPortRanges\":[\"pttwqmsn\",\"ffcdmqnrojl\",\"ijnkrxfrdd\"],\"access\":\"Allow\",\"priority\":1110792389,\"direction\":\"Inbound\",\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"name\":\"ronasxift\",\"type\":\"CustomLocation\"},\"id\":\"zh\",\"name\":\"tw\",\"type\":\"sgogczhonnxk\"}"; + = "{\"properties\":{\"description\":\"ecwcrojphslhcawj\",\"protocol\":\"Icmp\",\"sourceAddressPrefixes\":[\"dwfmvigorqjb\",\"tzh\",\"aglkafhon\"],\"destinationAddressPrefixes\":[\"jeick\",\"zvcpopm\"],\"sourcePortRanges\":[\"nwcl\",\"yjede\",\"xm\"],\"destinationPortRanges\":[\"kqscazuawxtzx\",\"uamwabzxrvxc\"],\"access\":\"Allow\",\"priority\":986887213,\"direction\":\"Outbound\",\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"name\":\"v\",\"type\":\"CustomLocation\"},\"id\":\"sflvgsgzwywakoih\",\"name\":\"nsmjbl\",\"type\":\"ljhlnymzotq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -38,31 +38,31 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SecurityRule response = manager.securityRules() - .define("brnjwmw") - .withExistingNetworkSecurityGroup("crpw", "xeznoi") - .withProperties(new SecurityRuleProperties().withDescription("bsazejjoqka") - .withProtocol(SecurityRuleProtocol.ICMP) - .withSourceAddressPrefixes(Arrays.asList("xttaugzxnfaaz", "xdtnkdmkqjjlw")) - .withDestinationAddressPrefixes(Arrays.asList("vrkpyouaibreb")) - .withSourcePortRanges(Arrays.asList("ysjkixqtnqttez", "wfff", "akpjpqqmtedlt", "mjihyeozphv")) - .withDestinationPortRanges(Arrays.asList("y", "ncyg", "p", "vipmdscwxqupevzh")) + .define("ault") + .withExistingNetworkSecurityGroup("i", "ids") + .withProperties(new SecurityRuleProperties().withDescription("jumfqwazlnq") + .withProtocol(SecurityRuleProtocol.TCP) + .withSourceAddressPrefixes(Arrays.asList("ngz")) + .withDestinationAddressPrefixes(Arrays.asList("xtbjwgnyfusfzsv", "uik", "hajqglcfh")) + .withSourcePortRanges(Arrays.asList("qryxyn", "nzrdpsovwxz", "ptgoeiybbabp")) + .withDestinationPortRanges(Arrays.asList("f")) .withAccess(SecurityRuleAccess.ALLOW) - .withPriority(434974760) + .withPriority(2128983530) .withDirection(SecurityRuleDirection.OUTBOUND)) .withExtendedLocation( - new ExtendedLocation().withName("jujbypelmcuvhixb").withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + new ExtendedLocation().withName("rigjkskyrioov").withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .create(); - Assertions.assertEquals("rywvtylbfpn", response.properties().description()); - Assertions.assertEquals(SecurityRuleProtocol.UDP, response.properties().protocol()); - Assertions.assertEquals("oiwiithtywub", response.properties().sourceAddressPrefixes().get(0)); - Assertions.assertEquals("ntwjch", response.properties().destinationAddressPrefixes().get(0)); - Assertions.assertEquals("lwg", response.properties().sourcePortRanges().get(0)); - Assertions.assertEquals("pttwqmsn", response.properties().destinationPortRanges().get(0)); + Assertions.assertEquals("ecwcrojphslhcawj", response.properties().description()); + Assertions.assertEquals(SecurityRuleProtocol.ICMP, response.properties().protocol()); + Assertions.assertEquals("dwfmvigorqjb", response.properties().sourceAddressPrefixes().get(0)); + Assertions.assertEquals("jeick", response.properties().destinationAddressPrefixes().get(0)); + Assertions.assertEquals("nwcl", response.properties().sourcePortRanges().get(0)); + Assertions.assertEquals("kqscazuawxtzx", response.properties().destinationPortRanges().get(0)); Assertions.assertEquals(SecurityRuleAccess.ALLOW, response.properties().access()); - Assertions.assertEquals(1110792389, response.properties().priority()); - Assertions.assertEquals(SecurityRuleDirection.INBOUND, response.properties().direction()); - Assertions.assertEquals("ronasxift", response.extendedLocation().name()); + Assertions.assertEquals(986887213, response.properties().priority()); + Assertions.assertEquals(SecurityRuleDirection.OUTBOUND, response.properties().direction()); + Assertions.assertEquals("v", response.extendedLocation().name()); Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.extendedLocation().type()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesGetWithResponseMockTests.java index b03dc98dbfa0e..1fa897aec76c1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesGetWithResponseMockTests.java @@ -25,7 +25,7 @@ public final class SecurityRulesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"description\":\"csnjvcdwxlpqekft\",\"protocol\":\"Tcp\",\"sourceAddressPrefixes\":[\"jsyingwfqatm\",\"dhtmdvypgikd\"],\"destinationAddressPrefixes\":[\"ywkbirryuzhlhkjo\",\"rvqqaatj\"],\"sourcePortRanges\":[\"vgoup\"],\"destinationPortRanges\":[\"ib\",\"ggjioolvr\"],\"access\":\"Allow\",\"priority\":1483667739,\"direction\":\"Inbound\",\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"name\":\"llqwjygvjayvblmh\",\"type\":\"CustomLocation\"},\"id\":\"hbxvvyhgsopbyrqu\",\"name\":\"egxuvwzf\",\"type\":\"nhlmctlpdng\"}"; + = "{\"properties\":{\"description\":\"wthmkyib\",\"protocol\":\"Tcp\",\"sourceAddressPrefixes\":[\"hsgqc\",\"dhohsdtmcdzsuf\"],\"destinationAddressPrefixes\":[\"dxbzlmcmuap\",\"vhdbevwqqxey\"],\"sourcePortRanges\":[\"nqzi\",\"kfkbgbzbowxeqocl\",\"mygvkzqkj\",\"eokbze\"],\"destinationPortRanges\":[\"rx\",\"czurtlei\",\"q\"],\"access\":\"Allow\",\"priority\":796775151,\"direction\":\"Inbound\",\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"name\":\"zvd\",\"type\":\"CustomLocation\"},\"id\":\"ixz\",\"name\":\"q\",\"type\":\"noda\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,19 +35,19 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SecurityRule response = manager.securityRules() - .getWithResponse("feo", "erqwkyhkobopg", "edkowepbqpcrfk", com.azure.core.util.Context.NONE) + .getWithResponse("zcyjtot", "vopvp", "dbzqgqqihed", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("csnjvcdwxlpqekft", response.properties().description()); + Assertions.assertEquals("wthmkyib", response.properties().description()); Assertions.assertEquals(SecurityRuleProtocol.TCP, response.properties().protocol()); - Assertions.assertEquals("jsyingwfqatm", response.properties().sourceAddressPrefixes().get(0)); - Assertions.assertEquals("ywkbirryuzhlhkjo", response.properties().destinationAddressPrefixes().get(0)); - Assertions.assertEquals("vgoup", response.properties().sourcePortRanges().get(0)); - Assertions.assertEquals("ib", response.properties().destinationPortRanges().get(0)); + Assertions.assertEquals("hsgqc", response.properties().sourceAddressPrefixes().get(0)); + Assertions.assertEquals("dxbzlmcmuap", response.properties().destinationAddressPrefixes().get(0)); + Assertions.assertEquals("nqzi", response.properties().sourcePortRanges().get(0)); + Assertions.assertEquals("rx", response.properties().destinationPortRanges().get(0)); Assertions.assertEquals(SecurityRuleAccess.ALLOW, response.properties().access()); - Assertions.assertEquals(1483667739, response.properties().priority()); + Assertions.assertEquals(796775151, response.properties().priority()); Assertions.assertEquals(SecurityRuleDirection.INBOUND, response.properties().direction()); - Assertions.assertEquals("llqwjygvjayvblmh", response.extendedLocation().name()); + Assertions.assertEquals("zvd", response.extendedLocation().name()); Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.extendedLocation().type()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesListByNetworkSecurityGroupMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesListByNetworkSecurityGroupMockTests.java index a8b51a846599c..5d06fb8e4c9a0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesListByNetworkSecurityGroupMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SecurityRulesListByNetworkSecurityGroupMockTests.java @@ -26,7 +26,7 @@ public final class SecurityRulesListByNetworkSecurityGroupMockTests { @Test public void testListByNetworkSecurityGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"description\":\"pna\",\"protocol\":\"*\",\"sourceAddressPrefixes\":[\"ccbdre\",\"xhcexdrrvqahq\",\"ghtpw\",\"jnhyjsvf\"],\"destinationAddressPrefixes\":[\"z\"],\"sourcePortRanges\":[\"oowvrv\",\"t\"],\"destinationPortRanges\":[\"ppyostronzmyhgf\"],\"access\":\"Deny\",\"priority\":1358743575,\"direction\":\"Inbound\",\"provisioningState\":\"Canceled\"},\"extendedLocation\":{\"name\":\"waekrrjreafxtsgu\",\"type\":\"CustomLocation\"},\"id\":\"lik\",\"name\":\"xwslolbqpv\",\"type\":\"zlmvfelfktgp\"}]}"; + = "{\"value\":[{\"properties\":{\"description\":\"atutmzlbiojlvfhr\",\"protocol\":\"*\",\"sourceAddressPrefixes\":[\"eqvcwwyyurmoch\",\"prprsnmokay\",\"ejnhlbkpb\",\"pcpil\"],\"destinationAddressPrefixes\":[\"hzvechndbnwieho\"],\"sourcePortRanges\":[\"jwiuubwefqsfapaq\",\"ferr\"],\"destinationPortRanges\":[\"x\"],\"access\":\"Allow\",\"priority\":1238092125,\"direction\":\"Outbound\",\"provisioningState\":\"Canceled\"},\"extendedLocation\":{\"name\":\"wogqqnobpudcdab\",\"type\":\"CustomLocation\"},\"id\":\"wyawbzasqbuc\",\"name\":\"jg\",\"type\":\"yexaoguy\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,19 +36,20 @@ public void testListByNetworkSecurityGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.securityRules() - .listByNetworkSecurityGroup("tvgbmhrixkwmy", "jejveg", com.azure.core.util.Context.NONE); + .listByNetworkSecurityGroup("opqhewjptmc", "sbostzel", com.azure.core.util.Context.NONE); - Assertions.assertEquals("pna", response.iterator().next().properties().description()); + Assertions.assertEquals("atutmzlbiojlvfhr", response.iterator().next().properties().description()); Assertions.assertEquals(SecurityRuleProtocol.ASTERISK, response.iterator().next().properties().protocol()); - Assertions.assertEquals("ccbdre", response.iterator().next().properties().sourceAddressPrefixes().get(0)); - Assertions.assertEquals("z", response.iterator().next().properties().destinationAddressPrefixes().get(0)); - Assertions.assertEquals("oowvrv", response.iterator().next().properties().sourcePortRanges().get(0)); - Assertions.assertEquals("ppyostronzmyhgf", - response.iterator().next().properties().destinationPortRanges().get(0)); - Assertions.assertEquals(SecurityRuleAccess.DENY, response.iterator().next().properties().access()); - Assertions.assertEquals(1358743575, response.iterator().next().properties().priority()); - Assertions.assertEquals(SecurityRuleDirection.INBOUND, response.iterator().next().properties().direction()); - Assertions.assertEquals("waekrrjreafxtsgu", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals("eqvcwwyyurmoch", + response.iterator().next().properties().sourceAddressPrefixes().get(0)); + Assertions.assertEquals("hzvechndbnwieho", + response.iterator().next().properties().destinationAddressPrefixes().get(0)); + Assertions.assertEquals("jwiuubwefqsfapaq", response.iterator().next().properties().sourcePortRanges().get(0)); + Assertions.assertEquals("x", response.iterator().next().properties().destinationPortRanges().get(0)); + Assertions.assertEquals(SecurityRuleAccess.ALLOW, response.iterator().next().properties().access()); + Assertions.assertEquals(1238092125, response.iterator().next().properties().priority()); + Assertions.assertEquals(SecurityRuleDirection.OUTBOUND, response.iterator().next().properties().direction()); + Assertions.assertEquals("wogqqnobpudcdab", response.iterator().next().extendedLocation().name()); Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.iterator().next().extendedLocation().type()); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotStatusProvisioningStatusTests.java new file mode 100644 index 0000000000000..2e2c19e7e6945 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotStatusProvisioningStatusTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.SnapshotStatusProvisioningStatus; +import com.azure.resourcemanager.azurestackhci.vm.models.Status; +import org.junit.jupiter.api.Assertions; + +public final class SnapshotStatusProvisioningStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SnapshotStatusProvisioningStatus model + = BinaryData.fromString("{\"operationId\":\"mgucna\",\"status\":\"InProgress\"}") + .toObject(SnapshotStatusProvisioningStatus.class); + Assertions.assertEquals("mgucna", model.operationId()); + Assertions.assertEquals(Status.IN_PROGRESS, model.status()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotTagsUpdateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotTagsUpdateTests.java new file mode 100644 index 0000000000000..683d0ba4ab3cb --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SnapshotTagsUpdateTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.SnapshotTagsUpdate; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class SnapshotTagsUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SnapshotTagsUpdate model = BinaryData + .fromString("{\"tags\":{\"pfqbuaceopzf\":\"ellwptfdy\",\"lzdahzxctobgbkdm\":\"rhhuaopppcqeqx\"}}") + .toObject(SnapshotTagsUpdate.class); + Assertions.assertEquals("ellwptfdy", model.tags().get("pfqbuaceopzf")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SnapshotTagsUpdate model = new SnapshotTagsUpdate() + .withTags(mapOf("pfqbuaceopzf", "ellwptfdy", "lzdahzxctobgbkdm", "rhhuaopppcqeqx")); + model = BinaryData.fromObject(model).toObject(SnapshotTagsUpdate.class); + Assertions.assertEquals("ellwptfdy", model.tags().get("pfqbuaceopzf")); + } + + // 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/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainerStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainerStatusProvisioningStatusTests.java index 89cb3771c9455..908f63775661d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainerStatusProvisioningStatusTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainerStatusProvisioningStatusTests.java @@ -13,9 +13,9 @@ public final class StorageContainerStatusProvisioningStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageContainerStatusProvisioningStatus model - = BinaryData.fromString("{\"operationId\":\"vnotyfjfcnj\",\"status\":\"Failed\"}") + = BinaryData.fromString("{\"operationId\":\"johxcrsb\",\"status\":\"InProgress\"}") .toObject(StorageContainerStatusProvisioningStatus.class); - Assertions.assertEquals("vnotyfjfcnj", model.operationId()); - Assertions.assertEquals(Status.FAILED, model.status()); + Assertions.assertEquals("johxcrsb", model.operationId()); + Assertions.assertEquals(Status.IN_PROGRESS, model.status()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainerTagsUpdateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainerTagsUpdateTests.java index 06631066a3d36..082c75a435256 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainerTagsUpdateTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageContainerTagsUpdateTests.java @@ -13,16 +13,19 @@ public final class StorageContainerTagsUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - StorageContainerTagsUpdate model - = BinaryData.fromString("{\"tags\":{\"kphywpnvjto\":\"dhbt\"}}").toObject(StorageContainerTagsUpdate.class); - Assertions.assertEquals("dhbt", model.tags().get("kphywpnvjto")); + StorageContainerTagsUpdate model = BinaryData + .fromString( + "{\"tags\":{\"sub\":\"rruvwbhsq\",\"rxbpyb\":\"gjb\",\"twss\":\"rfbjf\",\"tpvjzbexilzznfqq\":\"t\"}}") + .toObject(StorageContainerTagsUpdate.class); + Assertions.assertEquals("rruvwbhsq", model.tags().get("sub")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StorageContainerTagsUpdate model = new StorageContainerTagsUpdate().withTags(mapOf("kphywpnvjto", "dhbt")); + StorageContainerTagsUpdate model = new StorageContainerTagsUpdate() + .withTags(mapOf("sub", "rruvwbhsq", "rxbpyb", "gjb", "twss", "rfbjf", "tpvjzbexilzznfqq", "t")); model = BinaryData.fromObject(model).toObject(StorageContainerTagsUpdate.class); - Assertions.assertEquals("dhbt", model.tags().get("kphywpnvjto")); + Assertions.assertEquals("rruvwbhsq", model.tags().get("sub")); } // Use "Map.of" if available diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageProfileUpdateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageProfileUpdateTests.java index bd195444083ee..8f5136d8ce43e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageProfileUpdateTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/StorageProfileUpdateTests.java @@ -13,16 +13,18 @@ public final class StorageProfileUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - StorageProfileUpdate model - = BinaryData.fromString("{\"dataDisks\":[{\"id\":\"tmuwlauwzi\"}]}").toObject(StorageProfileUpdate.class); - Assertions.assertEquals("tmuwlauwzi", model.dataDisks().get(0).id()); + StorageProfileUpdate model = BinaryData + .fromString("{\"dataDisks\":[{\"id\":\"qmzqalkrmnjijpx\"},{\"id\":\"q\"},{\"id\":\"dfnbyxbaaabjyv\"}]}") + .toObject(StorageProfileUpdate.class); + Assertions.assertEquals("qmzqalkrmnjijpx", model.dataDisks().get(0).id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StorageProfileUpdate model = new StorageProfileUpdate() - .withDataDisks(Arrays.asList(new VirtualHardDiskArmReference().withId("tmuwlauwzi"))); + StorageProfileUpdate model = new StorageProfileUpdate().withDataDisks(Arrays.asList( + new VirtualHardDiskArmReference().withId("qmzqalkrmnjijpx"), new VirtualHardDiskArmReference().withId("q"), + new VirtualHardDiskArmReference().withId("dfnbyxbaaabjyv"))); model = BinaryData.fromObject(model).toObject(StorageProfileUpdate.class); - Assertions.assertEquals("tmuwlauwzi", model.dataDisks().get(0).id()); + Assertions.assertEquals("qmzqalkrmnjijpx", model.dataDisks().get(0).id()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SubnetIpConfigurationReferenceTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SubnetIpConfigurationReferenceTests.java index 3c7bb5a3b05ac..9be40bec4ae91 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SubnetIpConfigurationReferenceTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SubnetIpConfigurationReferenceTests.java @@ -12,14 +12,14 @@ public final class SubnetIpConfigurationReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubnetIpConfigurationReference model - = BinaryData.fromString("{\"ID\":\"kirsoodqxhc\"}").toObject(SubnetIpConfigurationReference.class); - Assertions.assertEquals("kirsoodqxhc", model.id()); + = BinaryData.fromString("{\"ID\":\"lmjthjq\"}").toObject(SubnetIpConfigurationReference.class); + Assertions.assertEquals("lmjthjq", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubnetIpConfigurationReference model = new SubnetIpConfigurationReference().withId("kirsoodqxhc"); + SubnetIpConfigurationReference model = new SubnetIpConfigurationReference().withId("lmjthjq"); model = BinaryData.fromObject(model).toObject(SubnetIpConfigurationReference.class); - Assertions.assertEquals("kirsoodqxhc", model.id()); + Assertions.assertEquals("lmjthjq", model.id()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SubnetPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SubnetPropertiesTests.java index 7ac76c138ada6..a8772ad4e0eae 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SubnetPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SubnetPropertiesTests.java @@ -21,61 +21,58 @@ public final class SubnetPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubnetProperties model = BinaryData.fromString( - "{\"addressPrefix\":\"mnkzsmod\",\"addressPrefixes\":[\"ougpbkwt\",\"utduqktapspwgcu\"],\"ipAllocationMethod\":\"Static\",\"ipConfigurationReferences\":[{\"ID\":\"dosvqwhbmdgbbjf\"}],\"networkSecurityGroup\":{\"id\":\"mbmbexppbh\"},\"routeTable\":{\"etag\":\"rolfpfp\",\"name\":\"lgbquxig\",\"type\":\"jgzjaoyfhrtx\",\"properties\":{\"routes\":[{\"properties\":{\"addressPrefix\":\"ujysvle\",\"nextHopIpAddress\":\"vfqawrlyxwjkcpr\"},\"name\":\"wbxgjvt\"},{\"properties\":{\"addressPrefix\":\"ysszdnrujqguh\",\"nextHopIpAddress\":\"ouqfprwz\"},\"name\":\"nguitnwuizgazxu\"}]}},\"ipPools\":[{\"name\":\"ckyfih\",\"ipPoolType\":\"vm\",\"start\":\"fvzwdzuhty\",\"end\":\"isdkfthwxmnteiw\",\"info\":{\"used\":\"vkmijcmmxdcuf\",\"available\":\"srp\"}},{\"name\":\"zidnsezcxtbzsgfy\",\"ipPoolType\":\"vm\",\"start\":\"ewmdw\",\"end\":\"eiachboosflnr\",\"info\":{\"used\":\"qpteeh\",\"available\":\"vypyqrimzinpv\"}}],\"vlan\":694156912}") + "{\"addressPrefix\":\"hurzafblj\",\"addressPrefixes\":[\"btoqcjmkljavbqid\",\"qajzyulpkudjkr\",\"khbzhfepgzg\"],\"ipAllocationMethod\":\"Static\",\"ipConfigurationReferences\":[{\"ID\":\"c\"}],\"networkSecurityGroup\":{\"id\":\"paierh\"},\"routeTable\":{\"etag\":\"sglumma\",\"name\":\"j\",\"type\":\"dxob\",\"properties\":{\"routes\":[{\"properties\":{\"addressPrefix\":\"pxokajionp\",\"nextHopIpAddress\":\"ex\"},\"name\":\"txgcpodgmaajr\"},{\"properties\":{\"addressPrefix\":\"jwzrl\",\"nextHopIpAddress\":\"mcl\"},\"name\":\"ijcoejctb\"}]}},\"ipPools\":[{\"name\":\"qsycbkbfkgu\",\"ipPoolType\":\"vm\",\"start\":\"xxppofm\",\"end\":\"x\",\"info\":{\"used\":\"pg\",\"available\":\"toc\"}},{\"name\":\"xhvpmoue\",\"ipPoolType\":\"vippool\",\"start\":\"xibqeojnx\",\"end\":\"zvddntwndeicbtwn\",\"info\":{\"used\":\"oqvuhr\",\"available\":\"f\"}}],\"vlan\":331700984,\"provisioningState\":\"Failed\"}") .toObject(SubnetProperties.class); - Assertions.assertEquals("mnkzsmod", model.addressPrefix()); - Assertions.assertEquals("ougpbkwt", model.addressPrefixes().get(0)); + Assertions.assertEquals("hurzafblj", model.addressPrefix()); + Assertions.assertEquals("btoqcjmkljavbqid", model.addressPrefixes().get(0)); Assertions.assertEquals(IpAllocationMethodEnum.STATIC, model.ipAllocationMethod()); - Assertions.assertEquals("dosvqwhbmdgbbjf", model.ipConfigurationReferences().get(0).id()); - Assertions.assertEquals("mbmbexppbh", model.networkSecurityGroup().id()); - Assertions.assertEquals("wbxgjvt", model.routeTable().routes().get(0).name()); - Assertions.assertEquals("ujysvle", model.routeTable().routes().get(0).addressPrefix()); - Assertions.assertEquals("vfqawrlyxwjkcpr", model.routeTable().routes().get(0).nextHopIpAddress()); - Assertions.assertEquals("ckyfih", model.ipPools().get(0).name()); + Assertions.assertEquals("c", model.ipConfigurationReferences().get(0).id()); + Assertions.assertEquals("paierh", model.networkSecurityGroup().id()); + Assertions.assertEquals("txgcpodgmaajr", model.routeTable().routes().get(0).name()); + Assertions.assertEquals("pxokajionp", model.routeTable().routes().get(0).addressPrefix()); + Assertions.assertEquals("ex", model.routeTable().routes().get(0).nextHopIpAddress()); + Assertions.assertEquals("qsycbkbfkgu", model.ipPools().get(0).name()); Assertions.assertEquals(IPPoolTypeEnum.VM, model.ipPools().get(0).ipPoolType()); - Assertions.assertEquals("fvzwdzuhty", model.ipPools().get(0).start()); - Assertions.assertEquals("isdkfthwxmnteiw", model.ipPools().get(0).end()); - Assertions.assertEquals(694156912, model.vlan()); + Assertions.assertEquals("xxppofm", model.ipPools().get(0).start()); + Assertions.assertEquals("x", model.ipPools().get(0).end()); + Assertions.assertEquals(331700984, model.vlan()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubnetProperties model = new SubnetProperties().withAddressPrefix("mnkzsmod") - .withAddressPrefixes(Arrays.asList("ougpbkwt", "utduqktapspwgcu")) + SubnetProperties model = new SubnetProperties().withAddressPrefix("hurzafblj") + .withAddressPrefixes(Arrays.asList("btoqcjmkljavbqid", "qajzyulpkudjkr", "khbzhfepgzg")) .withIpAllocationMethod(IpAllocationMethodEnum.STATIC) - .withIpConfigurationReferences( - Arrays.asList(new SubnetIpConfigurationReference().withId("dosvqwhbmdgbbjf"))) - .withNetworkSecurityGroup(new NetworkSecurityGroupArmReference().withId("mbmbexppbh")) + .withIpConfigurationReferences(Arrays.asList(new SubnetIpConfigurationReference().withId("c"))) + .withNetworkSecurityGroup(new NetworkSecurityGroupArmReference().withId("paierh")) .withRouteTable(new RouteTable().withRoutes(Arrays.asList( - new Route().withName("wbxgjvt").withAddressPrefix("ujysvle").withNextHopIpAddress("vfqawrlyxwjkcpr"), - new Route().withName("nguitnwuizgazxu") - .withAddressPrefix("ysszdnrujqguh") - .withNextHopIpAddress("ouqfprwz")))) + new Route().withName("txgcpodgmaajr").withAddressPrefix("pxokajionp").withNextHopIpAddress("ex"), + new Route().withName("ijcoejctb").withAddressPrefix("jwzrl").withNextHopIpAddress("mcl")))) .withIpPools(Arrays.asList( - new IPPool().withName("ckyfih") + new IPPool().withName("qsycbkbfkgu") .withIpPoolType(IPPoolTypeEnum.VM) - .withStart("fvzwdzuhty") - .withEnd("isdkfthwxmnteiw") + .withStart("xxppofm") + .withEnd("x") .withInfo(new IPPoolInfo()), - new IPPool().withName("zidnsezcxtbzsgfy") - .withIpPoolType(IPPoolTypeEnum.VM) - .withStart("ewmdw") - .withEnd("eiachboosflnr") + new IPPool().withName("xhvpmoue") + .withIpPoolType(IPPoolTypeEnum.VIPPOOL) + .withStart("xibqeojnx") + .withEnd("zvddntwndeicbtwn") .withInfo(new IPPoolInfo()))) - .withVlan(694156912); + .withVlan(331700984); model = BinaryData.fromObject(model).toObject(SubnetProperties.class); - Assertions.assertEquals("mnkzsmod", model.addressPrefix()); - Assertions.assertEquals("ougpbkwt", model.addressPrefixes().get(0)); + Assertions.assertEquals("hurzafblj", model.addressPrefix()); + Assertions.assertEquals("btoqcjmkljavbqid", model.addressPrefixes().get(0)); Assertions.assertEquals(IpAllocationMethodEnum.STATIC, model.ipAllocationMethod()); - Assertions.assertEquals("dosvqwhbmdgbbjf", model.ipConfigurationReferences().get(0).id()); - Assertions.assertEquals("mbmbexppbh", model.networkSecurityGroup().id()); - Assertions.assertEquals("wbxgjvt", model.routeTable().routes().get(0).name()); - Assertions.assertEquals("ujysvle", model.routeTable().routes().get(0).addressPrefix()); - Assertions.assertEquals("vfqawrlyxwjkcpr", model.routeTable().routes().get(0).nextHopIpAddress()); - Assertions.assertEquals("ckyfih", model.ipPools().get(0).name()); + Assertions.assertEquals("c", model.ipConfigurationReferences().get(0).id()); + Assertions.assertEquals("paierh", model.networkSecurityGroup().id()); + Assertions.assertEquals("txgcpodgmaajr", model.routeTable().routes().get(0).name()); + Assertions.assertEquals("pxokajionp", model.routeTable().routes().get(0).addressPrefix()); + Assertions.assertEquals("ex", model.routeTable().routes().get(0).nextHopIpAddress()); + Assertions.assertEquals("qsycbkbfkgu", model.ipPools().get(0).name()); Assertions.assertEquals(IPPoolTypeEnum.VM, model.ipPools().get(0).ipPoolType()); - Assertions.assertEquals("fvzwdzuhty", model.ipPools().get(0).start()); - Assertions.assertEquals("isdkfthwxmnteiw", model.ipPools().get(0).end()); - Assertions.assertEquals(694156912, model.vlan()); + Assertions.assertEquals("xxppofm", model.ipPools().get(0).start()); + Assertions.assertEquals("x", model.ipPools().get(0).end()); + Assertions.assertEquals(331700984, model.vlan()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SubnetTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SubnetTests.java index ccc52371cd9d4..8d01ee7d33f3d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SubnetTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/SubnetTests.java @@ -21,62 +21,50 @@ public final class SubnetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Subnet model = BinaryData.fromString( - "{\"properties\":{\"addressPrefix\":\"gbwjzrnf\",\"addressPrefixes\":[\"gispemvtzfkufubl\",\"ofx\",\"eofjaeqjh\",\"jbasvmsmjqulngs\"],\"ipAllocationMethod\":\"Static\",\"ipConfigurationReferences\":[{\"ID\":\"kzgcwrwcl\"},{\"ID\":\"wrljdouskc\"}],\"networkSecurityGroup\":{\"id\":\"ocrcjdk\"},\"routeTable\":{\"etag\":\"hxbnjbiksqrg\",\"name\":\"sainqpjwnzl\",\"type\":\"fmppe\",\"properties\":{\"routes\":[{\"properties\":{},\"name\":\"sabkyqduujitcjcz\"},{\"properties\":{},\"name\":\"vndhkrwpdapp\"}]}},\"ipPools\":[{\"name\":\"kvwrwjfeu\",\"ipPoolType\":\"vm\",\"start\":\"tjelt\",\"end\":\"ldhugjzzdatqxh\",\"info\":{\"used\":\"geablgphuticndvk\",\"available\":\"zwyiftyhxhur\"}},{\"name\":\"ftyxolniw\",\"ipPoolType\":\"vm\",\"start\":\"kjfkg\",\"end\":\"w\",\"info\":{\"used\":\"ryplwckbasyypn\",\"available\":\"hsgcbacphejkot\"}},{\"name\":\"qgoulznd\",\"ipPoolType\":\"vm\",\"start\":\"yqkgfg\",\"end\":\"madgakeqsrxyb\",\"info\":{\"used\":\"e\",\"available\":\"ytb\"}}],\"vlan\":834029576},\"name\":\"ouf\"}") + "{\"properties\":{\"addressPrefix\":\"uckyf\",\"addressPrefixes\":[\"fidfvzw\",\"zuhtymwisdkfthwx\",\"nteiwaopv\"],\"ipAllocationMethod\":\"Dynamic\",\"ipConfigurationReferences\":[{\"ID\":\"mxdcufufsrp\"}],\"networkSecurityGroup\":{\"id\":\"idnsezcxtb\"},\"routeTable\":{\"etag\":\"fycc\",\"name\":\"ewmdw\",\"type\":\"eiachboosflnr\",\"properties\":{\"routes\":[{\"properties\":{},\"name\":\"eeh\"},{\"properties\":{},\"name\":\"ypyqrimzinp\"}]}},\"ipPools\":[{\"name\":\"dkirsoodqxhcr\",\"ipPoolType\":\"vm\",\"start\":\"jtckwhdso\",\"end\":\"iy\",\"info\":{\"used\":\"xsqwpgrjbznorc\",\"available\":\"vsnb\"}}],\"vlan\":1701008083,\"provisioningState\":\"InProgress\"},\"name\":\"mocpc\"}") .toObject(Subnet.class); - Assertions.assertEquals("ouf", model.name()); - Assertions.assertEquals("gbwjzrnf", model.addressPrefix()); - Assertions.assertEquals("gispemvtzfkufubl", model.addressPrefixes().get(0)); - Assertions.assertEquals(IpAllocationMethodEnum.STATIC, model.ipAllocationMethod()); - Assertions.assertEquals("kzgcwrwcl", model.ipConfigurationReferences().get(0).id()); - Assertions.assertEquals("ocrcjdk", model.networkSecurityGroup().id()); - Assertions.assertEquals("sabkyqduujitcjcz", model.routeTable().routes().get(0).name()); - Assertions.assertEquals("kvwrwjfeu", model.ipPools().get(0).name()); + Assertions.assertEquals("mocpc", model.name()); + Assertions.assertEquals("uckyf", model.addressPrefix()); + Assertions.assertEquals("fidfvzw", model.addressPrefixes().get(0)); + Assertions.assertEquals(IpAllocationMethodEnum.DYNAMIC, model.ipAllocationMethod()); + Assertions.assertEquals("mxdcufufsrp", model.ipConfigurationReferences().get(0).id()); + Assertions.assertEquals("idnsezcxtb", model.networkSecurityGroup().id()); + Assertions.assertEquals("eeh", model.routeTable().routes().get(0).name()); + Assertions.assertEquals("dkirsoodqxhcr", model.ipPools().get(0).name()); Assertions.assertEquals(IPPoolTypeEnum.VM, model.ipPools().get(0).ipPoolType()); - Assertions.assertEquals("tjelt", model.ipPools().get(0).start()); - Assertions.assertEquals("ldhugjzzdatqxh", model.ipPools().get(0).end()); - Assertions.assertEquals(834029576, model.vlan()); + Assertions.assertEquals("jtckwhdso", model.ipPools().get(0).start()); + Assertions.assertEquals("iy", model.ipPools().get(0).end()); + Assertions.assertEquals(1701008083, model.vlan()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Subnet model = new Subnet().withName("ouf") - .withAddressPrefix("gbwjzrnf") - .withAddressPrefixes(Arrays.asList("gispemvtzfkufubl", "ofx", "eofjaeqjh", "jbasvmsmjqulngs")) - .withIpAllocationMethod(IpAllocationMethodEnum.STATIC) - .withIpConfigurationReferences(Arrays.asList(new SubnetIpConfigurationReference().withId("kzgcwrwcl"), - new SubnetIpConfigurationReference().withId("wrljdouskc"))) - .withNetworkSecurityGroup(new NetworkSecurityGroupArmReference().withId("ocrcjdk")) - .withRouteTable(new RouteTable().withRoutes( - Arrays.asList(new Route().withName("sabkyqduujitcjcz"), new Route().withName("vndhkrwpdapp")))) - .withIpPools(Arrays.asList( - new IPPool().withName("kvwrwjfeu") - .withIpPoolType(IPPoolTypeEnum.VM) - .withStart("tjelt") - .withEnd("ldhugjzzdatqxh") - .withInfo(new IPPoolInfo()), - new IPPool().withName("ftyxolniw") - .withIpPoolType(IPPoolTypeEnum.VM) - .withStart("kjfkg") - .withEnd("w") - .withInfo(new IPPoolInfo()), - new IPPool().withName("qgoulznd") - .withIpPoolType(IPPoolTypeEnum.VM) - .withStart("yqkgfg") - .withEnd("madgakeqsrxyb") - .withInfo(new IPPoolInfo()))) - .withVlan(834029576); + Subnet model = new Subnet().withName("mocpc") + .withAddressPrefix("uckyf") + .withAddressPrefixes(Arrays.asList("fidfvzw", "zuhtymwisdkfthwx", "nteiwaopv")) + .withIpAllocationMethod(IpAllocationMethodEnum.DYNAMIC) + .withIpConfigurationReferences(Arrays.asList(new SubnetIpConfigurationReference().withId("mxdcufufsrp"))) + .withNetworkSecurityGroup(new NetworkSecurityGroupArmReference().withId("idnsezcxtb")) + .withRouteTable(new RouteTable() + .withRoutes(Arrays.asList(new Route().withName("eeh"), new Route().withName("ypyqrimzinp")))) + .withIpPools(Arrays.asList(new IPPool().withName("dkirsoodqxhcr") + .withIpPoolType(IPPoolTypeEnum.VM) + .withStart("jtckwhdso") + .withEnd("iy") + .withInfo(new IPPoolInfo()))) + .withVlan(1701008083); model = BinaryData.fromObject(model).toObject(Subnet.class); - Assertions.assertEquals("ouf", model.name()); - Assertions.assertEquals("gbwjzrnf", model.addressPrefix()); - Assertions.assertEquals("gispemvtzfkufubl", model.addressPrefixes().get(0)); - Assertions.assertEquals(IpAllocationMethodEnum.STATIC, model.ipAllocationMethod()); - Assertions.assertEquals("kzgcwrwcl", model.ipConfigurationReferences().get(0).id()); - Assertions.assertEquals("ocrcjdk", model.networkSecurityGroup().id()); - Assertions.assertEquals("sabkyqduujitcjcz", model.routeTable().routes().get(0).name()); - Assertions.assertEquals("kvwrwjfeu", model.ipPools().get(0).name()); + Assertions.assertEquals("mocpc", model.name()); + Assertions.assertEquals("uckyf", model.addressPrefix()); + Assertions.assertEquals("fidfvzw", model.addressPrefixes().get(0)); + Assertions.assertEquals(IpAllocationMethodEnum.DYNAMIC, model.ipAllocationMethod()); + Assertions.assertEquals("mxdcufufsrp", model.ipConfigurationReferences().get(0).id()); + Assertions.assertEquals("idnsezcxtb", model.networkSecurityGroup().id()); + Assertions.assertEquals("eeh", model.routeTable().routes().get(0).name()); + Assertions.assertEquals("dkirsoodqxhcr", model.ipPools().get(0).name()); Assertions.assertEquals(IPPoolTypeEnum.VM, model.ipPools().get(0).ipPoolType()); - Assertions.assertEquals("tjelt", model.ipPools().get(0).start()); - Assertions.assertEquals("ldhugjzzdatqxh", model.ipPools().get(0).end()); - Assertions.assertEquals(834029576, model.vlan()); + Assertions.assertEquals("jtckwhdso", model.ipPools().get(0).start()); + Assertions.assertEquals("iy", model.ipPools().get(0).end()); + Assertions.assertEquals(1701008083, model.vlan()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/UserAssignedIdentityTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/UserAssignedIdentityTests.java index 31d95abe650d3..a9ad212d6e616 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/UserAssignedIdentityTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/UserAssignedIdentityTests.java @@ -10,9 +10,8 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UserAssignedIdentity model - = BinaryData.fromString("{\"principalId\":\"srfbjfdtwss\",\"clientId\":\"ftpvjzbexil\"}") - .toObject(UserAssignedIdentity.class); + UserAssignedIdentity model = BinaryData.fromString("{\"principalId\":\"gxk\",\"clientId\":\"la\"}") + .toObject(UserAssignedIdentity.class); } @org.junit.jupiter.api.Test diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDiskArmReferenceTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDiskArmReferenceTests.java index 7508b6e9f9775..026ae5da347db 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDiskArmReferenceTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDiskArmReferenceTests.java @@ -12,14 +12,14 @@ public final class VirtualHardDiskArmReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualHardDiskArmReference model - = BinaryData.fromString("{\"id\":\"qwwncw\"}").toObject(VirtualHardDiskArmReference.class); - Assertions.assertEquals("qwwncw", model.id()); + = BinaryData.fromString("{\"id\":\"kpw\"}").toObject(VirtualHardDiskArmReference.class); + Assertions.assertEquals("kpw", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VirtualHardDiskArmReference model = new VirtualHardDiskArmReference().withId("qwwncw"); + VirtualHardDiskArmReference model = new VirtualHardDiskArmReference().withId("kpw"); model = BinaryData.fromObject(model).toObject(VirtualHardDiskArmReference.class); - Assertions.assertEquals("qwwncw", model.id()); + Assertions.assertEquals("kpw", model.id()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDiskDownloadStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDiskDownloadStatusTests.java index f8c7c52ff89dd..a1f29e64dce1c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDiskDownloadStatusTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDiskDownloadStatusTests.java @@ -13,10 +13,10 @@ public final class VirtualHardDiskDownloadStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualHardDiskDownloadStatus model = BinaryData.fromString( - "{\"downloadedSizeInMB\":5146449711958438241,\"status\":\"InProgress\",\"progressPercentage\":1809272573245820148}") + "{\"downloadedSizeInMB\":679004142384827161,\"status\":\"Failed\",\"progressPercentage\":8446430665429739352}") .toObject(VirtualHardDiskDownloadStatus.class); - Assertions.assertEquals(5146449711958438241L, model.downloadedSizeInMB()); - Assertions.assertEquals(Status.IN_PROGRESS, model.status()); - Assertions.assertEquals(1809272573245820148L, model.progressPercentage()); + Assertions.assertEquals(679004142384827161L, model.downloadedSizeInMB()); + Assertions.assertEquals(Status.FAILED, model.status()); + Assertions.assertEquals(8446430665429739352L, model.progressPercentage()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDiskStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDiskStatusProvisioningStatusTests.java index 0b043d6828fff..137e348b18eae 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDiskStatusProvisioningStatusTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDiskStatusProvisioningStatusTests.java @@ -13,9 +13,9 @@ public final class VirtualHardDiskStatusProvisioningStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualHardDiskStatusProvisioningStatus model - = BinaryData.fromString("{\"operationId\":\"rnwb\",\"status\":\"Failed\"}") + = BinaryData.fromString("{\"operationId\":\"wtmwerio\",\"status\":\"Succeeded\"}") .toObject(VirtualHardDiskStatusProvisioningStatus.class); - Assertions.assertEquals("rnwb", model.operationId()); - Assertions.assertEquals(Status.FAILED, model.status()); + Assertions.assertEquals("wtmwerio", model.operationId()); + Assertions.assertEquals(Status.SUCCEEDED, model.status()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDiskUploadRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDiskUploadRequestTests.java index ff7a50f3ceda6..d249c2938343e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDiskUploadRequestTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDiskUploadRequestTests.java @@ -11,15 +11,15 @@ public final class VirtualHardDiskUploadRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualHardDiskUploadRequest model = BinaryData.fromString("{\"azureManagedDiskUploadUrl\":\"ucww\"}") + VirtualHardDiskUploadRequest model = BinaryData.fromString("{\"azureManagedDiskUploadUrl\":\"lrb\"}") .toObject(VirtualHardDiskUploadRequest.class); - Assertions.assertEquals("ucww", model.azureManagedDiskUploadUrl()); + Assertions.assertEquals("lrb", model.azureManagedDiskUploadUrl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VirtualHardDiskUploadRequest model = new VirtualHardDiskUploadRequest().withAzureManagedDiskUploadUrl("ucww"); + VirtualHardDiskUploadRequest model = new VirtualHardDiskUploadRequest().withAzureManagedDiskUploadUrl("lrb"); model = BinaryData.fromObject(model).toObject(VirtualHardDiskUploadRequest.class); - Assertions.assertEquals("ucww", model.azureManagedDiskUploadUrl()); + Assertions.assertEquals("lrb", model.azureManagedDiskUploadUrl()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksUpdatePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksUpdatePropertiesTests.java index 16a59f330e8be..44be656e503ea 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksUpdatePropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksUpdatePropertiesTests.java @@ -11,16 +11,16 @@ public final class VirtualHardDisksUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualHardDisksUpdateProperties model = BinaryData.fromString("{\"diskSizeGB\":3600138171272863845}") + VirtualHardDisksUpdateProperties model = BinaryData.fromString("{\"diskSizeGB\":8524134273016778092}") .toObject(VirtualHardDisksUpdateProperties.class); - Assertions.assertEquals(3600138171272863845L, model.diskSizeGB()); + Assertions.assertEquals(8524134273016778092L, model.diskSizeGB()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualHardDisksUpdateProperties model - = new VirtualHardDisksUpdateProperties().withDiskSizeGB(3600138171272863845L); + = new VirtualHardDisksUpdateProperties().withDiskSizeGB(8524134273016778092L); model = BinaryData.fromObject(model).toObject(VirtualHardDisksUpdateProperties.class); - Assertions.assertEquals(3600138171272863845L, model.diskSizeGB()); + Assertions.assertEquals(8524134273016778092L, model.diskSizeGB()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksUpdateRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksUpdateRequestTests.java index c8ecefc2e093b..726c6b3c7c4d9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksUpdateRequestTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualHardDisksUpdateRequestTests.java @@ -14,21 +14,22 @@ public final class VirtualHardDisksUpdateRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualHardDisksUpdateRequest model = BinaryData.fromString( - "{\"tags\":{\"hvljuahaquh\":\"krh\",\"aex\":\"dhmdua\",\"vxpvgomz\":\"pvfadmwsrcr\"},\"properties\":{\"diskSizeGB\":6983403361765190016}}") + VirtualHardDisksUpdateRequest model = BinaryData + .fromString( + "{\"tags\":{\"aokonzmnsik\":\"sldnkwwtppjflcxo\"},\"properties\":{\"diskSizeGB\":5133856705294312052}}") .toObject(VirtualHardDisksUpdateRequest.class); - Assertions.assertEquals("krh", model.tags().get("hvljuahaquh")); - Assertions.assertEquals(6983403361765190016L, model.properties().diskSizeGB()); + Assertions.assertEquals("sldnkwwtppjflcxo", model.tags().get("aokonzmnsik")); + Assertions.assertEquals(5133856705294312052L, model.properties().diskSizeGB()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VirtualHardDisksUpdateRequest model = new VirtualHardDisksUpdateRequest() - .withTags(mapOf("hvljuahaquh", "krh", "aex", "dhmdua", "vxpvgomz", "pvfadmwsrcr")) - .withProperties(new VirtualHardDisksUpdateProperties().withDiskSizeGB(6983403361765190016L)); + VirtualHardDisksUpdateRequest model + = new VirtualHardDisksUpdateRequest().withTags(mapOf("aokonzmnsik", "sldnkwwtppjflcxo")) + .withProperties(new VirtualHardDisksUpdateProperties().withDiskSizeGB(5133856705294312052L)); model = BinaryData.fromObject(model).toObject(VirtualHardDisksUpdateRequest.class); - Assertions.assertEquals("krh", model.tags().get("hvljuahaquh")); - Assertions.assertEquals(6983403361765190016L, model.properties().diskSizeGB()); + Assertions.assertEquals("sldnkwwtppjflcxo", model.tags().get("aokonzmnsik")); + Assertions.assertEquals(5133856705294312052L, model.properties().diskSizeGB()); } // Use "Map.of" if available diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfigTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfigTests.java index bc70dbc3a2bd2..ffc60de7e14e3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfigTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfigTests.java @@ -12,24 +12,27 @@ public final class VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryC @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig model = BinaryData.fromString( - "{\"maximumMemoryMB\":7813618899616430195,\"minimumMemoryMB\":495933413670136065,\"targetMemoryBuffer\":1754120882}") + "{\"maximumMemoryMB\":3901581715856749689,\"minimumMemoryMB\":6799001413428276597,\"targetMemoryBuffer\":1550438212,\"enabled\":false}") .toObject(VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig.class); - Assertions.assertEquals(7813618899616430195L, model.maximumMemoryMB()); - Assertions.assertEquals(495933413670136065L, model.minimumMemoryMB()); - Assertions.assertEquals(1754120882, model.targetMemoryBuffer()); + Assertions.assertEquals(3901581715856749689L, model.maximumMemoryMB()); + Assertions.assertEquals(6799001413428276597L, model.minimumMemoryMB()); + Assertions.assertEquals(1550438212, model.targetMemoryBuffer()); + Assertions.assertFalse(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig model = new VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig() - .withMaximumMemoryMB(7813618899616430195L) - .withMinimumMemoryMB(495933413670136065L) - .withTargetMemoryBuffer(1754120882); + .withMaximumMemoryMB(3901581715856749689L) + .withMinimumMemoryMB(6799001413428276597L) + .withTargetMemoryBuffer(1550438212) + .withEnabled(false); model = BinaryData.fromObject(model) .toObject(VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig.class); - Assertions.assertEquals(7813618899616430195L, model.maximumMemoryMB()); - Assertions.assertEquals(495933413670136065L, model.minimumMemoryMB()); - Assertions.assertEquals(1754120882, model.targetMemoryBuffer()); + Assertions.assertEquals(3901581715856749689L, model.maximumMemoryMB()); + Assertions.assertEquals(6799001413428276597L, model.minimumMemoryMB()); + Assertions.assertEquals(1550438212, model.targetMemoryBuffer()); + Assertions.assertFalse(model.enabled()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesHardwareProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesHardwareProfileTests.java index 63bc4fb849c17..178a5c73124f1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesHardwareProfileTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesHardwareProfileTests.java @@ -17,55 +17,50 @@ public final class VirtualMachineInstancePropertiesHardwareProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInstancePropertiesHardwareProfile model = BinaryData.fromString( - "{\"vmSize\":\"Standard_D16s_v3\",\"processors\":1486337456,\"memoryMB\":6144174767385086572,\"dynamicMemoryConfig\":{\"maximumMemoryMB\":4014214152987643703,\"minimumMemoryMB\":6160997583833316786,\"targetMemoryBuffer\":841332893},\"virtualMachineGPUs\":[{\"assignmentType\":\"GpuDDA\",\"partitionSizeMB\":2641489064592308886,\"gpuName\":\"apj\"},{\"assignmentType\":\"GpuP\",\"partitionSizeMB\":7368048825846520103,\"gpuName\":\"qzcjrvxdj\"},{\"assignmentType\":\"GpuP\",\"partitionSizeMB\":6071942572000377997,\"gpuName\":\"kvugfhzovawjvzun\"},{\"assignmentType\":\"GpuP\",\"partitionSizeMB\":5088500223485653746,\"gpuName\":\"prnxipeil\"}]}") + "{\"vmSize\":\"Standard_A2_v2\",\"processors\":1202114760,\"memoryMB\":7495067102833571715,\"dynamicMemoryConfig\":{\"maximumMemoryMB\":1500551340218626756,\"minimumMemoryMB\":5159577402687239135,\"targetMemoryBuffer\":938827927,\"enabled\":true},\"virtualMachineGPUs\":[{\"assignmentType\":\"GpuP\",\"partitionSizeMB\":98342047801553484,\"gpuName\":\"ft\"},{\"assignmentType\":\"GpuDDA\",\"partitionSizeMB\":4246550492793008168,\"gpuName\":\"iyzvqtmnub\"}]}") .toObject(VirtualMachineInstancePropertiesHardwareProfile.class); - Assertions.assertEquals(VmSizeEnum.STANDARD_D16S_V3, model.vmSize()); - Assertions.assertEquals(1486337456, model.processors()); - Assertions.assertEquals(6144174767385086572L, model.memoryMB()); - Assertions.assertEquals(4014214152987643703L, model.dynamicMemoryConfig().maximumMemoryMB()); - Assertions.assertEquals(6160997583833316786L, model.dynamicMemoryConfig().minimumMemoryMB()); - Assertions.assertEquals(841332893, model.dynamicMemoryConfig().targetMemoryBuffer()); - Assertions.assertEquals(GpuAssignmentTypeEnum.GPU_DDA, model.virtualMachineGPUs().get(0).assignmentType()); - Assertions.assertEquals(2641489064592308886L, model.virtualMachineGPUs().get(0).partitionSizeMB()); - Assertions.assertEquals("apj", model.virtualMachineGPUs().get(0).gpuName()); + Assertions.assertEquals(VmSizeEnum.STANDARD_A2_V2, model.vmSize()); + Assertions.assertEquals(1202114760, model.processors()); + Assertions.assertEquals(7495067102833571715L, model.memoryMB()); + Assertions.assertEquals(1500551340218626756L, model.dynamicMemoryConfig().maximumMemoryMB()); + Assertions.assertEquals(5159577402687239135L, model.dynamicMemoryConfig().minimumMemoryMB()); + Assertions.assertEquals(938827927, model.dynamicMemoryConfig().targetMemoryBuffer()); + Assertions.assertTrue(model.dynamicMemoryConfig().enabled()); + Assertions.assertEquals(GpuAssignmentTypeEnum.GPUP, model.virtualMachineGPUs().get(0).assignmentType()); + Assertions.assertEquals(98342047801553484L, model.virtualMachineGPUs().get(0).partitionSizeMB()); + Assertions.assertEquals("ft", model.virtualMachineGPUs().get(0).gpuName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualMachineInstancePropertiesHardwareProfile model - = new VirtualMachineInstancePropertiesHardwareProfile().withVmSize(VmSizeEnum.STANDARD_D16S_V3) - .withProcessors(1486337456) - .withMemoryMB(6144174767385086572L) + = new VirtualMachineInstancePropertiesHardwareProfile().withVmSize(VmSizeEnum.STANDARD_A2_V2) + .withProcessors(1202114760) + .withMemoryMB(7495067102833571715L) .withDynamicMemoryConfig(new VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig() - .withMaximumMemoryMB(4014214152987643703L) - .withMinimumMemoryMB(6160997583833316786L) - .withTargetMemoryBuffer(841332893)) + .withMaximumMemoryMB(1500551340218626756L) + .withMinimumMemoryMB(5159577402687239135L) + .withTargetMemoryBuffer(938827927) + .withEnabled(true)) .withVirtualMachineGPUs(Arrays.asList( - new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() - .withAssignmentType(GpuAssignmentTypeEnum.GPU_DDA) - .withPartitionSizeMB(2641489064592308886L) - .withGpuName("apj"), - new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() - .withAssignmentType(GpuAssignmentTypeEnum.GPUP) - .withPartitionSizeMB(7368048825846520103L) - .withGpuName("qzcjrvxdj"), new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() .withAssignmentType(GpuAssignmentTypeEnum.GPUP) - .withPartitionSizeMB(6071942572000377997L) - .withGpuName("kvugfhzovawjvzun"), + .withPartitionSizeMB(98342047801553484L) + .withGpuName("ft"), new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() - .withAssignmentType(GpuAssignmentTypeEnum.GPUP) - .withPartitionSizeMB(5088500223485653746L) - .withGpuName("prnxipeil"))); + .withAssignmentType(GpuAssignmentTypeEnum.GPU_DDA) + .withPartitionSizeMB(4246550492793008168L) + .withGpuName("iyzvqtmnub"))); model = BinaryData.fromObject(model).toObject(VirtualMachineInstancePropertiesHardwareProfile.class); - Assertions.assertEquals(VmSizeEnum.STANDARD_D16S_V3, model.vmSize()); - Assertions.assertEquals(1486337456, model.processors()); - Assertions.assertEquals(6144174767385086572L, model.memoryMB()); - Assertions.assertEquals(4014214152987643703L, model.dynamicMemoryConfig().maximumMemoryMB()); - Assertions.assertEquals(6160997583833316786L, model.dynamicMemoryConfig().minimumMemoryMB()); - Assertions.assertEquals(841332893, model.dynamicMemoryConfig().targetMemoryBuffer()); - Assertions.assertEquals(GpuAssignmentTypeEnum.GPU_DDA, model.virtualMachineGPUs().get(0).assignmentType()); - Assertions.assertEquals(2641489064592308886L, model.virtualMachineGPUs().get(0).partitionSizeMB()); - Assertions.assertEquals("apj", model.virtualMachineGPUs().get(0).gpuName()); + Assertions.assertEquals(VmSizeEnum.STANDARD_A2_V2, model.vmSize()); + Assertions.assertEquals(1202114760, model.processors()); + Assertions.assertEquals(7495067102833571715L, model.memoryMB()); + Assertions.assertEquals(1500551340218626756L, model.dynamicMemoryConfig().maximumMemoryMB()); + Assertions.assertEquals(5159577402687239135L, model.dynamicMemoryConfig().minimumMemoryMB()); + Assertions.assertEquals(938827927, model.dynamicMemoryConfig().targetMemoryBuffer()); + Assertions.assertTrue(model.dynamicMemoryConfig().enabled()); + Assertions.assertEquals(GpuAssignmentTypeEnum.GPUP, model.virtualMachineGPUs().get(0).assignmentType()); + Assertions.assertEquals(98342047801553484L, model.virtualMachineGPUs().get(0).partitionSizeMB()); + Assertions.assertEquals("ft", model.virtualMachineGPUs().get(0).gpuName()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPUTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPUTests.java index 63c3d8b075011..40e8a12d93d0a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPUTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPUTests.java @@ -14,11 +14,11 @@ public final class VirtualMachineInstancePropertiesHardwareProfileVirtualMachine public void testDeserialize() throws Exception { VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU model = BinaryData .fromString( - "{\"assignmentType\":\"GpuP\",\"partitionSizeMB\":7440682274969203666,\"gpuName\":\"zbbtdzumveek\"}") + "{\"assignmentType\":\"GpuP\",\"partitionSizeMB\":4327896689449869677,\"gpuName\":\"vypomgkopkwho\"}") .toObject(VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU.class); Assertions.assertEquals(GpuAssignmentTypeEnum.GPUP, model.assignmentType()); - Assertions.assertEquals(7440682274969203666L, model.partitionSizeMB()); - Assertions.assertEquals("zbbtdzumveek", model.gpuName()); + Assertions.assertEquals(4327896689449869677L, model.partitionSizeMB()); + Assertions.assertEquals("vypomgkopkwho", model.gpuName()); } @org.junit.jupiter.api.Test @@ -26,12 +26,12 @@ public void testSerialize() throws Exception { VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU model = new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() .withAssignmentType(GpuAssignmentTypeEnum.GPUP) - .withPartitionSizeMB(7440682274969203666L) - .withGpuName("zbbtdzumveek"); + .withPartitionSizeMB(4327896689449869677L) + .withGpuName("vypomgkopkwho"); model = BinaryData.fromObject(model) .toObject(VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU.class); Assertions.assertEquals(GpuAssignmentTypeEnum.GPUP, model.assignmentType()); - Assertions.assertEquals(7440682274969203666L, model.partitionSizeMB()); - Assertions.assertEquals("zbbtdzumveek", model.gpuName()); + Assertions.assertEquals(4327896689449869677L, model.partitionSizeMB()); + Assertions.assertEquals("vypomgkopkwho", model.gpuName()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesNetworkProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesNetworkProfileTests.java index 5b2472c29b52a..e12a9777e6f2a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesNetworkProfileTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesNetworkProfileTests.java @@ -14,16 +14,17 @@ public final class VirtualMachineInstancePropertiesNetworkProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInstancePropertiesNetworkProfile model - = BinaryData.fromString("{\"networkInterfaces\":[{\"id\":\"f\"}]}") + = BinaryData.fromString("{\"networkInterfaces\":[{\"id\":\"qvmkcxo\"},{\"id\":\"pvhelxprg\"}]}") .toObject(VirtualMachineInstancePropertiesNetworkProfile.class); - Assertions.assertEquals("f", model.networkInterfaces().get(0).id()); + Assertions.assertEquals("qvmkcxo", model.networkInterfaces().get(0).id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualMachineInstancePropertiesNetworkProfile model = new VirtualMachineInstancePropertiesNetworkProfile() - .withNetworkInterfaces(Arrays.asList(new NetworkInterfaceArmReference().withId("f"))); + .withNetworkInterfaces(Arrays.asList(new NetworkInterfaceArmReference().withId("qvmkcxo"), + new NetworkInterfaceArmReference().withId("pvhelxprg"))); model = BinaryData.fromObject(model).toObject(VirtualMachineInstancePropertiesNetworkProfile.class); - Assertions.assertEquals("f", model.networkInterfaces().get(0).id()); + Assertions.assertEquals("qvmkcxo", model.networkInterfaces().get(0).id()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesPlacementProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesPlacementProfileTests.java index 2c1c880be6ad0..bd1938afe5a76 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesPlacementProfileTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesPlacementProfileTests.java @@ -12,19 +12,19 @@ public final class VirtualMachineInstancePropertiesPlacementProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInstancePropertiesPlacementProfile model - = BinaryData.fromString("{\"zone\":\"wozuhkf\",\"strictPlacementPolicy\":false}") + = BinaryData.fromString("{\"zone\":\"pajqgxysm\",\"strictPlacementPolicy\":false}") .toObject(VirtualMachineInstancePropertiesPlacementProfile.class); - Assertions.assertEquals("wozuhkf", model.zone()); + Assertions.assertEquals("pajqgxysm", model.zone()); Assertions.assertFalse(model.strictPlacementPolicy()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualMachineInstancePropertiesPlacementProfile model - = new VirtualMachineInstancePropertiesPlacementProfile().withZone("wozuhkf") + = new VirtualMachineInstancePropertiesPlacementProfile().withZone("pajqgxysm") .withStrictPlacementPolicy(false); model = BinaryData.fromObject(model).toObject(VirtualMachineInstancePropertiesPlacementProfile.class); - Assertions.assertEquals("wozuhkf", model.zone()); + Assertions.assertEquals("pajqgxysm", model.zone()); Assertions.assertFalse(model.strictPlacementPolicy()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesSecurityProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesSecurityProfileTests.java index d1c50cdac1a80..5e1791f9097a6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesSecurityProfileTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesSecurityProfileTests.java @@ -14,23 +14,23 @@ public final class VirtualMachineInstancePropertiesSecurityProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInstancePropertiesSecurityProfile model = BinaryData.fromString( - "{\"enableTPM\":false,\"uefiSettings\":{\"secureBootEnabled\":false},\"securityType\":\"ConfidentialVM\"}") + "{\"enableTPM\":true,\"uefiSettings\":{\"secureBootEnabled\":true},\"securityType\":\"ConfidentialVM\"}") .toObject(VirtualMachineInstancePropertiesSecurityProfile.class); - Assertions.assertFalse(model.enableTPM()); - Assertions.assertFalse(model.uefiSettings().secureBootEnabled()); + Assertions.assertTrue(model.enableTPM()); + Assertions.assertTrue(model.uefiSettings().secureBootEnabled()); Assertions.assertEquals(SecurityTypes.CONFIDENTIAL_VM, model.securityType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualMachineInstancePropertiesSecurityProfile model - = new VirtualMachineInstancePropertiesSecurityProfile().withEnableTPM(false) + = new VirtualMachineInstancePropertiesSecurityProfile().withEnableTPM(true) .withUefiSettings( - new VirtualMachineInstancePropertiesSecurityProfileUefiSettings().withSecureBootEnabled(false)) + new VirtualMachineInstancePropertiesSecurityProfileUefiSettings().withSecureBootEnabled(true)) .withSecurityType(SecurityTypes.CONFIDENTIAL_VM); model = BinaryData.fromObject(model).toObject(VirtualMachineInstancePropertiesSecurityProfile.class); - Assertions.assertFalse(model.enableTPM()); - Assertions.assertFalse(model.uefiSettings().secureBootEnabled()); + Assertions.assertTrue(model.enableTPM()); + Assertions.assertTrue(model.uefiSettings().secureBootEnabled()); Assertions.assertEquals(SecurityTypes.CONFIDENTIAL_VM, model.securityType()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesSecurityProfileUefiSettingsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesSecurityProfileUefiSettingsTests.java index ebd1ef9e40edf..aa6833c0c0f62 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesSecurityProfileUefiSettingsTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesSecurityProfileUefiSettingsTests.java @@ -12,17 +12,17 @@ public final class VirtualMachineInstancePropertiesSecurityProfileUefiSettingsTe @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInstancePropertiesSecurityProfileUefiSettings model - = BinaryData.fromString("{\"secureBootEnabled\":true}") + = BinaryData.fromString("{\"secureBootEnabled\":false}") .toObject(VirtualMachineInstancePropertiesSecurityProfileUefiSettings.class); - Assertions.assertTrue(model.secureBootEnabled()); + Assertions.assertFalse(model.secureBootEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualMachineInstancePropertiesSecurityProfileUefiSettings model - = new VirtualMachineInstancePropertiesSecurityProfileUefiSettings().withSecureBootEnabled(true); + = new VirtualMachineInstancePropertiesSecurityProfileUefiSettings().withSecureBootEnabled(false); model = BinaryData.fromObject(model).toObject(VirtualMachineInstancePropertiesSecurityProfileUefiSettings.class); - Assertions.assertTrue(model.secureBootEnabled()); + Assertions.assertFalse(model.secureBootEnabled()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesStorageProfileOsDiskTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesStorageProfileOsDiskTests.java index b99554ab54bf1..d449a7f59407a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesStorageProfileOsDiskTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesStorageProfileOsDiskTests.java @@ -16,9 +16,9 @@ public final class VirtualMachineInstancePropertiesStorageProfileOsDiskTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInstancePropertiesStorageProfileOsDisk model = BinaryData.fromString( - "{\"id\":\"rmgucnap\",\"osType\":\"Linux\",\"managedDisk\":{\"securityProfile\":{\"securityEncryptionType\":\"NonPersistedTPM\"}}}") + "{\"id\":\"ywsuwsy\",\"osType\":\"Linux\",\"managedDisk\":{\"securityProfile\":{\"securityEncryptionType\":\"NonPersistedTPM\"}}}") .toObject(VirtualMachineInstancePropertiesStorageProfileOsDisk.class); - Assertions.assertEquals("rmgucnap", model.id()); + Assertions.assertEquals("ywsuwsy", model.id()); Assertions.assertEquals(OperatingSystemTypes.LINUX, model.osType()); Assertions.assertEquals(SecurityEncryptionType.NON_PERSISTED_TPM, model.managedDisk().securityProfile().securityEncryptionType()); @@ -27,12 +27,12 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualMachineInstancePropertiesStorageProfileOsDisk model - = new VirtualMachineInstancePropertiesStorageProfileOsDisk().withId("rmgucnap") + = new VirtualMachineInstancePropertiesStorageProfileOsDisk().withId("ywsuwsy") .withOsType(OperatingSystemTypes.LINUX) .withManagedDisk(new VirtualMachineInstanceManagedDiskParameters().withSecurityProfile( new VMDiskSecurityProfile().withSecurityEncryptionType(SecurityEncryptionType.NON_PERSISTED_TPM))); model = BinaryData.fromObject(model).toObject(VirtualMachineInstancePropertiesStorageProfileOsDisk.class); - Assertions.assertEquals("rmgucnap", model.id()); + Assertions.assertEquals("ywsuwsy", model.id()); Assertions.assertEquals(OperatingSystemTypes.LINUX, model.osType()); Assertions.assertEquals(SecurityEncryptionType.NON_PERSISTED_TPM, model.managedDisk().securityProfile().securityEncryptionType()); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesStorageProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesStorageProfileTests.java index 7d1e3c218249a..d3f7866ef81fb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesStorageProfileTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstancePropertiesStorageProfileTests.java @@ -20,34 +20,36 @@ public final class VirtualMachineInstancePropertiesStorageProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInstancePropertiesStorageProfile model = BinaryData.fromString( - "{\"dataDisks\":[{\"id\":\"xznelixhnrztf\"}],\"imageReference\":{\"id\":\"bnxknalaulppg\"},\"osDisk\":{\"id\":\"pnapnyiropuh\",\"osType\":\"Windows\",\"managedDisk\":{\"securityProfile\":{\"securityEncryptionType\":\"NonPersistedTPM\"}}},\"vmConfigStoragePathId\":\"gqgitxmedjvcsl\"}") + "{\"dataDisks\":[{\"id\":\"lpiujwaa\"},{\"id\":\"pqiiobyuqe\"},{\"id\":\"qlpqwcciuq\"}],\"imageReference\":{\"id\":\"butauvfb\"},\"osDisk\":{\"id\":\"whhmhykojo\",\"osType\":\"Windows\",\"managedDisk\":{\"securityProfile\":{\"securityEncryptionType\":\"NonPersistedTPM\"}}},\"vmConfigStoragePathId\":\"ichkoymkcdyhb\"}") .toObject(VirtualMachineInstancePropertiesStorageProfile.class); - Assertions.assertEquals("xznelixhnrztf", model.dataDisks().get(0).id()); - Assertions.assertEquals("bnxknalaulppg", model.imageReference().id()); - Assertions.assertEquals("pnapnyiropuh", model.osDisk().id()); + Assertions.assertEquals("lpiujwaa", model.dataDisks().get(0).id()); + Assertions.assertEquals("butauvfb", model.imageReference().id()); + Assertions.assertEquals("whhmhykojo", model.osDisk().id()); Assertions.assertEquals(OperatingSystemTypes.WINDOWS, model.osDisk().osType()); Assertions.assertEquals(SecurityEncryptionType.NON_PERSISTED_TPM, model.osDisk().managedDisk().securityProfile().securityEncryptionType()); - Assertions.assertEquals("gqgitxmedjvcsl", model.vmConfigStoragePathId()); + Assertions.assertEquals("ichkoymkcdyhb", model.vmConfigStoragePathId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualMachineInstancePropertiesStorageProfile model = new VirtualMachineInstancePropertiesStorageProfile() - .withDataDisks(Arrays.asList(new VirtualHardDiskArmReference().withId("xznelixhnrztf"))) - .withImageReference(new ImageArmReference().withId("bnxknalaulppg")) - .withOsDisk(new VirtualMachineInstancePropertiesStorageProfileOsDisk().withId("pnapnyiropuh") + .withDataDisks(Arrays.asList(new VirtualHardDiskArmReference().withId("lpiujwaa"), + new VirtualHardDiskArmReference().withId("pqiiobyuqe"), + new VirtualHardDiskArmReference().withId("qlpqwcciuq"))) + .withImageReference(new ImageArmReference().withId("butauvfb")) + .withOsDisk(new VirtualMachineInstancePropertiesStorageProfileOsDisk().withId("whhmhykojo") .withOsType(OperatingSystemTypes.WINDOWS) .withManagedDisk(new VirtualMachineInstanceManagedDiskParameters().withSecurityProfile( new VMDiskSecurityProfile().withSecurityEncryptionType(SecurityEncryptionType.NON_PERSISTED_TPM)))) - .withVmConfigStoragePathId("gqgitxmedjvcsl"); + .withVmConfigStoragePathId("ichkoymkcdyhb"); model = BinaryData.fromObject(model).toObject(VirtualMachineInstancePropertiesStorageProfile.class); - Assertions.assertEquals("xznelixhnrztf", model.dataDisks().get(0).id()); - Assertions.assertEquals("bnxknalaulppg", model.imageReference().id()); - Assertions.assertEquals("pnapnyiropuh", model.osDisk().id()); + Assertions.assertEquals("lpiujwaa", model.dataDisks().get(0).id()); + Assertions.assertEquals("butauvfb", model.imageReference().id()); + Assertions.assertEquals("whhmhykojo", model.osDisk().id()); Assertions.assertEquals(OperatingSystemTypes.WINDOWS, model.osDisk().osType()); Assertions.assertEquals(SecurityEncryptionType.NON_PERSISTED_TPM, model.osDisk().managedDisk().securityProfile().securityEncryptionType()); - Assertions.assertEquals("gqgitxmedjvcsl", model.vmConfigStoragePathId()); + Assertions.assertEquals("ichkoymkcdyhb", model.vmConfigStoragePathId()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstanceStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstanceStatusProvisioningStatusTests.java index 2b027c9aad86d..fb7a81d2f9fdf 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstanceStatusProvisioningStatusTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstanceStatusProvisioningStatusTests.java @@ -13,9 +13,9 @@ public final class VirtualMachineInstanceStatusProvisioningStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInstanceStatusProvisioningStatus model - = BinaryData.fromString("{\"operationId\":\"vetvt\",\"status\":\"InProgress\"}") + = BinaryData.fromString("{\"operationId\":\"ynkedyatrwyhqmib\",\"status\":\"Succeeded\"}") .toObject(VirtualMachineInstanceStatusProvisioningStatus.class); - Assertions.assertEquals("vetvt", model.operationId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.status()); + Assertions.assertEquals("ynkedyatrwyhqmib", model.operationId()); + Assertions.assertEquals(Status.SUCCEEDED, model.status()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstanceUpdatePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstanceUpdatePropertiesTests.java index c79a67dcb7384..ff9dfd919d44e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstanceUpdatePropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstanceUpdatePropertiesTests.java @@ -14,6 +14,7 @@ import com.azure.resourcemanager.azurestackhci.vm.models.OsProfileUpdateWindowsConfiguration; import com.azure.resourcemanager.azurestackhci.vm.models.StorageProfileUpdate; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceUpdateProperties; import com.azure.resourcemanager.azurestackhci.vm.models.VmSizeEnum; @@ -24,21 +25,25 @@ public final class VirtualMachineInstanceUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInstanceUpdateProperties model = BinaryData.fromString( - "{\"hardwareProfile\":{\"vmSize\":\"Standard_DS4_v2\",\"processors\":11756294,\"memoryMB\":1564863042825261686,\"virtualMachineGPUs\":[{\"assignmentType\":\"GpuP\",\"partitionSizeMB\":4154359310176459322,\"gpuName\":\"hh\"},{\"assignmentType\":\"GpuP\",\"partitionSizeMB\":8381465427069984975,\"gpuName\":\"ucerscdntnevfi\"},{\"assignmentType\":\"GpuP\",\"partitionSizeMB\":2197529378012958705,\"gpuName\":\"dsslswt\"},{\"assignmentType\":\"GpuP\",\"partitionSizeMB\":1708954452668375735,\"gpuName\":\"fzp\"}]},\"storageProfile\":{\"dataDisks\":[{\"id\":\"wab\"},{\"id\":\"tshhszhedp\"}]},\"networkProfile\":{\"networkInterfaces\":[{\"id\":\"ubmwmbesld\"},{\"id\":\"wwtppj\"},{\"id\":\"cxogaokonzm\"},{\"id\":\"ikvmkqzeqqk\"}]},\"osProfile\":{\"computerName\":\"fzxmhhvhgureodkw\",\"linuxConfiguration\":{\"provisionVMAgent\":false,\"provisionVMConfigAgent\":true},\"windowsConfiguration\":{\"provisionVMAgent\":false,\"provisionVMConfigAgent\":false}}}") + "{\"hardwareProfile\":{\"vmSize\":\"Standard_NV12\",\"processors\":1632471353,\"memoryMB\":6225068900260031070,\"virtualMachineGPUs\":[{\"assignmentType\":\"GpuP\",\"partitionSizeMB\":5606379961327556346,\"gpuName\":\"jhwuaanozjos\"}],\"dynamicMemoryConfig\":{\"maximumMemoryMB\":6944179335245488017,\"minimumMemoryMB\":9166898257228225747,\"targetMemoryBuffer\":106141655,\"enabled\":false}},\"storageProfile\":{\"dataDisks\":[{\"id\":\"imjwosyt\"},{\"id\":\"tcs\"},{\"id\":\"cktqumiekkezzi\"},{\"id\":\"ly\"}]},\"networkProfile\":{\"networkInterfaces\":[{\"id\":\"qgge\"},{\"id\":\"unygaeqid\"},{\"id\":\"fatpxllrxcyjmoa\"}]},\"osProfile\":{\"computerName\":\"varmywdmj\",\"linuxConfiguration\":{\"provisionVMAgent\":false,\"provisionVMConfigAgent\":false},\"windowsConfiguration\":{\"provisionVMAgent\":false,\"provisionVMConfigAgent\":false}}}") .toObject(VirtualMachineInstanceUpdateProperties.class); - Assertions.assertEquals(VmSizeEnum.STANDARD_DS4_V2, model.hardwareProfile().vmSize()); - Assertions.assertEquals(11756294, model.hardwareProfile().processors()); - Assertions.assertEquals(1564863042825261686L, model.hardwareProfile().memoryMB()); + Assertions.assertEquals(VmSizeEnum.STANDARD_NV12, model.hardwareProfile().vmSize()); + Assertions.assertEquals(1632471353, model.hardwareProfile().processors()); + Assertions.assertEquals(6225068900260031070L, model.hardwareProfile().memoryMB()); Assertions.assertEquals(GpuAssignmentTypeEnum.GPUP, model.hardwareProfile().virtualMachineGPUs().get(0).assignmentType()); - Assertions.assertEquals(4154359310176459322L, + Assertions.assertEquals(5606379961327556346L, model.hardwareProfile().virtualMachineGPUs().get(0).partitionSizeMB()); - Assertions.assertEquals("hh", model.hardwareProfile().virtualMachineGPUs().get(0).gpuName()); - Assertions.assertEquals("wab", model.storageProfile().dataDisks().get(0).id()); - Assertions.assertEquals("ubmwmbesld", model.networkProfile().networkInterfaces().get(0).id()); - Assertions.assertEquals("fzxmhhvhgureodkw", model.osProfile().computerName()); + Assertions.assertEquals("jhwuaanozjos", model.hardwareProfile().virtualMachineGPUs().get(0).gpuName()); + Assertions.assertEquals(6944179335245488017L, model.hardwareProfile().dynamicMemoryConfig().maximumMemoryMB()); + Assertions.assertEquals(9166898257228225747L, model.hardwareProfile().dynamicMemoryConfig().minimumMemoryMB()); + Assertions.assertEquals(106141655, model.hardwareProfile().dynamicMemoryConfig().targetMemoryBuffer()); + Assertions.assertFalse(model.hardwareProfile().dynamicMemoryConfig().enabled()); + Assertions.assertEquals("imjwosyt", model.storageProfile().dataDisks().get(0).id()); + Assertions.assertEquals("qgge", model.networkProfile().networkInterfaces().get(0).id()); + Assertions.assertEquals("varmywdmj", model.osProfile().computerName()); Assertions.assertFalse(model.osProfile().linuxConfiguration().provisionVMAgent()); - Assertions.assertTrue(model.osProfile().linuxConfiguration().provisionVMConfigAgent()); + Assertions.assertFalse(model.osProfile().linuxConfiguration().provisionVMConfigAgent()); Assertions.assertFalse(model.osProfile().windowsConfiguration().provisionVMAgent()); Assertions.assertFalse(model.osProfile().windowsConfiguration().provisionVMConfigAgent()); } @@ -46,53 +51,50 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualMachineInstanceUpdateProperties model = new VirtualMachineInstanceUpdateProperties() - .withHardwareProfile(new HardwareProfileUpdate().withVmSize(VmSizeEnum.STANDARD_DS4_V2) - .withProcessors(11756294) - .withMemoryMB(1564863042825261686L) - .withVirtualMachineGPUs(Arrays.asList( - new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() + .withHardwareProfile(new HardwareProfileUpdate().withVmSize(VmSizeEnum.STANDARD_NV12) + .withProcessors(1632471353) + .withMemoryMB(6225068900260031070L) + .withVirtualMachineGPUs( + Arrays.asList(new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() .withAssignmentType(GpuAssignmentTypeEnum.GPUP) - .withPartitionSizeMB(4154359310176459322L) - .withGpuName("hh"), - new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() - .withAssignmentType(GpuAssignmentTypeEnum.GPUP) - .withPartitionSizeMB(8381465427069984975L) - .withGpuName("ucerscdntnevfi"), - new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() - .withAssignmentType(GpuAssignmentTypeEnum.GPUP) - .withPartitionSizeMB(2197529378012958705L) - .withGpuName("dsslswt"), - new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() - .withAssignmentType(GpuAssignmentTypeEnum.GPUP) - .withPartitionSizeMB(1708954452668375735L) - .withGpuName("fzp")))) - .withStorageProfile( - new StorageProfileUpdate().withDataDisks(Arrays.asList(new VirtualHardDiskArmReference().withId("wab"), - new VirtualHardDiskArmReference().withId("tshhszhedp")))) + .withPartitionSizeMB(5606379961327556346L) + .withGpuName("jhwuaanozjos"))) + .withDynamicMemoryConfig(new VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig() + .withMaximumMemoryMB(6944179335245488017L) + .withMinimumMemoryMB(9166898257228225747L) + .withTargetMemoryBuffer(106141655) + .withEnabled(false))) + .withStorageProfile(new StorageProfileUpdate().withDataDisks(Arrays.asList( + new VirtualHardDiskArmReference().withId("imjwosyt"), new VirtualHardDiskArmReference().withId("tcs"), + new VirtualHardDiskArmReference().withId("cktqumiekkezzi"), + new VirtualHardDiskArmReference().withId("ly")))) .withNetworkProfile(new NetworkProfileUpdate() - .withNetworkInterfaces(Arrays.asList(new NetworkInterfaceArmReference().withId("ubmwmbesld"), - new NetworkInterfaceArmReference().withId("wwtppj"), - new NetworkInterfaceArmReference().withId("cxogaokonzm"), - new NetworkInterfaceArmReference().withId("ikvmkqzeqqk")))) - .withOsProfile(new OsProfileUpdate().withComputerName("fzxmhhvhgureodkw") + .withNetworkInterfaces(Arrays.asList(new NetworkInterfaceArmReference().withId("qgge"), + new NetworkInterfaceArmReference().withId("unygaeqid"), + new NetworkInterfaceArmReference().withId("fatpxllrxcyjmoa")))) + .withOsProfile(new OsProfileUpdate().withComputerName("varmywdmj") .withLinuxConfiguration(new OsProfileUpdateLinuxConfiguration().withProvisionVMAgent(false) - .withProvisionVMConfigAgent(true)) + .withProvisionVMConfigAgent(false)) .withWindowsConfiguration(new OsProfileUpdateWindowsConfiguration().withProvisionVMAgent(false) .withProvisionVMConfigAgent(false))); model = BinaryData.fromObject(model).toObject(VirtualMachineInstanceUpdateProperties.class); - Assertions.assertEquals(VmSizeEnum.STANDARD_DS4_V2, model.hardwareProfile().vmSize()); - Assertions.assertEquals(11756294, model.hardwareProfile().processors()); - Assertions.assertEquals(1564863042825261686L, model.hardwareProfile().memoryMB()); + Assertions.assertEquals(VmSizeEnum.STANDARD_NV12, model.hardwareProfile().vmSize()); + Assertions.assertEquals(1632471353, model.hardwareProfile().processors()); + Assertions.assertEquals(6225068900260031070L, model.hardwareProfile().memoryMB()); Assertions.assertEquals(GpuAssignmentTypeEnum.GPUP, model.hardwareProfile().virtualMachineGPUs().get(0).assignmentType()); - Assertions.assertEquals(4154359310176459322L, + Assertions.assertEquals(5606379961327556346L, model.hardwareProfile().virtualMachineGPUs().get(0).partitionSizeMB()); - Assertions.assertEquals("hh", model.hardwareProfile().virtualMachineGPUs().get(0).gpuName()); - Assertions.assertEquals("wab", model.storageProfile().dataDisks().get(0).id()); - Assertions.assertEquals("ubmwmbesld", model.networkProfile().networkInterfaces().get(0).id()); - Assertions.assertEquals("fzxmhhvhgureodkw", model.osProfile().computerName()); + Assertions.assertEquals("jhwuaanozjos", model.hardwareProfile().virtualMachineGPUs().get(0).gpuName()); + Assertions.assertEquals(6944179335245488017L, model.hardwareProfile().dynamicMemoryConfig().maximumMemoryMB()); + Assertions.assertEquals(9166898257228225747L, model.hardwareProfile().dynamicMemoryConfig().minimumMemoryMB()); + Assertions.assertEquals(106141655, model.hardwareProfile().dynamicMemoryConfig().targetMemoryBuffer()); + Assertions.assertFalse(model.hardwareProfile().dynamicMemoryConfig().enabled()); + Assertions.assertEquals("imjwosyt", model.storageProfile().dataDisks().get(0).id()); + Assertions.assertEquals("qgge", model.networkProfile().networkInterfaces().get(0).id()); + Assertions.assertEquals("varmywdmj", model.osProfile().computerName()); Assertions.assertFalse(model.osProfile().linuxConfiguration().provisionVMAgent()); - Assertions.assertTrue(model.osProfile().linuxConfiguration().provisionVMConfigAgent()); + Assertions.assertFalse(model.osProfile().linuxConfiguration().provisionVMConfigAgent()); Assertions.assertFalse(model.osProfile().windowsConfiguration().provisionVMAgent()); Assertions.assertFalse(model.osProfile().windowsConfiguration().provisionVMConfigAgent()); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstanceUpdateRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstanceUpdateRequestTests.java index f968a78279e35..a7c1f75f9f76b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstanceUpdateRequestTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualMachineInstanceUpdateRequestTests.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.azurestackhci.vm.models.OsProfileUpdateWindowsConfiguration; import com.azure.resourcemanager.azurestackhci.vm.models.StorageProfileUpdate; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualHardDiskArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceUpdateProperties; import com.azure.resourcemanager.azurestackhci.vm.models.VirtualMachineInstanceUpdateRequest; @@ -27,22 +28,28 @@ public final class VirtualMachineInstanceUpdateRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInstanceUpdateRequest model = BinaryData.fromString( - "{\"properties\":{\"hardwareProfile\":{\"vmSize\":\"Standard_NV6\",\"processors\":1133541665,\"memoryMB\":5718085323874880821,\"virtualMachineGPUs\":[{\"assignmentType\":\"GpuP\",\"partitionSizeMB\":6995511201429396399,\"gpuName\":\"ujmkcjhwqy\"},{\"assignmentType\":\"GpuP\",\"partitionSizeMB\":3152947325406928517,\"gpuName\":\"wj\"},{\"assignmentType\":\"GpuP\",\"partitionSizeMB\":8703835635466312899,\"gpuName\":\"ervnaenqpehi\"},{\"assignmentType\":\"GpuDDA\",\"partitionSizeMB\":3847328622576191056,\"gpuName\":\"ifthnz\"}]},\"storageProfile\":{\"dataDisks\":[{\"id\":\"gnayqigynduh\"}]},\"networkProfile\":{\"networkInterfaces\":[{\"id\":\"kthumaqolbgycdui\"},{\"id\":\"tgccymvaolpss\"}]},\"osProfile\":{\"computerName\":\"fmmdnbbg\",\"linuxConfiguration\":{\"provisionVMAgent\":true,\"provisionVMConfigAgent\":true},\"windowsConfiguration\":{\"provisionVMAgent\":true,\"provisionVMConfigAgent\":false}}},\"identity\":{\"principalId\":\"zdxss\",\"tenantId\":\"bzmnvdfznud\",\"type\":\"SystemAssigned\"}}") + "{\"properties\":{\"hardwareProfile\":{\"vmSize\":\"Standard_K8S_v1\",\"processors\":1138450132,\"memoryMB\":7518874827455710832,\"virtualMachineGPUs\":[{\"assignmentType\":\"GpuP\",\"partitionSizeMB\":518441316636125291,\"gpuName\":\"gvvcnayrhyr\"},{\"assignmentType\":\"GpuDDA\",\"partitionSizeMB\":5726286891049833981,\"gpuName\":\"edndr\"}],\"dynamicMemoryConfig\":{\"maximumMemoryMB\":3509094090426959627,\"minimumMemoryMB\":5152017214547708245,\"targetMemoryBuffer\":1018889547,\"enabled\":true}},\"storageProfile\":{\"dataDisks\":[{\"id\":\"mtdaa\"},{\"id\":\"dvwvgpio\"},{\"id\":\"wxrt\"}]},\"networkProfile\":{\"networkInterfaces\":[{\"id\":\"pxgy\"},{\"id\":\"gvr\"},{\"id\":\"npkukghimdblx\"},{\"id\":\"imfnjhfjx\"}]},\"osProfile\":{\"computerName\":\"zk\",\"linuxConfiguration\":{\"provisionVMAgent\":false,\"provisionVMConfigAgent\":true},\"windowsConfiguration\":{\"provisionVMAgent\":true,\"provisionVMConfigAgent\":false}}},\"identity\":{\"principalId\":\"jawneaiv\",\"tenantId\":\"czelpcirel\",\"type\":\"SystemAssigned\"}}") .toObject(VirtualMachineInstanceUpdateRequest.class); - Assertions.assertEquals(VmSizeEnum.STANDARD_NV6, model.properties().hardwareProfile().vmSize()); - Assertions.assertEquals(1133541665, model.properties().hardwareProfile().processors()); - Assertions.assertEquals(5718085323874880821L, model.properties().hardwareProfile().memoryMB()); + Assertions.assertEquals(VmSizeEnum.STANDARD_K8S_V1, model.properties().hardwareProfile().vmSize()); + Assertions.assertEquals(1138450132, model.properties().hardwareProfile().processors()); + Assertions.assertEquals(7518874827455710832L, model.properties().hardwareProfile().memoryMB()); Assertions.assertEquals(GpuAssignmentTypeEnum.GPUP, model.properties().hardwareProfile().virtualMachineGPUs().get(0).assignmentType()); - Assertions.assertEquals(6995511201429396399L, + Assertions.assertEquals(518441316636125291L, model.properties().hardwareProfile().virtualMachineGPUs().get(0).partitionSizeMB()); - Assertions.assertEquals("ujmkcjhwqy", + Assertions.assertEquals("gvvcnayrhyr", model.properties().hardwareProfile().virtualMachineGPUs().get(0).gpuName()); - Assertions.assertEquals("gnayqigynduh", model.properties().storageProfile().dataDisks().get(0).id()); - Assertions.assertEquals("kthumaqolbgycdui", - model.properties().networkProfile().networkInterfaces().get(0).id()); - Assertions.assertEquals("fmmdnbbg", model.properties().osProfile().computerName()); - Assertions.assertTrue(model.properties().osProfile().linuxConfiguration().provisionVMAgent()); + Assertions.assertEquals(3509094090426959627L, + model.properties().hardwareProfile().dynamicMemoryConfig().maximumMemoryMB()); + Assertions.assertEquals(5152017214547708245L, + model.properties().hardwareProfile().dynamicMemoryConfig().minimumMemoryMB()); + Assertions.assertEquals(1018889547, + model.properties().hardwareProfile().dynamicMemoryConfig().targetMemoryBuffer()); + Assertions.assertTrue(model.properties().hardwareProfile().dynamicMemoryConfig().enabled()); + Assertions.assertEquals("mtdaa", model.properties().storageProfile().dataDisks().get(0).id()); + Assertions.assertEquals("pxgy", model.properties().networkProfile().networkInterfaces().get(0).id()); + Assertions.assertEquals("zk", model.properties().osProfile().computerName()); + Assertions.assertFalse(model.properties().osProfile().linuxConfiguration().provisionVMAgent()); Assertions.assertTrue(model.properties().osProfile().linuxConfiguration().provisionVMConfigAgent()); Assertions.assertTrue(model.properties().osProfile().windowsConfiguration().provisionVMAgent()); Assertions.assertFalse(model.properties().osProfile().windowsConfiguration().provisionVMConfigAgent()); @@ -53,52 +60,58 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { VirtualMachineInstanceUpdateRequest model = new VirtualMachineInstanceUpdateRequest() .withProperties(new VirtualMachineInstanceUpdateProperties() - .withHardwareProfile(new HardwareProfileUpdate().withVmSize(VmSizeEnum.STANDARD_NV6) - .withProcessors(1133541665) - .withMemoryMB(5718085323874880821L) + .withHardwareProfile(new HardwareProfileUpdate().withVmSize(VmSizeEnum.STANDARD_K8S_V1) + .withProcessors(1138450132) + .withMemoryMB(7518874827455710832L) .withVirtualMachineGPUs(Arrays.asList( new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() .withAssignmentType(GpuAssignmentTypeEnum.GPUP) - .withPartitionSizeMB(6995511201429396399L) - .withGpuName("ujmkcjhwqy"), - new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() - .withAssignmentType(GpuAssignmentTypeEnum.GPUP) - .withPartitionSizeMB(3152947325406928517L) - .withGpuName("wj"), - new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() - .withAssignmentType(GpuAssignmentTypeEnum.GPUP) - .withPartitionSizeMB(8703835635466312899L) - .withGpuName("ervnaenqpehi"), + .withPartitionSizeMB(518441316636125291L) + .withGpuName("gvvcnayrhyr"), new VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU() .withAssignmentType(GpuAssignmentTypeEnum.GPU_DDA) - .withPartitionSizeMB(3847328622576191056L) - .withGpuName("ifthnz")))) + .withPartitionSizeMB(5726286891049833981L) + .withGpuName("edndr"))) + .withDynamicMemoryConfig(new VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig() + .withMaximumMemoryMB(3509094090426959627L) + .withMinimumMemoryMB(5152017214547708245L) + .withTargetMemoryBuffer(1018889547) + .withEnabled(true))) .withStorageProfile(new StorageProfileUpdate() - .withDataDisks(Arrays.asList(new VirtualHardDiskArmReference().withId("gnayqigynduh")))) - .withNetworkProfile(new NetworkProfileUpdate() - .withNetworkInterfaces(Arrays.asList(new NetworkInterfaceArmReference().withId("kthumaqolbgycdui"), - new NetworkInterfaceArmReference().withId("tgccymvaolpss")))) - .withOsProfile(new OsProfileUpdate().withComputerName("fmmdnbbg") - .withLinuxConfiguration(new OsProfileUpdateLinuxConfiguration().withProvisionVMAgent(true) + .withDataDisks(Arrays.asList(new VirtualHardDiskArmReference().withId("mtdaa"), + new VirtualHardDiskArmReference().withId("dvwvgpio"), + new VirtualHardDiskArmReference().withId("wxrt")))) + .withNetworkProfile(new NetworkProfileUpdate().withNetworkInterfaces(Arrays.asList( + new NetworkInterfaceArmReference().withId("pxgy"), new NetworkInterfaceArmReference().withId("gvr"), + new NetworkInterfaceArmReference().withId("npkukghimdblx"), + new NetworkInterfaceArmReference().withId("imfnjhfjx")))) + .withOsProfile(new OsProfileUpdate().withComputerName("zk") + .withLinuxConfiguration(new OsProfileUpdateLinuxConfiguration().withProvisionVMAgent(false) .withProvisionVMConfigAgent(true)) .withWindowsConfiguration(new OsProfileUpdateWindowsConfiguration().withProvisionVMAgent(true) .withProvisionVMConfigAgent(false)))) .withIdentity(new Identity().withType(IdentityType.SYSTEM_ASSIGNED)); model = BinaryData.fromObject(model).toObject(VirtualMachineInstanceUpdateRequest.class); - Assertions.assertEquals(VmSizeEnum.STANDARD_NV6, model.properties().hardwareProfile().vmSize()); - Assertions.assertEquals(1133541665, model.properties().hardwareProfile().processors()); - Assertions.assertEquals(5718085323874880821L, model.properties().hardwareProfile().memoryMB()); + Assertions.assertEquals(VmSizeEnum.STANDARD_K8S_V1, model.properties().hardwareProfile().vmSize()); + Assertions.assertEquals(1138450132, model.properties().hardwareProfile().processors()); + Assertions.assertEquals(7518874827455710832L, model.properties().hardwareProfile().memoryMB()); Assertions.assertEquals(GpuAssignmentTypeEnum.GPUP, model.properties().hardwareProfile().virtualMachineGPUs().get(0).assignmentType()); - Assertions.assertEquals(6995511201429396399L, + Assertions.assertEquals(518441316636125291L, model.properties().hardwareProfile().virtualMachineGPUs().get(0).partitionSizeMB()); - Assertions.assertEquals("ujmkcjhwqy", + Assertions.assertEquals("gvvcnayrhyr", model.properties().hardwareProfile().virtualMachineGPUs().get(0).gpuName()); - Assertions.assertEquals("gnayqigynduh", model.properties().storageProfile().dataDisks().get(0).id()); - Assertions.assertEquals("kthumaqolbgycdui", - model.properties().networkProfile().networkInterfaces().get(0).id()); - Assertions.assertEquals("fmmdnbbg", model.properties().osProfile().computerName()); - Assertions.assertTrue(model.properties().osProfile().linuxConfiguration().provisionVMAgent()); + Assertions.assertEquals(3509094090426959627L, + model.properties().hardwareProfile().dynamicMemoryConfig().maximumMemoryMB()); + Assertions.assertEquals(5152017214547708245L, + model.properties().hardwareProfile().dynamicMemoryConfig().minimumMemoryMB()); + Assertions.assertEquals(1018889547, + model.properties().hardwareProfile().dynamicMemoryConfig().targetMemoryBuffer()); + Assertions.assertTrue(model.properties().hardwareProfile().dynamicMemoryConfig().enabled()); + Assertions.assertEquals("mtdaa", model.properties().storageProfile().dataDisks().get(0).id()); + Assertions.assertEquals("pxgy", model.properties().networkProfile().networkInterfaces().get(0).id()); + Assertions.assertEquals("zk", model.properties().osProfile().computerName()); + Assertions.assertFalse(model.properties().osProfile().linuxConfiguration().provisionVMAgent()); Assertions.assertTrue(model.properties().osProfile().linuxConfiguration().provisionVMConfigAgent()); Assertions.assertTrue(model.properties().osProfile().windowsConfiguration().provisionVMAgent()); Assertions.assertFalse(model.properties().osProfile().windowsConfiguration().provisionVMConfigAgent()); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkAddressSpaceTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkAddressSpaceTests.java new file mode 100644 index 0000000000000..871bd908b9f33 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkAddressSpaceTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkAddressSpace; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkAddressSpaceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkAddressSpace model + = BinaryData.fromString("{\"addressPrefixes\":[\"pbminr\",\"dwoyuhhziuiefoz\",\"hdmsmlmzqhoftrm\"]}") + .toObject(VirtualNetworkAddressSpace.class); + Assertions.assertEquals("pbminr", model.addressPrefixes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualNetworkAddressSpace model = new VirtualNetworkAddressSpace() + .withAddressPrefixes(Arrays.asList("pbminr", "dwoyuhhziuiefoz", "hdmsmlmzqhoftrm")); + model = BinaryData.fromObject(model).toObject(VirtualNetworkAddressSpace.class); + Assertions.assertEquals("pbminr", model.addressPrefixes().get(0)); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkArmReferenceTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkArmReferenceTests.java new file mode 100644 index 0000000000000..198342ee50e01 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkArmReferenceTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkArmReference; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkArmReferenceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkArmReference model + = BinaryData.fromString("{\"resourceId\":\"lchpodbzevwrdn\"}").toObject(VirtualNetworkArmReference.class); + Assertions.assertEquals("lchpodbzevwrdn", model.resourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualNetworkArmReference model = new VirtualNetworkArmReference().withResourceId("lchpodbzevwrdn"); + model = BinaryData.fromObject(model).toObject(VirtualNetworkArmReference.class); + Assertions.assertEquals("lchpodbzevwrdn", model.resourceId()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkDhcpOptionsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkDhcpOptionsTests.java new file mode 100644 index 0000000000000..42b1425eefca6 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkDhcpOptionsTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkDhcpOptions; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkDhcpOptionsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkDhcpOptions model + = BinaryData.fromString("{\"dnsServers\":[\"u\"]}").toObject(VirtualNetworkDhcpOptions.class); + Assertions.assertEquals("u", model.dnsServers().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualNetworkDhcpOptions model = new VirtualNetworkDhcpOptions().withDnsServers(Arrays.asList("u")); + model = BinaryData.fromObject(model).toObject(VirtualNetworkDhcpOptions.class); + Assertions.assertEquals("u", model.dnsServers().get(0)); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkStatusProvisioningStatusTests.java new file mode 100644 index 0000000000000..013ba24e55f03 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkStatusProvisioningStatusTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.Status; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkStatusProvisioningStatus; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkStatusProvisioningStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkStatusProvisioningStatus model + = BinaryData.fromString("{\"operationId\":\"yylhalnswhccsp\",\"status\":\"InProgress\"}") + .toObject(VirtualNetworkStatusProvisioningStatus.class); + Assertions.assertEquals("yylhalnswhccsp", model.operationId()); + Assertions.assertEquals(Status.IN_PROGRESS, model.status()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualNetworkStatusProvisioningStatus model + = new VirtualNetworkStatusProvisioningStatus().withOperationId("yylhalnswhccsp") + .withStatus(Status.IN_PROGRESS); + model = BinaryData.fromObject(model).toObject(VirtualNetworkStatusProvisioningStatus.class); + Assertions.assertEquals("yylhalnswhccsp", model.operationId()); + Assertions.assertEquals(Status.IN_PROGRESS, model.status()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetArmReferenceTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetArmReferenceTests.java new file mode 100644 index 0000000000000..091044cc6572b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetArmReferenceTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetArmReference; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkSubnetArmReferenceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkSubnetArmReference model + = BinaryData.fromString("{\"resourceId\":\"mc\"}").toObject(VirtualNetworkSubnetArmReference.class); + Assertions.assertEquals("mc", model.resourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualNetworkSubnetArmReference model = new VirtualNetworkSubnetArmReference().withResourceId("mc"); + model = BinaryData.fromObject(model).toObject(VirtualNetworkSubnetArmReference.class); + Assertions.assertEquals("mc", model.resourceId()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetIpConfigurationReferenceTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetIpConfigurationReferenceTests.java new file mode 100644 index 0000000000000..25c6f2a5375bd --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetIpConfigurationReferenceTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetIpConfigurationReference; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkSubnetIpConfigurationReferenceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkSubnetIpConfigurationReference model = BinaryData.fromString("{\"id\":\"pfrlazsz\"}") + .toObject(VirtualNetworkSubnetIpConfigurationReference.class); + Assertions.assertEquals("pfrlazsz", model.id()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetStatusProvisioningStatusTests.java new file mode 100644 index 0000000000000..36e3d19f262e4 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetStatusProvisioningStatusTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.Status; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetStatusProvisioningStatus; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkSubnetStatusProvisioningStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkSubnetStatusProvisioningStatus model + = BinaryData.fromString("{\"operationId\":\"pj\",\"status\":\"InProgress\"}") + .toObject(VirtualNetworkSubnetStatusProvisioningStatus.class); + Assertions.assertEquals("pj", model.operationId()); + Assertions.assertEquals(Status.IN_PROGRESS, model.status()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetUpdatePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetUpdatePropertiesTests.java new file mode 100644 index 0000000000000..cf9dafb7868f0 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetUpdatePropertiesTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.NatGatewayArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.NetworkSecurityGroupArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetUpdateProperties; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkSubnetUpdatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkSubnetUpdateProperties model = BinaryData + .fromString( + "{\"networkSecurityGroup\":{\"id\":\"jvfbgofelja\"},\"natGateway\":{\"resourceId\":\"mqhldvrii\"}}") + .toObject(VirtualNetworkSubnetUpdateProperties.class); + Assertions.assertEquals("jvfbgofelja", model.networkSecurityGroup().id()); + Assertions.assertEquals("mqhldvrii", model.natGateway().resourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualNetworkSubnetUpdateProperties model = new VirtualNetworkSubnetUpdateProperties() + .withNetworkSecurityGroup(new NetworkSecurityGroupArmReference().withId("jvfbgofelja")) + .withNatGateway(new NatGatewayArmReference().withResourceId("mqhldvrii")); + model = BinaryData.fromObject(model).toObject(VirtualNetworkSubnetUpdateProperties.class); + Assertions.assertEquals("jvfbgofelja", model.networkSecurityGroup().id()); + Assertions.assertEquals("mqhldvrii", model.natGateway().resourceId()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetUpdateRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetUpdateRequestTests.java new file mode 100644 index 0000000000000..a52b67e48a102 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkSubnetUpdateRequestTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.NatGatewayArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.NetworkSecurityGroupArmReference; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetUpdateProperties; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkSubnetUpdateRequest; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkSubnetUpdateRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkSubnetUpdateRequest model = BinaryData + .fromString( + "{\"properties\":{\"networkSecurityGroup\":{\"id\":\"h\"},\"natGateway\":{\"resourceId\":\"jcdh\"}}}") + .toObject(VirtualNetworkSubnetUpdateRequest.class); + Assertions.assertEquals("h", model.properties().networkSecurityGroup().id()); + Assertions.assertEquals("jcdh", model.properties().natGateway().resourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualNetworkSubnetUpdateRequest model + = new VirtualNetworkSubnetUpdateRequest().withProperties(new VirtualNetworkSubnetUpdateProperties() + .withNetworkSecurityGroup(new NetworkSecurityGroupArmReference().withId("h")) + .withNatGateway(new NatGatewayArmReference().withResourceId("jcdh"))); + model = BinaryData.fromObject(model).toObject(VirtualNetworkSubnetUpdateRequest.class); + Assertions.assertEquals("h", model.properties().networkSecurityGroup().id()); + Assertions.assertEquals("jcdh", model.properties().natGateway().resourceId()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkTagsUpdateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkTagsUpdateTests.java new file mode 100644 index 0000000000000..582b506670839 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/src/test/java/com/azure/resourcemanager/azurestackhci/vm/generated/VirtualNetworkTagsUpdateTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.vm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.vm.models.VirtualNetworkTagsUpdate; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkTagsUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkTagsUpdate model = BinaryData + .fromString("{\"tags\":{\"zbwemh\":\"witqscywuggwoluh\",\"sbrgz\":\"i\",\"ggicccnxqhue\":\"wmsweypqwd\"}}") + .toObject(VirtualNetworkTagsUpdate.class); + Assertions.assertEquals("witqscywuggwoluh", model.tags().get("zbwemh")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualNetworkTagsUpdate model = new VirtualNetworkTagsUpdate() + .withTags(mapOf("zbwemh", "witqscywuggwoluh", "sbrgz", "i", "ggicccnxqhue", "wmsweypqwd")); + model = BinaryData.fromObject(model).toObject(VirtualNetworkTagsUpdate.class); + Assertions.assertEquals("witqscywuggwoluh", model.tags().get("zbwemh")); + } + + // 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/azurestackhci/azure-resourcemanager-azurestackhci-vm/tsp-location.yaml b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/tsp-location.yaml index 0d93cfe1f645b..fe5da26f98136 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/tsp-location.yaml +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci-vm/tsp-location.yaml @@ -1,4 +1,4 @@ -directory: specification/azurestackhci/AzureStackHCI.StackHCIVM.Management -commit: 05584a1019e75159b0dc70a6751afaa2c77868e6 +directory: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCIVM +commit: c8190fb3d1d89e788cb5b36edbc386588521153c repo: Azure/azure-rest-api-specs additionalDirectories: