diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/CHANGELOG.md b/sdk/networkcloud/azure-resourcemanager-networkcloud/CHANGELOG.md index 9f30d53b8ab6..5b899a2f8c99 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/CHANGELOG.md +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/CHANGELOG.md @@ -1,14 +1,888 @@ # Release History -## 2.2.0-beta.1 (Unreleased) +## 2.2.0-beta.1 (2026-05-06) -### Features Added +- Azure Resource Manager NetworkCloud client library for Java. This package contains Microsoft Azure SDK for NetworkCloud Management SDK. The Network Cloud APIs provide management of the Azure Operator Nexus compute resources such as on-premises clusters, hardware resources, and workload infrastructure resources. Package api-version 2026-05-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.BareMetalMachineKeySetList` was removed + +#### `models.BmcKeySetList` was removed + +#### `models.KubernetesClusterList` was removed + +#### `models.CloudServicesNetworkList` was removed + +#### `models.BareMetalMachineList` was removed + +#### `models.StorageApplianceList` was removed + +#### `models.RackList` was removed + +#### `models.VirtualMachineList` was removed + +#### `models.ClusterList` was removed + +#### `models.KubernetesClusterFeatureList` was removed + +#### `models.L2NetworkList` was removed + +#### `models.ClusterMetricsConfigurationList` was removed + +#### `models.ClusterManagerList` was removed + +#### `models.OperationListResult` was removed + +#### `models.TrunkedNetworkList` was removed + +#### `models.VolumeList` was removed + +#### `models.RackSkuList` was removed + +#### `models.ConsoleList` was removed + +#### `models.AgentPoolList` was removed + +#### `models.L3NetworkList` was removed + +#### `models.VirtualMachineAssignRelayParameters` was modified + +* `validate()` was removed + +#### `models.VirtualMachinePatchParameters` was modified + +* `validate()` was removed + +#### `models.BareMetalMachinePowerOffParameters` was modified + +* `validate()` was removed + +#### `models.Nic` was modified + +* `Nic()` was changed to private access +* `validate()` was removed + +#### `models.ClusterContinueUpdateVersionParameters` was modified + +* `validate()` was removed + +#### `models.ServicePrincipalInformation` was modified + +* `validate()` was removed + +#### `models.RuntimeProtectionConfiguration` was modified + +* `validate()` was removed + +#### `models.StorageApplianceEnableRemoteVendorManagementParameters` was modified + +* `validate()` was removed + +#### `models.KeySetUserStatus` was modified + +* `KeySetUserStatus()` was changed to private access +* `validate()` was removed + +#### `models.ClusterDeployParameters` was modified + +* `validate()` was removed + +#### `models.ClusterCapacity` was modified + +* `ClusterCapacity()` was changed to private access +* `withAvailableMemoryGB(java.lang.Long)` was removed +* `withAvailableHostStorageGB(java.lang.Long)` was removed +* `withTotalApplianceStorageGB(java.lang.Long)` was removed +* `withTotalMemoryGB(java.lang.Long)` was removed +* `validate()` was removed +* `withAvailableApplianceStorageGB(java.lang.Long)` was removed +* `withTotalHostStorageGB(java.lang.Long)` was removed +* `withAvailableCoreCount(java.lang.Long)` was removed +* `withTotalCoreCount(java.lang.Long)` was removed + +#### `models.ClusterAvailableUpgradeVersion` was modified + +* `ClusterAvailableUpgradeVersion()` was changed to private access +* `validate()` was removed + +#### `models.StorageProfile` was modified + +* `validate()` was removed + +#### `models.MachineDisk` was modified + +* `MachineDisk()` was changed to private access +* `validate()` was removed + +#### `models.BareMetalMachineKeySetPatchParameters` was modified + +* `validate()` was removed + +#### `models.IpAddressPool` was modified + +* `validate()` was removed + +#### `models.RackPatchParameters` was modified + +* `validate()` was removed + +#### `models.CloudServicesNetworkStorageOptionsPatch` was modified + +* `validate()` was removed + +#### `models.BareMetalMachineRunReadCommandsParameters` was modified + +* `validate()` was removed + +#### `models.ControlPlaneNodeConfiguration` was modified + +* `validate()` was removed + +#### `models.BgpAdvertisement` was modified + +* `validate()` was removed + +#### `models.KubernetesLabel` was modified + +* `validate()` was removed + +#### `models.OperationStatusResult` was modified + +* `java.lang.String status()` -> `java.lang.String status()` +* `java.lang.Float percentComplete()` -> `java.lang.Double percentComplete()` +* `java.lang.String resultRef()` -> `java.lang.String resultRef()` +* `java.lang.String id()` -> `java.lang.String id()` +* `java.lang.String outputHead()` -> `java.lang.String outputHead()` +* `java.time.OffsetDateTime startTime()` -> `java.time.OffsetDateTime startTime()` +* `java.time.OffsetDateTime endTime()` -> `java.time.OffsetDateTime endTime()` +* `java.lang.String name()` -> `java.lang.String name()` +* `java.lang.String resultUrl()` -> `java.lang.String resultUrl()` +* `java.lang.String resourceId()` -> `java.lang.String resourceId()` +* `com.azure.core.management.exception.ManagementError error()` -> `com.azure.core.management.exception.ManagementError error()` +* `java.lang.String exitCode()` -> `java.lang.String exitCode()` +* `innerModel()` was removed +* `java.util.List operations()` -> `java.util.List operations()` + +#### `models.LldpNeighbor` was modified + +* `LldpNeighbor()` was changed to private access +* `validate()` was removed + +#### `models.IdentitySelector` was modified + +* `validate()` was removed + +#### `models.FeatureStatus` was modified + +* `FeatureStatus()` was changed to private access +* `validate()` was removed + +#### `models.KubernetesClusterFeatures` was modified + +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String)` -> `void delete(java.lang.String,java.lang.String,java.lang.String)` +* `models.OperationStatusResult deleteById(java.lang.String)` -> `void deleteById(java.lang.String)` +* `models.OperationStatusResult deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` + +#### `models.ClusterUpdateStrategy` was modified + +* `validate()` was removed + +#### `models.TrunkedNetworkPatchParameters` was modified + +* `validate()` was removed + +#### `models.ImageRepositoryCredentials` was modified + +* `validate()` was removed + +#### `models.OsDisk` was modified + +* `validate()` was removed + +#### `models.ControlPlaneNodePatchConfiguration` was modified + +* `validate()` was removed + +#### `models.AdministratorConfiguration` was modified + +* `validate()` was removed + +#### `models.ClusterAvailableVersion` was modified + +* `ClusterAvailableVersion()` was changed to private access +* `validate()` was removed + +#### `models.StorageApplianceSkuSlot` was modified + +* `StorageApplianceSkuSlot()` was changed to private access +* `validate()` was removed + +#### `models.AdministrativeCredentials` was modified + +* `validate()` was removed + +#### `models.BareMetalMachineConfigurationData` was modified + +* `validate()` was removed + +#### `models.ClusterManagers` was modified + +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteById(java.lang.String)` -> `void deleteById(java.lang.String)` +* `models.OperationStatusResult deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteByResourceGroup(java.lang.String,java.lang.String)` -> `void deleteByResourceGroup(java.lang.String,java.lang.String)` + +#### `models.AgentPools` was modified + +* `models.OperationStatusResult deleteById(java.lang.String)` -> `void deleteById(java.lang.String)` +* `models.OperationStatusResult deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String)` -> `void delete(java.lang.String,java.lang.String,java.lang.String)` + +#### `models.StringKeyValuePair` was modified + +* `validate()` was removed + +#### `models.VulnerabilityScanningSettings` was modified + +* `validate()` was removed + +#### `models.NetworkAttachment` was modified + +* `validate()` was removed + +#### `models.SecretArchiveReference` was modified + +* `SecretArchiveReference()` was changed to private access +* `validate()` was removed + +#### `models.HardwareInventoryNetworkInterface` was modified + +* `HardwareInventoryNetworkInterface()` was changed to private access +* `validate()` was removed + +#### `models.SecretArchiveSettings` was modified + +* `validate()` was removed + +#### `models.AvailableUpgrade` was modified + +* `AvailableUpgrade()` was changed to private access +* `validate()` was removed + +#### `models.EgressEndpoint` was modified + +* `validate()` was removed + +#### `models.CommandOutputSettings` was modified + +* `validate()` was removed + +#### `models.AttachedNetworkConfiguration` was modified + +* `validate()` was removed + +#### `models.L2NetworkPatchParameters` was modified + +* `validate()` was removed + +#### `models.StepState` was modified + +* `StepState()` was changed to private access +* `validate()` was removed + +#### `models.StorageAppliancePatchParameters` was modified + +* `validate()` was removed + +#### `models.RuntimeProtectionStatus` was modified + +* `RuntimeProtectionStatus()` was changed to private access +* `validate()` was removed + +#### `models.RackDefinition` was modified + +* `validate()` was removed + +#### `models.L2NetworkAttachmentConfiguration` was modified + +* `validate()` was removed + +#### `models.KubernetesClusterNode` was modified + +* `KubernetesClusterNode()` was changed to private access +* `validate()` was removed + +#### `models.StorageApplianceRunReadCommandsParameters` was modified + +* `validate()` was removed + +#### `models.NetworkInterface` was modified + +* `NetworkInterface()` was changed to private access +* `validate()` was removed + +#### `models.OperationDisplay` was modified + +* `OperationDisplay()` was changed to private access +* `validate()` was removed + +#### `models.ServiceLoadBalancerBgpPeer` was modified + +* `validate()` was removed + +#### `models.InitialAgentPoolConfiguration` was modified + +* `validate()` was removed + +#### `models.StorageApplianceCommandSpecification` was modified + +* `validate()` was removed + +#### `models.L2Networks` was modified + +* `models.OperationStatusResult deleteByResourceGroup(java.lang.String,java.lang.String)` -> `void deleteByResourceGroup(java.lang.String,java.lang.String)` +* `models.OperationStatusResult deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteById(java.lang.String)` -> `void deleteById(java.lang.String)` +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` + +#### `models.EndpointDependency` was modified + +* `validate()` was removed + +#### `models.BareMetalMachineCordonParameters` was modified + +* `validate()` was removed + +#### `models.BareMetalMachine` was modified + +* `reimage(com.azure.core.util.Context)` was removed + +#### `models.TrunkedNetworkAttachmentConfiguration` was modified + +* `validate()` was removed + +#### `models.CloudServicesNetworkStorageStatus` was modified + +* `CloudServicesNetworkStorageStatus()` was changed to private access +* `validate()` was removed + +#### `models.VulnerabilityScanningSettingsPatch` was modified + +* `validate()` was removed + +#### `models.NodePoolAdministratorConfigurationPatch` was modified + +* `validate()` was removed + +#### `models.BareMetalMachineKeySets` was modified + +* `models.OperationStatusResult deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String)` -> `void delete(java.lang.String,java.lang.String,java.lang.String)` +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteById(java.lang.String)` -> `void deleteById(java.lang.String)` + +#### `models.NetworkConfiguration` was modified + +* `validate()` was removed + +#### `models.AgentOptions` was modified + +* `validate()` was removed + +#### `models.Racks` was modified + +* `models.OperationStatusResult deleteByResourceGroup(java.lang.String,java.lang.String)` -> `void deleteByResourceGroup(java.lang.String,java.lang.String)` +* `models.OperationStatusResult deleteById(java.lang.String)` -> `void deleteById(java.lang.String)` +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` + +#### `models.ClusterManagerPatchParameters` was modified + +* `validate()` was removed + +#### `models.BareMetalMachineCommandSpecification` was modified + +* `validate()` was removed + +#### `models.StorageAppliances` was modified + +* `models.OperationStatusResult deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteById(java.lang.String)` -> `void deleteById(java.lang.String)` +* `models.OperationStatusResult deleteByResourceGroup(java.lang.String,java.lang.String)` -> `void deleteByResourceGroup(java.lang.String,java.lang.String)` +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` + +#### `models.UserAssignedIdentity` was modified + +* `java.util.UUID clientId()` -> `java.lang.String clientId()` +* `validate()` was removed +* `java.util.UUID principalId()` -> `java.lang.String principalId()` + +#### `models.AadConfiguration` was modified + +* `validate()` was removed + +#### `models.ConsolePatchParameters` was modified + +* `validate()` was removed + +#### `models.Clusters` was modified + +* `models.OperationStatusResult deleteByResourceGroup(java.lang.String,java.lang.String)` -> `void deleteByResourceGroup(java.lang.String,java.lang.String)` +* `models.OperationStatusResult deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteById(java.lang.String)` -> `void deleteById(java.lang.String)` +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` + +#### `models.HardwareValidationStatus` was modified + +* `HardwareValidationStatus()` was changed to private access +* `validate()` was removed + +#### `models.BareMetalMachineReplaceParameters` was modified + +* `validate()` was removed + +#### `models.AgentPoolPatchParameters` was modified + +* `validate()` was removed + +#### `models.VirtualMachinePowerOffParameters` was modified + +* `validate()` was removed + +#### `models.CloudServicesNetworkPatchParameters` was modified + +* `validate()` was removed + +#### `models.AdministratorConfigurationPatch` was modified + +* `validate()` was removed + +#### `models.ValidationThreshold` was modified + +* `validate()` was removed + +#### `models.MetricsConfigurations` was modified + +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String)` -> `void delete(java.lang.String,java.lang.String,java.lang.String)` +* `models.OperationStatusResult deleteById(java.lang.String)` -> `void deleteById(java.lang.String)` + +#### `models.ActionState` was modified + +* `ActionState()` was changed to private access +* `validate()` was removed + +#### `models.CommandOutputOverride` was modified + +* `validate()` was removed + +#### `models.Volumes` was modified + +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteById(java.lang.String)` -> `void deleteById(java.lang.String)` +* `models.OperationStatusResult deleteByResourceGroup(java.lang.String,java.lang.String)` -> `void deleteByResourceGroup(java.lang.String,java.lang.String)` + +#### `models.KubernetesClusters` was modified + +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteById(java.lang.String)` -> `void deleteById(java.lang.String)` +* `models.OperationStatusResult deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteByResourceGroup(java.lang.String,java.lang.String)` -> `void deleteByResourceGroup(java.lang.String,java.lang.String)` + +#### `models.L2ServiceLoadBalancerConfiguration` was modified + +* `validate()` was removed + +#### `models.BareMetalMachinePatchParameters` was modified + +* `validate()` was removed + +#### `models.ExtendedLocation` was modified + +* `java.lang.String type()` -> `models.ExtendedLocationType type()` +* `withType(java.lang.String)` was removed +* `validate()` was removed + +#### `models.ManagedResourceGroupConfiguration` was modified + +* `validate()` was removed + +#### `models.KubernetesClusterFeaturePatchParameters` was modified + +* `validate()` was removed + +#### `models.Consoles` was modified + +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String)` -> `void delete(java.lang.String,java.lang.String,java.lang.String)` +* `models.OperationStatusResult deleteById(java.lang.String)` -> `void deleteById(java.lang.String)` + +#### `models.HardwareInventory` was modified + +* `HardwareInventory()` was changed to private access +* `validate()` was removed + +#### `models.BareMetalMachineRunDataExtractsParameters` was modified + +* `validate()` was removed + +#### `models.BareMetalMachineRunCommandParameters` was modified + +* `validate()` was removed + +#### `models.L3Networks` was modified + +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteByResourceGroup(java.lang.String,java.lang.String)` -> `void deleteByResourceGroup(java.lang.String,java.lang.String)` +* `models.OperationStatusResult deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteById(java.lang.String)` -> `void deleteById(java.lang.String)` + +#### `models.ClusterPatchParameters` was modified + +* `validate()` was removed + +#### `models.ManagedServiceIdentity` was modified + +* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` +* `java.util.UUID principalId()` -> `java.lang.String principalId()` +* `validate()` was removed + +#### `models.L3NetworkPatchParameters` was modified + +* `validate()` was removed + +#### `NetworkCloudManager` was modified + +* `fluent.NetworkCloud serviceClient()` -> `fluent.NetworkCloudManagementClient serviceClient()` + +#### `models.BgpServiceLoadBalancerConfiguration` was modified + +* `validate()` was removed + +#### `models.CloudServicesNetworks` was modified + +* `models.OperationStatusResult deleteById(java.lang.String)` -> `void deleteById(java.lang.String)` +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteByResourceGroup(java.lang.String,java.lang.String)` -> `void deleteByResourceGroup(java.lang.String,java.lang.String)` +* `models.OperationStatusResult deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` + +#### `models.ClusterScanRuntimeParameters` was modified + +* `validate()` was removed + +#### `models.BmcKeySetPatchParameters` was modified + +* `validate()` was removed + +#### `models.SshPublicKey` was modified + +* `validate()` was removed + +#### `models.ClusterUpdateVersionParameters` was modified + +* `validate()` was removed + +#### `models.SecretRotationStatus` was modified + +* `SecretRotationStatus()` was changed to private access +* `validate()` was removed + +#### `models.AgentPoolUpgradeSettings` was modified + +* `validate()` was removed + +#### `models.KeySetUser` was modified + +* `validate()` was removed + +#### `models.VolumePatchParameters` was modified + +* `validate()` was removed + +#### `models.KubernetesClusterRestartNodeParameters` was modified + +* `validate()` was removed + +#### `models.L3NetworkAttachmentConfiguration` was modified + +* `validate()` was removed + +#### `models.StorageApplianceConfigurationData` was modified + +* `validate()` was removed + +#### `models.MachineSkuSlot` was modified + +* `MachineSkuSlot()` was changed to private access +* `validate()` was removed + +#### `models.BmcKeySets` was modified + +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteById(java.lang.String)` -> `void deleteById(java.lang.String)` +* `models.OperationStatusResult deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String)` -> `void delete(java.lang.String,java.lang.String,java.lang.String)` + +#### `models.BareMetalMachines` was modified + +* `models.OperationStatusResult deleteByResourceGroup(java.lang.String,java.lang.String)` -> `void deleteByResourceGroup(java.lang.String,java.lang.String)` +* `models.OperationStatusResult deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteById(java.lang.String)` -> `void deleteById(java.lang.String)` +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `reimage(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.VirtualMachines` was modified + +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteByResourceGroup(java.lang.String,java.lang.String)` -> `void deleteByResourceGroup(java.lang.String,java.lang.String)` +* `models.OperationStatusResult deleteById(java.lang.String)` -> `void deleteById(java.lang.String)` + +#### `models.AnalyticsOutputSettings` was modified + +* `validate()` was removed + +#### `models.KubernetesClusterPatchParameters` was modified + +* `validate()` was removed + +#### `models.VirtualMachinePlacementHint` was modified + +* `validate()` was removed + +#### `models.ClusterMetricsConfigurationPatchParameters` was modified + +* `validate()` was removed + +#### `models.ClusterSecretArchive` was modified + +* `validate()` was removed + +#### `models.CertificateInfo` was modified + +* `CertificateInfo()` was changed to private access +* `validate()` was removed + +#### `models.TrunkedNetworks` was modified + +* `models.OperationStatusResult delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` +* `models.OperationStatusResult deleteById(java.lang.String)` -> `void deleteById(java.lang.String)` +* `models.OperationStatusResult deleteByResourceGroup(java.lang.String,java.lang.String)` -> `void deleteByResourceGroup(java.lang.String,java.lang.String)` +* `models.OperationStatusResult deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` + +#### `models.CloudServicesNetworkStorageOptions` was modified + +* `validate()` was removed + +### Features Added + +* `models.ClusterManagerUpdateRelayPrivateEndpointConnectionParameters` was added + +* `models.BareMetalMachineMetricsConfigurationStatusLogLevel` was added + +* `models.ClusterContinueUpdateVersionSafeguardMode` was added + +* `models.ExtendedLocationType` was added + +* `models.KubernetesVersions` was added + +* `models.AccessBridgeProvisioningState` was added + +* `models.AccessBridgePatchProperties` was added + +* `models.DeploymentType` was added + +* `models.ClusterUpdateVersionSafeguardMode` was added + +* `models.StorageApplianceMetricsConfigurationStatusLogLevel` was added + +* `models.KubernetesVersion$Update` was added + +* `models.FilterDevices` was added + +* `models.AccessBridgeEndpoint` was added + +* `models.AccessBridge$UpdateStages` was added + +* `models.AccessBridgeDetailedStatus` was added + +* `models.RelayPrivateEndpointConnectionState` was added + +* `models.KubernetesVersion$Definition` was added + +* `models.AccessBridge$DefinitionStages` was added + +* `models.StorageApplianceMetricsConfigurationStatusMetricsLevel` was added + +* `models.BareMetalMachineReimageParameters` was added + +* `models.AccessBridge$Definition` was added + +* `models.StorageApplianceExpansionShelf` was added + +* `models.RuntimeProtectionAgentLicenseStatus` was added + +* `models.BareMetalMachineMonitoringConfigurationStatus` was added + +* `models.KubernetesVersion$DefinitionStages` was added + +* `models.ClusterInspectParameters` was added + +* `models.AccessBridge$Update` was added + +* `models.RuntimeProtectionDefinitionUpdateMode` was added + +* `models.TransportProtocol` was added + +* `models.SecurityRuleDirection` was added + +* `models.RuntimeProtectionAgentHealthStatus` was added + +* `models.BareMetalMachineMetricsConfigurationStatusMetricsLevel` was added + +* `models.StorageApplianceMonitoringConfigurationStatus` was added + +* `models.ClusterRotateCredentialParameters` was added + +* `models.KubernetesVersionProvisioningState` was added + +* `models.AccessBridge` was added + +* `models.AccessBridgeSecurityRule` was added + +* `models.ClusterManagerRelayConfiguration` was added + +* `models.KubernetesVersion$UpdateStages` was added + +* `models.BareMetalMachineReimageSafeguardMode` was added + +* `models.AccessBridgeAllowedName` was added + +* `models.KubernetesVersionValue` was added + +* `models.KubernetesVersionPatchParameters` was added + +* `models.AccessBridges` was added + +* `models.KubernetesVersion` was added + +* `models.ClusterInspectAdditionalAction` was added + +* `models.AccessBridgePatchParameters` was added + +#### `models.ClusterContinueUpdateVersionParameters` was modified + +* `safeguardMode()` was added +* `withSafeguardMode(models.ClusterContinueUpdateVersionSafeguardMode)` was added + +#### `models.RuntimeProtectionConfiguration` was modified + +* `withDefinitionUpdateMode(models.RuntimeProtectionDefinitionUpdateMode)` was added +* `definitionUpdateMode()` was added + +#### `models.OperationStatusResult` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.StorageAppliance` was modified + +* `expansionShelves()` was added +* `monitoringConfigurationStatus()` was added + +#### `models.CloudServicesNetworkStorageStatusStatus` was modified + +* `REPAIRING` was added +* `INITIALIZING` was added +* `NONE` was added + +#### `models.ClusterManagers` was modified + +* `updateRelayPrivateEndpointConnection(java.lang.String,java.lang.String)` was added +* `updateRelayPrivateEndpointConnection(java.lang.String,java.lang.String,models.ClusterManagerUpdateRelayPrivateEndpointConnectionParameters,com.azure.core.util.Context)` was added + +#### `models.ClusterManager$Definition` was modified + +* `withKind(models.DeploymentType)` was added + +#### `models.RuntimeProtectionStatus` was modified + +* `agentHealthStatus()` was added +* `agentHealthStatusIssues()` was added +* `enforcementLevel()` was added +* `definitionUpdateMode()` was added +* `agentLicenseStatus()` was added + +#### `models.ClusterManager` was modified + +* `kind()` was added +* `relayConfiguration()` was added +* `updateRelayPrivateEndpointConnection()` was added +* `updateRelayPrivateEndpointConnection(models.ClusterManagerUpdateRelayPrivateEndpointConnectionParameters,com.azure.core.util.Context)` was added + +#### `models.BareMetalMachine` was modified + +* `reimage(models.BareMetalMachineReimageParameters,com.azure.core.util.Context)` was added +* `bmcIpv6Address()` was added +* `monitoringConfigurationStatus()` was added +* `bmcIpv4Address()` was added + +#### `models.CommandOutputType` was modified + +* `CLUSTER_SUPPORT_ADMINISTRATIVE_ACTIONS` was added + +#### `models.Cluster` was modified + +* `inspect()` was added +* `rotateCredential(models.ClusterRotateCredentialParameters,com.azure.core.util.Context)` was added +* `inspect(models.ClusterInspectParameters,com.azure.core.util.Context)` was added +* `managedCredentials()` was added +* `lastSuccessfulVersionUpdateTime()` was added +* `kind()` was added +* `rotateCredential(models.ClusterRotateCredentialParameters)` was added + +#### `models.Clusters` was modified + +* `rotateCredential(java.lang.String,java.lang.String,models.ClusterRotateCredentialParameters)` was added +* `rotateCredential(java.lang.String,java.lang.String,models.ClusterRotateCredentialParameters,com.azure.core.util.Context)` was added +* `inspect(java.lang.String,java.lang.String)` was added +* `inspect(java.lang.String,java.lang.String,models.ClusterInspectParameters,com.azure.core.util.Context)` was added + +#### `models.Volume` was modified + +* `assignedStorageApplianceId()` was added + +#### `models.ExtendedLocation` was modified + +* `withType(models.ExtendedLocationType)` was added + +#### `NetworkCloudManager` was modified + +* `accessBridges()` was added +* `kubernetesVersions()` was added + +#### `models.ClusterUpdateVersionParameters` was modified + +* `safeguardMode()` was added +* `withSafeguardMode(models.ClusterUpdateVersionSafeguardMode)` was added + +#### `models.Cluster$Definition` was modified + +* `withKind(models.DeploymentType)` was added + +#### `models.BareMetalMachines` was modified + +* `reimage(java.lang.String,java.lang.String,models.BareMetalMachineReimageParameters,com.azure.core.util.Context)` was added + +#### `models.RackSku` was modified -### Other Changes +* `deploymentType()` was added ## 2.1.0 (2025-12-17) diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/README.md b/sdk/networkcloud/azure-resourcemanager-networkcloud/README.md index b7eb6d80708b..c198d626ae29 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/README.md +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/README.md @@ -2,7 +2,7 @@ Azure Resource Manager NetworkCloud client library for Java. -This package contains Microsoft Azure SDK for NetworkCloud Management SDK. The Network Cloud APIs provide management of the Azure Operator Nexus compute resources such as on-premises clusters, hardware resources, and workload infrastructure resources. Package tag package-2025-09-01. 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 NetworkCloud Management SDK. The Network Cloud APIs provide management of the Azure Operator Nexus compute resources such as on-premises clusters, hardware resources, and workload infrastructure resources. Package api-version 2026-05-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-networkcloud - 2.1.0 + 2.2.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/SAMPLE.md b/sdk/networkcloud/azure-resourcemanager-networkcloud/SAMPLE.md index 09025d09eddb..25c311d4e5f7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/SAMPLE.md +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/SAMPLE.md @@ -1,6 +1,15 @@ # Code snippets and samples +## AccessBridges + +- [CreateOrUpdate](#accessbridges_createorupdate) +- [Delete](#accessbridges_delete) +- [GetByResourceGroup](#accessbridges_getbyresourcegroup) +- [List](#accessbridges_list) +- [ListByResourceGroup](#accessbridges_listbyresourcegroup) +- [Update](#accessbridges_update) + ## AgentPools - [CreateOrUpdate](#agentpools_createorupdate) @@ -62,6 +71,7 @@ - [List](#clustermanagers_list) - [ListByResourceGroup](#clustermanagers_listbyresourcegroup) - [Update](#clustermanagers_update) +- [UpdateRelayPrivateEndpointConnection](#clustermanagers_updaterelayprivateendpointconnection) ## Clusters @@ -70,8 +80,10 @@ - [Delete](#clusters_delete) - [Deploy](#clusters_deploy) - [GetByResourceGroup](#clusters_getbyresourcegroup) +- [Inspect](#clusters_inspect) - [List](#clusters_list) - [ListByResourceGroup](#clusters_listbyresourcegroup) +- [RotateCredential](#clusters_rotatecredential) - [ScanRuntime](#clusters_scanruntime) - [Update](#clusters_update) - [UpdateVersion](#clusters_updateversion) @@ -102,6 +114,15 @@ - [RestartNode](#kubernetesclusters_restartnode) - [Update](#kubernetesclusters_update) +## KubernetesVersions + +- [CreateOrUpdate](#kubernetesversions_createorupdate) +- [Delete](#kubernetesversions_delete) +- [GetByResourceGroup](#kubernetesversions_getbyresourcegroup) +- [List](#kubernetesversions_list) +- [ListByResourceGroup](#kubernetesversions_listbyresourcegroup) +- [Update](#kubernetesversions_update) + ## L2Networks - [CreateOrUpdate](#l2networks_createorupdate) @@ -189,6 +210,213 @@ - [List](#volumes_list) - [ListByResourceGroup](#volumes_listbyresourcegroup) - [Update](#volumes_update) +### AccessBridges_CreateOrUpdate + +```java +import com.azure.resourcemanager.networkcloud.models.AccessBridgeAllowedName; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeSecurityRule; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; +import com.azure.resourcemanager.networkcloud.models.SecurityRuleDirection; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for AccessBridges CreateOrUpdate. + */ +public final class AccessBridgesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/AccessBridges_CreateOrUpdate.json + */ + /** + * Sample code: Create or update access bridge. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void createOrUpdateAccessBridge(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.accessBridges() + .define(AccessBridgeAllowedName.BASTION) + .withRegion("location") + .withExistingResourceGroup("resourceGroupName") + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") + .withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withNetworkId( + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName/internalNetworks/internalNetworkName") + .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) + .withIpv4ConnectedPrefix("198.51.100.0/24") + .withIpv6ConnectedPrefix("2001:db8::/64") + .withSecurityRules( + Arrays.asList(new AccessBridgeSecurityRule().withDescription("Allow management plane egress") + .withDirection(SecurityRuleDirection.OUTBOUND) + .withIpv4Addresses(Arrays.asList("10.10.20.10-10.10.20.20")) + .withIpv6Addresses(Arrays.asList("2001:db8:abcd:12::1000-2001:db8:abcd:12::1fff")) + .withPort("24562-24570"))) + .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; + } +} +``` + +### AccessBridges_Delete + +```java +import com.azure.resourcemanager.networkcloud.models.AccessBridgeAllowedName; + +/** + * Samples for AccessBridges Delete. + */ +public final class AccessBridgesDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/AccessBridges_Delete.json + */ + /** + * Sample code: Delete access bridge. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void deleteAccessBridge(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.accessBridges() + .delete("resourceGroupName", AccessBridgeAllowedName.BASTION, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### AccessBridges_GetByResourceGroup + +```java +import com.azure.resourcemanager.networkcloud.models.AccessBridgeAllowedName; + +/** + * Samples for AccessBridges GetByResourceGroup. + */ +public final class AccessBridgesGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/AccessBridges_Get.json + */ + /** + * Sample code: Get access bridge. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void getAccessBridge(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.accessBridges() + .getByResourceGroupWithResponse("resourceGroupName", AccessBridgeAllowedName.BASTION, + com.azure.core.util.Context.NONE); + } +} +``` + +### AccessBridges_List + +```java +/** + * Samples for AccessBridges List. + */ +public final class AccessBridgesListSamples { + /* + * x-ms-original-file: 2026-05-01-preview/AccessBridges_ListBySubscription.json + */ + /** + * Sample code: List access bridges for subscription. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void + listAccessBridgesForSubscription(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.accessBridges().list(null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### AccessBridges_ListByResourceGroup + +```java +/** + * Samples for AccessBridges ListByResourceGroup. + */ +public final class AccessBridgesListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/AccessBridges_ListByResourceGroup.json + */ + /** + * Sample code: List access bridges for resource group. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void + listAccessBridgesForResourceGroup(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.accessBridges().listByResourceGroup("resourceGroupName", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### AccessBridges_Update + +```java +import com.azure.resourcemanager.networkcloud.models.AccessBridge; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeAllowedName; +import com.azure.resourcemanager.networkcloud.models.AccessBridgePatchProperties; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeSecurityRule; +import com.azure.resourcemanager.networkcloud.models.SecurityRuleDirection; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for AccessBridges Update. + */ +public final class AccessBridgesUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/AccessBridges_Patch.json + */ + /** + * Sample code: Patch access bridge. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void patchAccessBridge(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + AccessBridge resource = manager.accessBridges() + .getByResourceGroupWithResponse("resourceGroupName", AccessBridgeAllowedName.BASTION, + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) + .withProperties(new AccessBridgePatchProperties().withSecurityRules( + Arrays.asList(new AccessBridgeSecurityRule().withDescription("Allow management plane egress") + .withDirection(SecurityRuleDirection.OUTBOUND) + .withIpv4Addresses(Arrays.asList("10.10.20.10-10.10.20.20")) + .withIpv6Addresses(Arrays.asList("2001:db8:abcd:12::1000-2001:db8:abcd:12::1fff")) + .withPort("24562-24570")))) + .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; + } +} +``` + ### AgentPools_CreateOrUpdate ```java @@ -198,6 +426,7 @@ import com.azure.resourcemanager.networkcloud.models.AgentPoolMode; import com.azure.resourcemanager.networkcloud.models.AgentPoolUpgradeSettings; import com.azure.resourcemanager.networkcloud.models.AttachedNetworkConfiguration; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HugepagesSize; import com.azure.resourcemanager.networkcloud.models.KubernetesLabel; import com.azure.resourcemanager.networkcloud.models.KubernetesPluginType; @@ -215,9 +444,7 @@ import java.util.Map; */ public final class AgentPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Create. - * json + * x-ms-original-file: 2026-05-01-preview/AgentPools_Create.json */ /** * Sample code: Create or update Kubernetes cluster agent pool. @@ -236,7 +463,7 @@ public final class AgentPoolsCreateOrUpdateSamples { .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withAdministratorConfiguration(new AdministratorConfiguration().withAdminUsername("azure") .withSshPublicKeys(Arrays.asList(new SshPublicKey().withKeyData("fakeTokenPlaceholder")))) .withAgentOptions(new AgentOptions().withHugepagesCount(96L).withHugepagesSize(HugepagesSize.ONEG)) @@ -282,9 +509,7 @@ public final class AgentPoolsCreateOrUpdateSamples { */ public final class AgentPoolsDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Delete. - * json + * x-ms-original-file: 2026-05-01-preview/AgentPools_Delete.json */ /** * Sample code: Delete Kubernetes cluster agent pool. @@ -308,8 +533,7 @@ public final class AgentPoolsDeleteSamples { */ public final class AgentPoolsGetSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Get.json + * x-ms-original-file: 2026-05-01-preview/AgentPools_Get.json */ /** * Sample code: Get Kubernetes cluster agent pool. @@ -333,9 +557,7 @@ public final class AgentPoolsGetSamples { */ public final class AgentPoolsListByKubernetesClusterSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * AgentPools_ListByKubernetesCluster.json + * x-ms-original-file: 2026-05-01-preview/AgentPools_ListByKubernetesCluster.json */ /** * Sample code: List agent pools of the Kubernetes cluster. @@ -367,9 +589,7 @@ import java.util.Map; */ public final class AgentPoolsUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Patch. - * json + * x-ms-original-file: 2026-05-01-preview/AgentPools_Patch.json */ /** * Sample code: Patch Kubernetes cluster agent pool. @@ -411,6 +631,7 @@ public final class AgentPoolsUpdateSamples { ```java import com.azure.resourcemanager.networkcloud.models.BareMetalMachineKeySetPrivilegeLevel; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.KeySetUser; import com.azure.resourcemanager.networkcloud.models.SshPublicKey; import java.time.OffsetDateTime; @@ -423,9 +644,7 @@ import java.util.Map; */ public final class BareMetalMachineKeySetsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachineKeySets_Create.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Create.json */ /** * Sample code: Create or update bare metal machine key set of cluster. @@ -440,7 +659,7 @@ public final class BareMetalMachineKeySetsCreateOrUpdateSamples { .withExistingCluster("resourceGroupName", "clusterName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withAzureGroupId("f110271b-XXXX-4163-9b99-214d91660f0e") .withExpiration(OffsetDateTime.parse("2022-12-31T23:59:59.008Z")) .withJumpHostsAllowed(Arrays.asList("192.0.2.1", "192.0.2.5")) @@ -482,9 +701,7 @@ public final class BareMetalMachineKeySetsCreateOrUpdateSamples { */ public final class BareMetalMachineKeySetsDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachineKeySets_Delete.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Delete.json */ /** * Sample code: Delete bare metal machine key set of cluster. @@ -508,9 +725,7 @@ public final class BareMetalMachineKeySetsDeleteSamples { */ public final class BareMetalMachineKeySetsGetSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachineKeySets_Get.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Get.json */ /** * Sample code: Get bare metal machine key set of cluster. @@ -534,9 +749,7 @@ public final class BareMetalMachineKeySetsGetSamples { */ public final class BareMetalMachineKeySetsListByClusterSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachineKeySets_ListByCluster.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_ListByCluster.json */ /** * Sample code: List bare metal machine key sets of the cluster. @@ -567,9 +780,7 @@ import java.util.Map; */ public final class BareMetalMachineKeySetsUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachineKeySets_Patch.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Patch.json */ /** * Sample code: Patch bare metal machine key set of cluster. @@ -623,9 +834,7 @@ import com.azure.resourcemanager.networkcloud.models.BareMetalMachineEvacuate; */ public final class BareMetalMachinesCordonSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Cordon.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Cordon.json */ /** * Sample code: Cordon bare metal machine. @@ -646,6 +855,7 @@ public final class BareMetalMachinesCordonSamples { ```java import com.azure.resourcemanager.networkcloud.models.AdministrativeCredentials; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.util.HashMap; import java.util.Map; @@ -654,9 +864,7 @@ import java.util.Map; */ public final class BareMetalMachinesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Create.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Create.json */ /** * Sample code: Create or update bare metal machine. @@ -671,8 +879,8 @@ public final class BareMetalMachinesCreateOrUpdateSamples { .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) - .withBmcConnectionString("bmcconnectionstring") + .withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withBmcConnectionString("redfish+https://10.10.10.16/redfish/v1/Systems/System.Embedded.1") .withBmcCredentials( new AdministrativeCredentials().withPassword("fakeTokenPlaceholder").withUsername("bmcuser")) .withBmcMacAddress("00:00:4f:00:57:00") @@ -710,9 +918,7 @@ public final class BareMetalMachinesCreateOrUpdateSamples { */ public final class BareMetalMachinesDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Delete.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Delete.json */ /** * Sample code: Delete bare metal machine. @@ -734,9 +940,7 @@ public final class BareMetalMachinesDeleteSamples { */ public final class BareMetalMachinesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Get.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Get.json */ /** * Sample code: Get bare metal machine. @@ -759,9 +963,7 @@ public final class BareMetalMachinesGetByResourceGroupSamples { */ public final class BareMetalMachinesListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_ListBySubscription.json */ /** * Sample code: List bare metal machines for subscription. @@ -783,9 +985,7 @@ public final class BareMetalMachinesListSamples { */ public final class BareMetalMachinesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_ListByResourceGroup.json */ /** * Sample code: List bare metal machines for resource group. @@ -811,9 +1011,7 @@ import com.azure.resourcemanager.networkcloud.models.BareMetalMachineSkipShutdow */ public final class BareMetalMachinesPowerOffSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_PowerOff.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_PowerOff.json */ /** * Sample code: Power off bare metal machine. @@ -832,14 +1030,15 @@ public final class BareMetalMachinesPowerOffSamples { ### BareMetalMachines_Reimage ```java +import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReimageParameters; +import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReimageSafeguardMode; + /** * Samples for BareMetalMachines Reimage. */ public final class BareMetalMachinesReimageSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Reimage.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Reimage.json */ /** * Sample code: Reimage bare metal machine. @@ -848,7 +1047,9 @@ public final class BareMetalMachinesReimageSamples { */ public static void reimageBareMetalMachine(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { manager.bareMetalMachines() - .reimage("resourceGroupName", "bareMetalMachineName", com.azure.core.util.Context.NONE); + .reimage("resourceGroupName", "bareMetalMachineName", + new BareMetalMachineReimageParameters().withSafeguardMode(BareMetalMachineReimageSafeguardMode.ALL), + com.azure.core.util.Context.NONE); } } ``` @@ -866,9 +1067,7 @@ import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReplaceStor */ public final class BareMetalMachinesReplaceSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Replace.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Replace.json */ /** * Sample code: Replace bare metal machine. @@ -900,9 +1099,7 @@ public final class BareMetalMachinesReplaceSamples { */ public final class BareMetalMachinesRestartSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Restart.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Restart.json */ /** * Sample code: Restart bare metal machine. @@ -927,9 +1124,7 @@ import java.util.Arrays; */ public final class BareMetalMachinesRunCommandSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_RunCommand.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunCommand.json */ /** * Sample code: Run command on bare metal machine. @@ -960,9 +1155,7 @@ import java.util.Arrays; */ public final class BareMetalMachinesRunDataExtractsSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_RunDataExtracts.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunDataExtracts.json */ /** * Sample code: Run data extraction on bare metal machine. @@ -994,9 +1187,7 @@ import java.util.Arrays; */ public final class BareMetalMachinesRunDataExtractsRestrictedSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_RunDataExtractsRestricted.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunDataExtractsRestricted.json */ /** * Sample code: Run restricted data extraction on bare metal machine. @@ -1028,9 +1219,7 @@ import java.util.Arrays; */ public final class BareMetalMachinesRunReadCommandsSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_RunReadCommands_Hostname.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunReadCommands_Hostname.json */ /** * Sample code: Run and retrieve output from a single read only command on bare metal machine. @@ -1048,9 +1237,7 @@ public final class BareMetalMachinesRunReadCommandsSamples { } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_RunReadCommands_Multiple.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunReadCommands_Multiple.json */ /** * Sample code: Run and retrieve output from read only commands on bare metal machine. @@ -1080,9 +1267,7 @@ public final class BareMetalMachinesRunReadCommandsSamples { */ public final class BareMetalMachinesStartSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Start.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Start.json */ /** * Sample code: Start bare metal machine. @@ -1104,9 +1289,7 @@ public final class BareMetalMachinesStartSamples { */ public final class BareMetalMachinesUncordonSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Uncordon.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Uncordon.json */ /** * Sample code: Uncordon bare metal machine. @@ -1132,9 +1315,7 @@ import java.util.Map; */ public final class BareMetalMachinesUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Patch.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Patch.json */ /** * Sample code: Patch bare metal machine. @@ -1171,6 +1352,7 @@ public final class BareMetalMachinesUpdateSamples { ```java import com.azure.resourcemanager.networkcloud.models.BmcKeySetPrivilegeLevel; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.KeySetUser; import com.azure.resourcemanager.networkcloud.models.SshPublicKey; import java.time.OffsetDateTime; @@ -1183,9 +1365,7 @@ import java.util.Map; */ public final class BmcKeySetsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Create. - * json + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Create.json */ /** * Sample code: Create or update baseboard management controller key set of cluster. @@ -1200,7 +1380,7 @@ public final class BmcKeySetsCreateOrUpdateSamples { .withExistingCluster("resourceGroupName", "clusterName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withAzureGroupId("f110271b-XXXX-4163-9b99-214d91660f0e") .withExpiration(OffsetDateTime.parse("2022-12-31T23:59:59.008Z")) .withPrivilegeLevel(BmcKeySetPrivilegeLevel.ADMINISTRATOR) @@ -1239,9 +1419,7 @@ public final class BmcKeySetsCreateOrUpdateSamples { */ public final class BmcKeySetsDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Delete. - * json + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Delete.json */ /** * Sample code: Delete baseboard management controller key set of cluster. @@ -1264,8 +1442,7 @@ public final class BmcKeySetsDeleteSamples { */ public final class BmcKeySetsGetSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Get.json + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Get.json */ /** * Sample code: Get baseboard management controller key set of cluster. @@ -1288,9 +1465,7 @@ public final class BmcKeySetsGetSamples { */ public final class BmcKeySetsListByClusterSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BmcKeySets_ListByCluster.json + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_ListByCluster.json */ /** * Sample code: List baseboard management controller key sets of the cluster. @@ -1321,9 +1496,7 @@ import java.util.Map; */ public final class BmcKeySetsUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Patch. - * json + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Patch.json */ /** * Sample code: Patch baseboard management controller key set of cluster. @@ -1373,6 +1546,7 @@ import com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkStorage import com.azure.resourcemanager.networkcloud.models.EgressEndpoint; import com.azure.resourcemanager.networkcloud.models.EndpointDependency; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -1382,9 +1556,7 @@ import java.util.Map; */ public final class CloudServicesNetworksCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * CloudServicesNetworks_Create.json + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Create.json */ /** * Sample code: Create or update cloud services network. @@ -1399,7 +1571,7 @@ public final class CloudServicesNetworksCreateOrUpdateSamples { .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) .withAdditionalEgressEndpoints(Arrays.asList(new EgressEndpoint().withCategory("azure-resource-management") .withEndpoints(Arrays.asList( @@ -1409,7 +1581,7 @@ public final class CloudServicesNetworksCreateOrUpdateSamples { .withMode(CloudServicesNetworkStorageMode.STANDARD) .withSizeMiB(1048576L) .withStorageApplianceId( - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/StorageAppliances/storageApplianceName")) + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName")) .create(); } @@ -1435,9 +1607,7 @@ public final class CloudServicesNetworksCreateOrUpdateSamples { */ public final class CloudServicesNetworksDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * CloudServicesNetworks_Delete.json + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Delete.json */ /** * Sample code: Delete cloud services network. @@ -1459,9 +1629,7 @@ public final class CloudServicesNetworksDeleteSamples { */ public final class CloudServicesNetworksGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * CloudServicesNetworks_Get.json + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Get.json */ /** * Sample code: Get cloud services network. @@ -1484,9 +1652,7 @@ public final class CloudServicesNetworksGetByResourceGroupSamples { */ public final class CloudServicesNetworksListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * CloudServicesNetworks_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_ListBySubscription.json */ /** * Sample code: List cloud services networks for subscription. @@ -1508,9 +1674,7 @@ public final class CloudServicesNetworksListSamples { */ public final class CloudServicesNetworksListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * CloudServicesNetworks_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_ListByResourceGroup.json */ /** * Sample code: List cloud services networks for resource group. @@ -1543,9 +1707,7 @@ import java.util.Map; */ public final class CloudServicesNetworksUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * CloudServicesNetworks_Patch.json + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Patch.json */ /** * Sample code: Patch cloud services network. @@ -1567,7 +1729,7 @@ public final class CloudServicesNetworksUpdateSamples { .withMode(CloudServicesNetworkStorageMode.STANDARD) .withSizeMiB(1048576L) .withStorageApplianceId( - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/StorageAppliances/storageApplianceName")) + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName")) .apply(); } @@ -1588,6 +1750,7 @@ public final class CloudServicesNetworksUpdateSamples { ### ClusterManagers_CreateOrUpdate ```java +import com.azure.resourcemanager.networkcloud.models.DeploymentType; import com.azure.resourcemanager.networkcloud.models.ManagedResourceGroupConfiguration; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentity; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentityType; @@ -1600,9 +1763,7 @@ import java.util.Map; */ public final class ClusterManagersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterManagers_Create.json + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Create.json */ /** * Sample code: Create or update cluster manager. @@ -1619,17 +1780,16 @@ public final class ClusterManagersCreateOrUpdateSamples { "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName") .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)) + .withKind(DeploymentType.AZURE_LOCAL) .withAnalyticsWorkspaceId( - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName") + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName") .withManagedResourceGroupConfiguration( new ManagedResourceGroupConfiguration().withLocation("East US").withName("my-managed-rg")) .create(); } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterManagers_Create_Uami.json + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Create_Uami.json */ /** * Sample code: Create or update cluster manager with user assigned identity. @@ -1649,8 +1809,9 @@ public final class ClusterManagersCreateOrUpdateSamples { .withUserAssignedIdentities(mapOf( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1", new UserAssignedIdentity()))) + .withKind(DeploymentType.AZURE_LOCAL) .withAnalyticsWorkspaceId( - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName") + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName") .withManagedResourceGroupConfiguration( new ManagedResourceGroupConfiguration().withLocation("East US").withName("my-managed-rg")) .create(); @@ -1678,9 +1839,7 @@ public final class ClusterManagersCreateOrUpdateSamples { */ public final class ClusterManagersDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterManagers_Delete.json + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Delete.json */ /** * Sample code: Delete cluster manager. @@ -1702,9 +1861,7 @@ public final class ClusterManagersDeleteSamples { */ public final class ClusterManagersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Get - * .json + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Get.json */ /** * Sample code: Get cluster manager. @@ -1727,9 +1884,7 @@ public final class ClusterManagersGetByResourceGroupSamples { */ public final class ClusterManagersListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterManagers_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_ListBySubscription.json */ /** * Sample code: List cluster managers for subscription. @@ -1751,9 +1906,7 @@ public final class ClusterManagersListSamples { */ public final class ClusterManagersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterManagers_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_ListByResourceGroup.json */ /** * Sample code: List cluster managers for resource group. @@ -1783,9 +1936,7 @@ import java.util.Map; */ public final class ClusterManagersUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterManagers_Patch.json + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Patch.json */ /** * Sample code: Patch cluster manager. @@ -1821,20 +1972,71 @@ public final class ClusterManagersUpdateSamples { } ``` +### ClusterManagers_UpdateRelayPrivateEndpointConnection + +```java +import com.azure.resourcemanager.networkcloud.models.ClusterManagerUpdateRelayPrivateEndpointConnectionParameters; +import com.azure.resourcemanager.networkcloud.models.RelayPrivateEndpointConnectionState; + +/** + * Samples for ClusterManagers UpdateRelayPrivateEndpointConnection. + */ +public final class ClusterManagersUpdateRelayPrivateEndpointConnectionSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_UpdateRelayPrivateEndpointConnection_Approve.json + */ + /** + * Sample code: Approve private endpoint connection. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void + approvePrivateEndpointConnection(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.clusterManagers() + .updateRelayPrivateEndpointConnection("resourceGroupName", "clusterManagerName", + new ClusterManagerUpdateRelayPrivateEndpointConnectionParameters() + .withConnectionState(RelayPrivateEndpointConnectionState.APPROVED) + .withDescription("Approving private endpoint connection") + .withPrivateEndpointResourceId( + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_UpdateRelayPrivateEndpointConnection_Reject.json + */ + /** + * Sample code: Reject private endpoint connection. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void + rejectPrivateEndpointConnection(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.clusterManagers() + .updateRelayPrivateEndpointConnection("resourceGroupName", "clusterManagerName", + new ClusterManagerUpdateRelayPrivateEndpointConnectionParameters() + .withConnectionState(RelayPrivateEndpointConnectionState.REJECTED) + .withDescription("Rejecting private endpoint connection") + .withPrivateEndpointResourceId( + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName"), + com.azure.core.util.Context.NONE); + } +} +``` + ### Clusters_ContinueUpdateVersion ```java import com.azure.resourcemanager.networkcloud.models.ClusterContinueUpdateVersionMachineGroupTargetingMode; import com.azure.resourcemanager.networkcloud.models.ClusterContinueUpdateVersionParameters; +import com.azure.resourcemanager.networkcloud.models.ClusterContinueUpdateVersionSafeguardMode; /** * Samples for Clusters ContinueUpdateVersion. */ public final class ClustersContinueUpdateVersionSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_ContinueUpdateVersion.json + * x-ms-original-file: 2026-05-01-preview/Clusters_ContinueUpdateVersion.json */ /** * Sample code: Continue update cluster version. @@ -1846,7 +2048,8 @@ public final class ClustersContinueUpdateVersionSamples { manager.clusters() .continueUpdateVersion("resourceGroupName", "clusterName", new ClusterContinueUpdateVersionParameters() - .withMachineGroupTargetingMode(ClusterContinueUpdateVersionMachineGroupTargetingMode.ALPHA_BY_RACK), + .withMachineGroupTargetingMode(ClusterContinueUpdateVersionMachineGroupTargetingMode.ALPHA_BY_RACK) + .withSafeguardMode(ClusterContinueUpdateVersionSafeguardMode.ALL), com.azure.core.util.Context.NONE); } } @@ -1864,7 +2067,9 @@ import com.azure.resourcemanager.networkcloud.models.ClusterUpdateStrategyType; import com.azure.resourcemanager.networkcloud.models.CommandOutputOverride; import com.azure.resourcemanager.networkcloud.models.CommandOutputSettings; import com.azure.resourcemanager.networkcloud.models.CommandOutputType; +import com.azure.resourcemanager.networkcloud.models.DeploymentType; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.IdentitySelector; import com.azure.resourcemanager.networkcloud.models.ManagedResourceGroupConfiguration; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentity; @@ -1872,6 +2077,7 @@ import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentitySelec import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentityType; import com.azure.resourcemanager.networkcloud.models.RackDefinition; import com.azure.resourcemanager.networkcloud.models.RuntimeProtectionConfiguration; +import com.azure.resourcemanager.networkcloud.models.RuntimeProtectionDefinitionUpdateMode; import com.azure.resourcemanager.networkcloud.models.RuntimeProtectionEnforcementLevel; import com.azure.resourcemanager.networkcloud.models.SecretArchiveSettings; import com.azure.resourcemanager.networkcloud.models.StorageApplianceConfigurationData; @@ -1890,9 +2096,7 @@ import java.util.Map; */ public final class ClustersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Create. - * json + * x-ms-original-file: 2026-05-01-preview/Clusters_Create.json */ /** * Sample code: Create or update cluster. @@ -1906,38 +2110,42 @@ public final class ClustersCreateOrUpdateSamples { .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName") - .withType("CustomLocation")) - .withAggregatorOrSingleRackDefinition(new RackDefinition() - .withBareMetalMachineConfigurationData(Arrays.asList( - new BareMetalMachineConfigurationData() - .withBmcCredentials(new AdministrativeCredentials().withPassword("fakeTokenPlaceholder") + .withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withAggregatorOrSingleRackDefinition( + new RackDefinition() + .withBareMetalMachineConfigurationData(Arrays.asList( + new BareMetalMachineConfigurationData() + .withBmcCredentials(new AdministrativeCredentials().withPassword("fakeTokenPlaceholder") + .withUsername("username")) + .withBmcMacAddress("AA:BB:CC:DD:EE:FF") + .withBootMacAddress("00:BB:CC:DD:EE:FF") + .withMachineDetails("extraDetails") + .withMachineName("bmmName1") + .withRackSlot(1L) + .withSerialNumber("BM1219XXX"), + new BareMetalMachineConfigurationData() + .withBmcCredentials( + new AdministrativeCredentials() + .withPassword("fakeTokenPlaceholder") + .withUsername("username")) + .withBmcMacAddress("AA:BB:CC:DD:EE:00") + .withBootMacAddress("00:BB:CC:DD:EE:00") + .withMachineDetails("extraDetails") + .withMachineName("bmmName2") + .withRackSlot(2L) + .withSerialNumber("BM1219YYY"))) + .withNetworkRackId( + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName") + .withRackLocation("Foo Datacenter, Floor 3, Aisle 9, Rack 2") + .withRackSerialNumber("AA1234") + .withRackSkuId( + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName") + .withStorageApplianceConfigurationData(Arrays.asList(new StorageApplianceConfigurationData() + .withAdminCredentials(new AdministrativeCredentials().withPassword("fakeTokenPlaceholder") .withUsername("username")) - .withBmcMacAddress("AA:BB:CC:DD:EE:FF") - .withBootMacAddress("00:BB:CC:DD:EE:FF") - .withMachineDetails("extraDetails") - .withMachineName("bmmName1") .withRackSlot(1L) - .withSerialNumber("BM1219XXX"), - new BareMetalMachineConfigurationData().withBmcCredentials( - new AdministrativeCredentials().withPassword("fakeTokenPlaceholder").withUsername("username")) - .withBmcMacAddress("AA:BB:CC:DD:EE:00") - .withBootMacAddress("00:BB:CC:DD:EE:00") - .withMachineDetails("extraDetails") - .withMachineName("bmmName2") - .withRackSlot(2L) - .withSerialNumber("BM1219YYY"))) - .withNetworkRackId( - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName") - .withRackLocation("Foo Datacenter, Floor 3, Aisle 9, Rack 2") - .withRackSerialNumber("AA1234") - .withRackSkuId( - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName") - .withStorageApplianceConfigurationData(Arrays.asList(new StorageApplianceConfigurationData() - .withAdminCredentials( - new AdministrativeCredentials().withPassword("fakeTokenPlaceholder").withUsername("username")) - .withRackSlot(1L) - .withSerialNumber("BM1219XXX") - .withStorageApplianceName("vmName")))) + .withSerialNumber("BM1219XXX") + .withStorageApplianceName("vmName")))) .withClusterType(ClusterType.SINGLE_RACK) .withClusterVersion("1.0.0") .withNetworkFabricId( @@ -1947,8 +2155,9 @@ public final class ClustersCreateOrUpdateSamples { .withUserAssignedIdentities(mapOf( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1", new UserAssignedIdentity()))) + .withKind(DeploymentType.AZURE_LOCAL) .withAnalyticsOutputSettings(new AnalyticsOutputSettings().withAnalyticsWorkspaceId( - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName") + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName") .withAssociatedIdentity(new IdentitySelector() .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) .withUserAssignedIdentityResourceId( @@ -2003,8 +2212,9 @@ public final class ClustersCreateOrUpdateSamples { .withStorageApplianceName("vmName"))))) .withManagedResourceGroupConfiguration( new ManagedResourceGroupConfiguration().withLocation("East US").withName("my-managed-rg")) - .withRuntimeProtectionConfiguration( - new RuntimeProtectionConfiguration().withEnforcementLevel(RuntimeProtectionEnforcementLevel.ON_DEMAND)) + .withRuntimeProtectionConfiguration(new RuntimeProtectionConfiguration() + .withDefinitionUpdateMode(RuntimeProtectionDefinitionUpdateMode.NONE) + .withEnforcementLevel(RuntimeProtectionEnforcementLevel.ON_DEMAND)) .withSecretArchiveSettings(new SecretArchiveSettings().withAssociatedIdentity(new IdentitySelector() .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) .withUserAssignedIdentityResourceId( @@ -2042,9 +2252,7 @@ public final class ClustersCreateOrUpdateSamples { */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Delete. - * json + * x-ms-original-file: 2026-05-01-preview/Clusters_Delete.json */ /** * Sample code: Delete cluster. @@ -2068,9 +2276,7 @@ import java.util.Arrays; */ public final class ClustersDeploySamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Deploy. - * json + * x-ms-original-file: 2026-05-01-preview/Clusters_Deploy.json */ /** * Sample code: Deploy cluster. @@ -2084,9 +2290,7 @@ public final class ClustersDeploySamples { } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_Deploy_SkipValidation.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Deploy_SkipValidation.json */ /** * Sample code: Deploy cluster skipping validation. @@ -2111,8 +2315,7 @@ public final class ClustersDeploySamples { */ public final class ClustersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Get.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Get.json */ /** * Sample code: Get cluster. @@ -2126,6 +2329,37 @@ public final class ClustersGetByResourceGroupSamples { } ``` +### Clusters_Inspect + +```java +import com.azure.resourcemanager.networkcloud.models.ClusterInspectAdditionalAction; +import com.azure.resourcemanager.networkcloud.models.ClusterInspectParameters; +import com.azure.resourcemanager.networkcloud.models.FilterDevices; +import java.util.Arrays; + +/** + * Samples for Clusters Inspect. + */ +public final class ClustersInspectSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Clusters_Inspect.json + */ + /** + * Sample code: Inspect cluster. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void inspectCluster(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.clusters() + .inspect("resourceGroupName", "clusterName", new ClusterInspectParameters() + .withAdditionalActions(Arrays.asList(ClusterInspectAdditionalAction.RESET_HARDWARE)) + .withFilterDevices(new FilterDevices().withBareMetalMachineNames(Arrays.asList("machine1", "machine2")) + .withRackNames(Arrays.asList("rack1"))), + com.azure.core.util.Context.NONE); + } +} +``` + ### Clusters_List ```java @@ -2134,9 +2368,7 @@ public final class ClustersGetByResourceGroupSamples { */ public final class ClustersListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/Clusters_ListBySubscription.json */ /** * Sample code: List clusters for subscription. @@ -2157,9 +2389,7 @@ public final class ClustersListSamples { */ public final class ClustersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/Clusters_ListByResourceGroup.json */ /** * Sample code: List clusters for resource group. @@ -2173,6 +2403,34 @@ public final class ClustersListByResourceGroupSamples { } ``` +### Clusters_RotateCredential + +```java +import com.azure.resourcemanager.networkcloud.models.ClusterRotateCredentialParameters; +import java.util.Arrays; + +/** + * Samples for Clusters RotateCredential. + */ +public final class ClustersRotateCredentialSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Clusters_RotateCredential.json + */ + /** + * Sample code: Rotate one or more managed credentials. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void + rotateOneOrMoreManagedCredentials(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.clusters() + .rotateCredential("resourceGroupName", "clusterName", + new ClusterRotateCredentialParameters().withCredentials(Arrays.asList("BMC Credential")), + com.azure.core.util.Context.NONE); + } +} +``` + ### Clusters_ScanRuntime ```java @@ -2184,9 +2442,7 @@ import com.azure.resourcemanager.networkcloud.models.ClusterScanRuntimeParameter */ public final class ClustersScanRuntimeSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_ScanRuntime.json + * x-ms-original-file: 2026-05-01-preview/Clusters_ScanRuntime.json */ /** * Sample code: Execute a runtime protection scan on the cluster. @@ -2221,6 +2477,7 @@ import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentitySelec import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentityType; import com.azure.resourcemanager.networkcloud.models.RackDefinition; import com.azure.resourcemanager.networkcloud.models.RuntimeProtectionConfiguration; +import com.azure.resourcemanager.networkcloud.models.RuntimeProtectionDefinitionUpdateMode; import com.azure.resourcemanager.networkcloud.models.RuntimeProtectionEnforcementLevel; import com.azure.resourcemanager.networkcloud.models.SecretArchiveSettings; import com.azure.resourcemanager.networkcloud.models.StorageApplianceConfigurationData; @@ -2239,9 +2496,7 @@ import java.util.Map; */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_Patch_UpdateStrategy.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_UpdateStrategy.json */ /** * Sample code: Patch update strategy. @@ -2263,9 +2518,7 @@ public final class ClustersUpdateSamples { } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_Patch_VulnerabilityScanning.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_VulnerabilityScanning.json */ /** * Sample code: Patch vulnerability scanning. @@ -2284,9 +2537,7 @@ public final class ClustersUpdateSamples { } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_Patch_Location.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_Location.json */ /** * Sample code: Patch cluster location. @@ -2304,9 +2555,7 @@ public final class ClustersUpdateSamples { } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_Patch_AggregatorOrSingleRackDefinition.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_AggregatorOrSingleRackDefinition.json */ /** * Sample code: Patch cluster AggregatorOrSingleRackDefinition. @@ -2363,9 +2612,7 @@ public final class ClustersUpdateSamples { } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_Patch_CommandOutput.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_CommandOutput.json */ /** * Sample code: Patch cluster command output. @@ -2399,9 +2646,7 @@ public final class ClustersUpdateSamples { } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_Patch_RuntimeProtectionConfiguration.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_RuntimeProtectionConfiguration.json */ /** * Sample code: Patch runtime protection configuration. @@ -2415,15 +2660,14 @@ public final class ClustersUpdateSamples { .getValue(); resource.update() .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) - .withRuntimeProtectionConfiguration( - new RuntimeProtectionConfiguration().withEnforcementLevel(RuntimeProtectionEnforcementLevel.ON_DEMAND)) + .withRuntimeProtectionConfiguration(new RuntimeProtectionConfiguration() + .withDefinitionUpdateMode(RuntimeProtectionDefinitionUpdateMode.AUTOMATIC) + .withEnforcementLevel(RuntimeProtectionEnforcementLevel.ON_DEMAND)) .apply(); } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_Patch_SecretArchive.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_SecretArchive.json */ /** * Sample code: Patch secret archive. @@ -2445,9 +2689,7 @@ public final class ClustersUpdateSamples { } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_Patch_AnalyticsOutput.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_AnalyticsOutput.json */ /** * Sample code: Patch cluster analytics output. @@ -2467,7 +2709,7 @@ public final class ClustersUpdateSamples { "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", new UserAssignedIdentity()))) .withAnalyticsOutputSettings(new AnalyticsOutputSettings().withAnalyticsWorkspaceId( - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName") + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName") .withAssociatedIdentity(new IdentitySelector() .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) .withUserAssignedIdentityResourceId( @@ -2493,15 +2735,14 @@ public final class ClustersUpdateSamples { ```java import com.azure.resourcemanager.networkcloud.models.ClusterUpdateVersionParameters; +import com.azure.resourcemanager.networkcloud.models.ClusterUpdateVersionSafeguardMode; /** * Samples for Clusters UpdateVersion. */ public final class ClustersUpdateVersionSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_UpdateVersion.json + * x-ms-original-file: 2026-05-01-preview/Clusters_UpdateVersion.json */ /** * Sample code: Update cluster version. @@ -2511,7 +2752,9 @@ public final class ClustersUpdateVersionSamples { public static void updateClusterVersion(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { manager.clusters() .updateVersion("resourceGroupName", "clusterName", - new ClusterUpdateVersionParameters().withTargetClusterVersion("2.0"), com.azure.core.util.Context.NONE); + new ClusterUpdateVersionParameters().withSafeguardMode(ClusterUpdateVersionSafeguardMode.ALL) + .withTargetClusterVersion("2.0"), + com.azure.core.util.Context.NONE); } } ``` @@ -2521,6 +2764,7 @@ public final class ClustersUpdateVersionSamples { ```java import com.azure.resourcemanager.networkcloud.models.ConsoleEnabled; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.SshPublicKey; import java.time.OffsetDateTime; import java.util.HashMap; @@ -2531,9 +2775,7 @@ import java.util.Map; */ public final class ConsolesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Create. - * json + * x-ms-original-file: 2026-05-01-preview/Consoles_Create.json */ /** * Sample code: Create or update virtual machine console. @@ -2548,7 +2790,7 @@ public final class ConsolesCreateOrUpdateSamples { .withExistingVirtualMachine("resourceGroupName", "virtualMachineName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withEnabled(ConsoleEnabled.TRUE) .withSshPublicKey(new SshPublicKey().withKeyData("fakeTokenPlaceholder")) .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) @@ -2578,9 +2820,7 @@ public final class ConsolesCreateOrUpdateSamples { */ public final class ConsolesDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Delete. - * json + * x-ms-original-file: 2026-05-01-preview/Consoles_Delete.json */ /** * Sample code: Delete virtual machine console. @@ -2602,8 +2842,7 @@ public final class ConsolesDeleteSamples { */ public final class ConsolesGetSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Get.json + * x-ms-original-file: 2026-05-01-preview/Consoles_Get.json */ /** * Sample code: Get virtual machine console. @@ -2625,9 +2864,7 @@ public final class ConsolesGetSamples { */ public final class ConsolesListByVirtualMachineSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Consoles_ListByVirtualMachine.json + * x-ms-original-file: 2026-05-01-preview/Consoles_ListByVirtualMachine.json */ /** * Sample code: List consoles of the virtual machine. @@ -2658,8 +2895,7 @@ import java.util.Map; */ public final class ConsolesUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Patch.json + * x-ms-original-file: 2026-05-01-preview/Consoles_Patch.json */ /** * Sample code: Patch virtual machine console. @@ -2705,9 +2941,7 @@ import java.util.Map; */ public final class KubernetesClusterFeaturesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusterFeatures_Create.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Create.json */ /** * Sample code: Create or update Kubernetes cluster feature. @@ -2748,9 +2982,7 @@ public final class KubernetesClusterFeaturesCreateOrUpdateSamples { */ public final class KubernetesClusterFeaturesDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusterFeatures_Delete.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Delete.json */ /** * Sample code: Delete Kubernetes cluster feature. @@ -2774,9 +3006,7 @@ public final class KubernetesClusterFeaturesDeleteSamples { */ public final class KubernetesClusterFeaturesGetSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusterFeatures_Get.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Get.json */ /** * Sample code: Get Kubernetes cluster feature. @@ -2799,9 +3029,7 @@ public final class KubernetesClusterFeaturesGetSamples { */ public final class KubernetesClusterFeaturesListByKubernetesClusterSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusterFeatures_ListByKubernetesCluster.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_ListByKubernetesCluster.json */ /** * Sample code: List features for the Kubernetes cluster. @@ -2831,9 +3059,7 @@ import java.util.Map; */ public final class KubernetesClusterFeaturesUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusterFeatures_Patch.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Patch.json */ /** * Sample code: Patch Kubernetes cluster feature. @@ -2883,6 +3109,7 @@ import com.azure.resourcemanager.networkcloud.models.BgpMultiHop; import com.azure.resourcemanager.networkcloud.models.BgpServiceLoadBalancerConfiguration; import com.azure.resourcemanager.networkcloud.models.ControlPlaneNodeConfiguration; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.FabricPeeringEnabled; import com.azure.resourcemanager.networkcloud.models.HugepagesSize; import com.azure.resourcemanager.networkcloud.models.InitialAgentPoolConfiguration; @@ -2907,9 +3134,7 @@ import java.util.Map; */ public final class KubernetesClustersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusters_Create.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Create.json */ /** * Sample code: Create or update Kubernetes cluster. @@ -2924,7 +3149,7 @@ public final class KubernetesClustersCreateOrUpdateSamples { .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withControlPlaneNodeConfiguration(new ControlPlaneNodeConfiguration() .withAdministratorConfiguration(new AdministratorConfiguration().withAdminUsername("azure") .withSshPublicKeys(Arrays.asList(new SshPublicKey().withKeyData("fakeTokenPlaceholder")))) @@ -2951,11 +3176,11 @@ public final class KubernetesClustersCreateOrUpdateSamples { .withCount(3L) .withLabels(Arrays.asList(new KubernetesLabel().withKey("fakeTokenPlaceholder").withValue("true"))) .withMode(AgentPoolMode.SYSTEM) - .withName("SystemPool-1") .withTaints( Arrays.asList(new KubernetesLabel().withKey("fakeTokenPlaceholder").withValue("true:NoSchedule"))) .withUpgradeSettings(new AgentPoolUpgradeSettings().withMaxSurge("1")) - .withVmSkuName("NC_P46_224_v1"))) + .withVmSkuName("NC_P46_224_v1") + .withName("SystemPool-1"))) .withKubernetesVersion("1.XX.Y") .withNetworkConfiguration(new NetworkConfiguration() .withAttachedNetworkConfiguration(new AttachedNetworkConfiguration() @@ -3009,9 +3234,7 @@ public final class KubernetesClustersCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusters_L2LoadBalancer_Create.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_L2LoadBalancer_Create.json */ /** * Sample code: Create or update Kubernetes cluster with a layer 2 load balancer. @@ -3026,7 +3249,7 @@ public final class KubernetesClustersCreateOrUpdateSamples { .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withControlPlaneNodeConfiguration(new ControlPlaneNodeConfiguration() .withAdministratorConfiguration(new AdministratorConfiguration().withAdminUsername("azure") .withSshPublicKeys(Arrays.asList(new SshPublicKey().withKeyData("fakeTokenPlaceholder")))) @@ -3053,11 +3276,11 @@ public final class KubernetesClustersCreateOrUpdateSamples { .withCount(3L) .withLabels(Arrays.asList(new KubernetesLabel().withKey("fakeTokenPlaceholder").withValue("true"))) .withMode(AgentPoolMode.SYSTEM) - .withName("SystemPool-1") .withTaints( Arrays.asList(new KubernetesLabel().withKey("fakeTokenPlaceholder").withValue("true:NoSchedule"))) .withUpgradeSettings(new AgentPoolUpgradeSettings().withMaxSurge("1")) - .withVmSkuName("NC_P46_224_v1"))) + .withVmSkuName("NC_P46_224_v1") + .withName("SystemPool-1"))) .withKubernetesVersion("1.XX.Y") .withNetworkConfiguration(new NetworkConfiguration() .withAttachedNetworkConfiguration(new AttachedNetworkConfiguration() @@ -3115,9 +3338,7 @@ public final class KubernetesClustersCreateOrUpdateSamples { */ public final class KubernetesClustersDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusters_Delete.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Delete.json */ /** * Sample code: Delete Kubernetes cluster. @@ -3139,9 +3360,7 @@ public final class KubernetesClustersDeleteSamples { */ public final class KubernetesClustersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusters_Get.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Get.json */ /** * Sample code: Get Kubernetes cluster. @@ -3164,9 +3383,7 @@ public final class KubernetesClustersGetByResourceGroupSamples { */ public final class KubernetesClustersListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusters_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_ListBySubscription.json */ /** * Sample code: List Kubernetes clusters for subscription. @@ -3188,9 +3405,7 @@ public final class KubernetesClustersListSamples { */ public final class KubernetesClustersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusters_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_ListByResourceGroup.json */ /** * Sample code: List Kubernetes clusters for resource group. @@ -3215,9 +3430,7 @@ import com.azure.resourcemanager.networkcloud.models.KubernetesClusterRestartNod */ public final class KubernetesClustersRestartNodeSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusters_RestartNode.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_RestartNode.json */ /** * Sample code: Restart a Kubernetes cluster node. @@ -3250,9 +3463,7 @@ import java.util.Map; */ public final class KubernetesClustersUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusters_Patch.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Patch.json */ /** * Sample code: Patch Kubernetes cluster. @@ -3290,10 +3501,187 @@ public final class KubernetesClustersUpdateSamples { } ``` +### KubernetesVersions_CreateOrUpdate + +```java +import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for KubernetesVersions CreateOrUpdate. + */ +public final class KubernetesVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Create.json + */ + /** + * Sample code: Create or update Kubernetes versions. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void + createOrUpdateKubernetesVersions(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.kubernetesVersions() + .define("default") + .withRegion("location") + .withExistingResourceGroup("resourceGroupName") + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") + .withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) + .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; + } +} +``` + +### KubernetesVersions_Delete + +```java +/** + * Samples for KubernetesVersions Delete. + */ +public final class KubernetesVersionsDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Delete.json + */ + /** + * Sample code: Delete Kubernetes versions. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void deleteKubernetesVersions(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.kubernetesVersions() + .delete("resourceGroupName", "default", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### KubernetesVersions_GetByResourceGroup + +```java +/** + * Samples for KubernetesVersions GetByResourceGroup. + */ +public final class KubernetesVersionsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Get.json + */ + /** + * Sample code: Get Kubernetes versions. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void getKubernetesVersions(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.kubernetesVersions() + .getByResourceGroupWithResponse("resourceGroupName", "default", com.azure.core.util.Context.NONE); + } +} +``` + +### KubernetesVersions_List + +```java +/** + * Samples for KubernetesVersions List. + */ +public final class KubernetesVersionsListSamples { + /* + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_ListBySubscription.json + */ + /** + * Sample code: List Kubernetes versions for subscription. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void + listKubernetesVersionsForSubscription(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.kubernetesVersions().list(null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### KubernetesVersions_ListByResourceGroup + +```java +/** + * Samples for KubernetesVersions ListByResourceGroup. + */ +public final class KubernetesVersionsListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_ListByResourceGroup.json + */ + /** + * Sample code: List Kubernetes versions for resource group. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void + listKubernetesVersionsForResourceGroup(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.kubernetesVersions() + .listByResourceGroup("resourceGroupName", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### KubernetesVersions_Update + +```java +import com.azure.resourcemanager.networkcloud.models.KubernetesVersion; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for KubernetesVersions Update. + */ +public final class KubernetesVersionsUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_UpdateTags.json + */ + /** + * Sample code: Patch Kubernetes versions. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void patchKubernetesVersions(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + KubernetesVersion resource = manager.kubernetesVersions() + .getByResourceGroupWithResponse("resourceGroupName", "default", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")).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; + } +} +``` + ### L2Networks_CreateOrUpdate ```java import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; import java.util.HashMap; import java.util.Map; @@ -3303,9 +3691,7 @@ import java.util.Map; */ public final class L2NetworksCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Create. - * json + * x-ms-original-file: 2026-05-01-preview/L2Networks_Create.json */ /** * Sample code: Create or update L2 network. @@ -3319,7 +3705,7 @@ public final class L2NetworksCreateOrUpdateSamples { .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withL2IsolationDomainId( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName") .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) @@ -3350,9 +3736,7 @@ public final class L2NetworksCreateOrUpdateSamples { */ public final class L2NetworksDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Delete. - * json + * x-ms-original-file: 2026-05-01-preview/L2Networks_Delete.json */ /** * Sample code: Delete L2 network. @@ -3373,8 +3757,7 @@ public final class L2NetworksDeleteSamples { */ public final class L2NetworksGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Get.json + * x-ms-original-file: 2026-05-01-preview/L2Networks_Get.json */ /** * Sample code: Get L2 network. @@ -3396,9 +3779,7 @@ public final class L2NetworksGetByResourceGroupSamples { */ public final class L2NetworksListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * L2Networks_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/L2Networks_ListBySubscription.json */ /** * Sample code: List L2 networks for subscription. @@ -3420,9 +3801,7 @@ public final class L2NetworksListSamples { */ public final class L2NetworksListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * L2Networks_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/L2Networks_ListByResourceGroup.json */ /** * Sample code: List L2 networks for resource group. @@ -3448,9 +3827,7 @@ import java.util.Map; */ public final class L2NetworksUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Patch. - * json + * x-ms-original-file: 2026-05-01-preview/L2Networks_Patch.json */ /** * Sample code: Patch L2 network. @@ -3482,6 +3859,7 @@ public final class L2NetworksUpdateSamples { ```java import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.IpAllocationType; import java.util.HashMap; import java.util.Map; @@ -3491,9 +3869,7 @@ import java.util.Map; */ public final class L3NetworksCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Create. - * json + * x-ms-original-file: 2026-05-01-preview/L3Networks_Create.json */ /** * Sample code: Create or update L3 network. @@ -3507,7 +3883,7 @@ public final class L3NetworksCreateOrUpdateSamples { .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withL3IsolationDomainId( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName") .withVlan(12L) @@ -3541,9 +3917,7 @@ public final class L3NetworksCreateOrUpdateSamples { */ public final class L3NetworksDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Delete. - * json + * x-ms-original-file: 2026-05-01-preview/L3Networks_Delete.json */ /** * Sample code: Delete L3 network. @@ -3564,15 +3938,14 @@ public final class L3NetworksDeleteSamples { */ public final class L3NetworksGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Get.json + * x-ms-original-file: 2026-05-01-preview/L3Networks_Get.json */ /** - * Sample code: Get L3network. + * Sample code: Get L3 network. * * @param manager Entry point to NetworkCloudManager. */ - public static void getL3network(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + public static void getL3Network(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { manager.l3Networks() .getByResourceGroupWithResponse("resourceGroupName", "l3NetworkName", com.azure.core.util.Context.NONE); } @@ -3587,9 +3960,7 @@ public final class L3NetworksGetByResourceGroupSamples { */ public final class L3NetworksListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * L3Networks_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/L3Networks_ListBySubscription.json */ /** * Sample code: List L3 networks for subscription. @@ -3611,9 +3982,7 @@ public final class L3NetworksListSamples { */ public final class L3NetworksListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * L3Networks_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/L3Networks_ListByResourceGroup.json */ /** * Sample code: List L3 networks for resource group. @@ -3639,9 +4008,7 @@ import java.util.Map; */ public final class L3NetworksUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Patch. - * json + * x-ms-original-file: 2026-05-01-preview/L3Networks_Patch.json */ /** * Sample code: Patch L3 network. @@ -3673,6 +4040,7 @@ public final class L3NetworksUpdateSamples { ```java import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -3682,9 +4050,7 @@ import java.util.Map; */ public final class MetricsConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterMetricsConfigurations_Create.json + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Create.json */ /** * Sample code: Create or update metrics configuration of cluster. @@ -3699,7 +4065,7 @@ public final class MetricsConfigurationsCreateOrUpdateSamples { .withExistingCluster("resourceGroupName", "clusterName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withCollectionInterval(15L) .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) .withEnabledMetrics(Arrays.asList("metric1", "metric2")) @@ -3728,9 +4094,7 @@ public final class MetricsConfigurationsCreateOrUpdateSamples { */ public final class MetricsConfigurationsDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterMetricsConfigurations_Delete.json + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Delete.json */ /** * Sample code: Delete metrics configuration of cluster. @@ -3753,9 +4117,7 @@ public final class MetricsConfigurationsDeleteSamples { */ public final class MetricsConfigurationsGetSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterMetricsConfigurations_Get.json + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Get.json */ /** * Sample code: Get metrics configuration of cluster. @@ -3778,9 +4140,7 @@ public final class MetricsConfigurationsGetSamples { */ public final class MetricsConfigurationsListByClusterSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterMetricsConfigurations_ListByCluster.json + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_ListByCluster.json */ /** * Sample code: List metrics configurations of the cluster. @@ -3808,9 +4168,7 @@ import java.util.Map; */ public final class MetricsConfigurationsUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterMetricsConfigurations_Patch.json + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Patch.json */ /** * Sample code: Patch metrics configuration of cluster. @@ -3851,9 +4209,7 @@ public final class MetricsConfigurationsUpdateSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Operations_List. - * json + * x-ms-original-file: 2026-05-01-preview/Operations_List.json */ /** * Sample code: List resource provider operations. @@ -3875,8 +4231,7 @@ public final class OperationsListSamples { */ public final class RackSkusGetSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/RackSkus_Get.json + * x-ms-original-file: 2026-05-01-preview/RackSkus_Get.json */ /** * Sample code: Get rack SKU resource. @@ -3897,9 +4252,7 @@ public final class RackSkusGetSamples { */ public final class RackSkusListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * RackSkus_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/RackSkus_ListBySubscription.json */ /** * Sample code: List rack SKUs for subscription. @@ -3916,6 +4269,7 @@ public final class RackSkusListSamples { ```java import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.util.HashMap; import java.util.Map; @@ -3924,8 +4278,7 @@ import java.util.Map; */ public final class RacksCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Create.json + * x-ms-original-file: 2026-05-01-preview/Racks_Create.json */ /** * Sample code: Create or update rack. @@ -3939,7 +4292,7 @@ public final class RacksCreateOrUpdateSamples { .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withAvailabilityZone("1") .withRackLocation("Rack 28") .withRackSerialNumber("RACK_SERIAL_NUMBER") @@ -3971,8 +4324,7 @@ public final class RacksCreateOrUpdateSamples { */ public final class RacksDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Delete.json + * x-ms-original-file: 2026-05-01-preview/Racks_Delete.json */ /** * Sample code: Delete rack. @@ -3993,8 +4345,7 @@ public final class RacksDeleteSamples { */ public final class RacksGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Get.json + * x-ms-original-file: 2026-05-01-preview/Racks_Get.json */ /** * Sample code: Get rack. @@ -4016,9 +4367,7 @@ public final class RacksGetByResourceGroupSamples { */ public final class RacksListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Racks_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/Racks_ListBySubscription.json */ /** * Sample code: List racks for subscription. @@ -4039,9 +4388,7 @@ public final class RacksListSamples { */ public final class RacksListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Racks_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/Racks_ListByResourceGroup.json */ /** * Sample code: List racks for resource group. @@ -4066,8 +4413,7 @@ import java.util.Map; */ public final class RacksUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Patch.json + * x-ms-original-file: 2026-05-01-preview/Racks_Patch.json */ /** * Sample code: Patch rack. @@ -4104,6 +4450,7 @@ public final class RacksUpdateSamples { ```java import com.azure.resourcemanager.networkcloud.models.AdministrativeCredentials; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.util.HashMap; import java.util.Map; @@ -4112,9 +4459,7 @@ import java.util.Map; */ public final class StorageAppliancesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * StorageAppliances_Create.json + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Create.json */ /** * Sample code: Create or update storage appliance. @@ -4129,7 +4474,7 @@ public final class StorageAppliancesCreateOrUpdateSamples { .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withAdministratorCredentials( new AdministrativeCredentials().withPassword("fakeTokenPlaceholder").withUsername("adminUser")) .withRackId( @@ -4163,9 +4508,7 @@ public final class StorageAppliancesCreateOrUpdateSamples { */ public final class StorageAppliancesDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * StorageAppliances_Delete.json + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Delete.json */ /** * Sample code: Delete storage appliance. @@ -4187,9 +4530,7 @@ public final class StorageAppliancesDeleteSamples { */ public final class StorageAppliancesDisableRemoteVendorManagementSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * StorageAppliances_DisableRemoteVendorManagement.json + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_DisableRemoteVendorManagement.json */ /** * Sample code: Turn off remote vendor management for storage appliance. @@ -4216,9 +4557,7 @@ import java.util.Arrays; */ public final class StorageAppliancesEnableRemoteVendorManagementSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * StorageAppliances_EnableRemoteVendorManagement.json + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_EnableRemoteVendorManagement.json */ /** * Sample code: Turn on remote vendor management for storage appliance. @@ -4244,9 +4583,7 @@ public final class StorageAppliancesEnableRemoteVendorManagementSamples { */ public final class StorageAppliancesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * StorageAppliances_Get.json + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Get.json */ /** * Sample code: Get storage appliance. @@ -4269,9 +4606,7 @@ public final class StorageAppliancesGetByResourceGroupSamples { */ public final class StorageAppliancesListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * StorageAppliances_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_ListBySubscription.json */ /** * Sample code: List storage appliances for subscription. @@ -4293,9 +4628,7 @@ public final class StorageAppliancesListSamples { */ public final class StorageAppliancesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * StorageAppliances_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_ListByResourceGroup.json */ /** * Sample code: List storage appliances for resource group. @@ -4322,9 +4655,7 @@ import java.util.Arrays; */ public final class StorageAppliancesRunReadCommandsSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * StorageAppliances_RunReadCommands.json + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_RunReadCommands.json */ /** * Sample code: Run and retrieve output from read only commands on storage appliance. @@ -4357,9 +4688,7 @@ import java.util.Map; */ public final class StorageAppliancesUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * StorageAppliances_Patch.json + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Patch.json */ /** * Sample code: Patch storage appliance. @@ -4395,6 +4724,7 @@ public final class StorageAppliancesUpdateSamples { ```java import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -4404,9 +4734,7 @@ import java.util.Map; */ public final class TrunkedNetworksCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * TrunkedNetworks_Create.json + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Create.json */ /** * Sample code: Create or update trunked network. @@ -4421,7 +4749,7 @@ public final class TrunkedNetworksCreateOrUpdateSamples { .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withIsolationDomainIds(Arrays.asList( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName", "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName")) @@ -4453,9 +4781,7 @@ public final class TrunkedNetworksCreateOrUpdateSamples { */ public final class TrunkedNetworksDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * TrunkedNetworks_Delete.json + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Delete.json */ /** * Sample code: Delete trunked network. @@ -4477,9 +4803,7 @@ public final class TrunkedNetworksDeleteSamples { */ public final class TrunkedNetworksGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Get - * .json + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Get.json */ /** * Sample code: Get Trunked network. @@ -4502,9 +4826,7 @@ public final class TrunkedNetworksGetByResourceGroupSamples { */ public final class TrunkedNetworksListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * TrunkedNetworks_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_ListBySubscription.json */ /** * Sample code: List trunked networks for subscription. @@ -4526,9 +4848,7 @@ public final class TrunkedNetworksListSamples { */ public final class TrunkedNetworksListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * TrunkedNetworks_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_ListByResourceGroup.json */ /** * Sample code: List Trunked networks for resource group. @@ -4555,9 +4875,7 @@ import java.util.Map; */ public final class TrunkedNetworksUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * TrunkedNetworks_Patch.json + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Patch.json */ /** * Sample code: Patch trunked network. @@ -4596,9 +4914,7 @@ import com.azure.resourcemanager.networkcloud.models.VirtualMachineAssignRelayPa */ public final class VirtualMachinesAssignRelaySamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_AssignRelay.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_AssignRelay.json */ /** * Sample code: Assign relay to the Microsoft.HybridCompute machine for a virtual machine. @@ -4622,6 +4938,7 @@ public final class VirtualMachinesAssignRelaySamples { ```java import com.azure.resourcemanager.networkcloud.models.DefaultGateway; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.ImageRepositoryCredentials; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentity; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentityType; @@ -4648,9 +4965,7 @@ import java.util.Map; */ public final class VirtualMachinesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_Create.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Create.json */ /** * Sample code: Create or update virtual machine. @@ -4665,7 +4980,7 @@ public final class VirtualMachinesCreateOrUpdateSamples { .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withAdminUsername("username") .withCloudServicesNetworkAttachment(new NetworkAttachment().withAttachedNetworkId( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName") @@ -4730,9 +5045,7 @@ public final class VirtualMachinesCreateOrUpdateSamples { */ public final class VirtualMachinesDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_Delete.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Delete.json */ /** * Sample code: Delete virtual machine. @@ -4754,9 +5067,7 @@ public final class VirtualMachinesDeleteSamples { */ public final class VirtualMachinesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Get - * .json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Get.json */ /** * Sample code: Get virtual machine. @@ -4779,9 +5090,7 @@ public final class VirtualMachinesGetByResourceGroupSamples { */ public final class VirtualMachinesListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_ListBySubscription.json */ /** * Sample code: List virtual machines for subscription. @@ -4803,9 +5112,7 @@ public final class VirtualMachinesListSamples { */ public final class VirtualMachinesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_ListByResourceGroup.json */ /** * Sample code: List virtual machines for resource group. @@ -4831,9 +5138,7 @@ import com.azure.resourcemanager.networkcloud.models.VirtualMachinePowerOffParam */ public final class VirtualMachinesPowerOffSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_PowerOff.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_PowerOff.json */ /** * Sample code: Power off virtual machine. @@ -4857,9 +5162,7 @@ public final class VirtualMachinesPowerOffSamples { */ public final class VirtualMachinesReimageSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_Reimage.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Reimage.json */ /** * Sample code: Reimage virtual machine. @@ -4880,9 +5183,7 @@ public final class VirtualMachinesReimageSamples { */ public final class VirtualMachinesRestartSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_Restart.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Restart.json */ /** * Sample code: Restart virtual machine. @@ -4903,9 +5204,7 @@ public final class VirtualMachinesRestartSamples { */ public final class VirtualMachinesStartSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_Start.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Start.json */ /** * Sample code: Start virtual machine. @@ -4934,9 +5233,7 @@ import java.util.Map; */ public final class VirtualMachinesUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_Patch.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Patch.json */ /** * Sample code: Patch virtual machine. @@ -4977,6 +5274,7 @@ public final class VirtualMachinesUpdateSamples { ```java import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.util.HashMap; import java.util.Map; @@ -4985,8 +5283,7 @@ import java.util.Map; */ public final class VolumesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Create.json + * x-ms-original-file: 2026-05-01-preview/Volumes_Create.json */ /** * Sample code: Create or update volume. @@ -5000,11 +5297,11 @@ public final class VolumesCreateOrUpdateSamples { .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withSizeMiB(1048576L) .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) .withStorageApplianceId( - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/StorageAppliances/storageApplianceName") + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName") .create(); } @@ -5030,8 +5327,7 @@ public final class VolumesCreateOrUpdateSamples { */ public final class VolumesDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Delete.json + * x-ms-original-file: 2026-05-01-preview/Volumes_Delete.json */ /** * Sample code: Delete volume. @@ -5052,8 +5348,7 @@ public final class VolumesDeleteSamples { */ public final class VolumesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Get.json + * x-ms-original-file: 2026-05-01-preview/Volumes_Get.json */ /** * Sample code: Get volume. @@ -5075,9 +5370,7 @@ public final class VolumesGetByResourceGroupSamples { */ public final class VolumesListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Volumes_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/Volumes_ListBySubscription.json */ /** * Sample code: List volume for subscription. @@ -5098,9 +5391,7 @@ public final class VolumesListSamples { */ public final class VolumesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Volumes_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/Volumes_ListByResourceGroup.json */ /** * Sample code: List volumes for resource group. @@ -5125,8 +5416,7 @@ import java.util.Map; */ public final class VolumesUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Patch.json + * x-ms-original-file: 2026-05-01-preview/Volumes_Patch.json */ /** * Sample code: Patch volume. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/pom.xml b/sdk/networkcloud/azure-resourcemanager-networkcloud/pom.xml index 0e55791af169..281bc4f1ce1d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/pom.xml +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/pom.xml @@ -1,9 +1,9 @@ - + 4.0.0 com.azure @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for NetworkCloud Management - This package contains Microsoft Azure SDK for NetworkCloud Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Network Cloud APIs provide management of the Azure Operator Nexus compute resources such as on-premises clusters, hardware resources, and workload infrastructure resources. Package tag package-2025-09-01. + This package contains Microsoft Azure SDK for NetworkCloud Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Network Cloud APIs provide management of the Azure Operator Nexus compute resources such as on-premises clusters, hardware resources, and workload infrastructure resources. Package api-version 2026-05-01-preview. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/NetworkCloudManager.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/NetworkCloudManager.java index 5b69e0dfa9ff..eb3885be8d26 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/NetworkCloudManager.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/NetworkCloudManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud; @@ -24,7 +24,8 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.networkcloud.fluent.NetworkCloud; +import com.azure.resourcemanager.networkcloud.fluent.NetworkCloudManagementClient; +import com.azure.resourcemanager.networkcloud.implementation.AccessBridgesImpl; import com.azure.resourcemanager.networkcloud.implementation.AgentPoolsImpl; import com.azure.resourcemanager.networkcloud.implementation.BareMetalMachineKeySetsImpl; import com.azure.resourcemanager.networkcloud.implementation.BareMetalMachinesImpl; @@ -35,10 +36,11 @@ import com.azure.resourcemanager.networkcloud.implementation.ConsolesImpl; import com.azure.resourcemanager.networkcloud.implementation.KubernetesClusterFeaturesImpl; import com.azure.resourcemanager.networkcloud.implementation.KubernetesClustersImpl; +import com.azure.resourcemanager.networkcloud.implementation.KubernetesVersionsImpl; import com.azure.resourcemanager.networkcloud.implementation.L2NetworksImpl; import com.azure.resourcemanager.networkcloud.implementation.L3NetworksImpl; import com.azure.resourcemanager.networkcloud.implementation.MetricsConfigurationsImpl; -import com.azure.resourcemanager.networkcloud.implementation.NetworkCloudBuilder; +import com.azure.resourcemanager.networkcloud.implementation.NetworkCloudManagementClientBuilder; import com.azure.resourcemanager.networkcloud.implementation.OperationsImpl; import com.azure.resourcemanager.networkcloud.implementation.RackSkusImpl; import com.azure.resourcemanager.networkcloud.implementation.RacksImpl; @@ -46,6 +48,7 @@ import com.azure.resourcemanager.networkcloud.implementation.TrunkedNetworksImpl; import com.azure.resourcemanager.networkcloud.implementation.VirtualMachinesImpl; import com.azure.resourcemanager.networkcloud.implementation.VolumesImpl; +import com.azure.resourcemanager.networkcloud.models.AccessBridges; import com.azure.resourcemanager.networkcloud.models.AgentPools; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineKeySets; import com.azure.resourcemanager.networkcloud.models.BareMetalMachines; @@ -56,6 +59,7 @@ import com.azure.resourcemanager.networkcloud.models.Consoles; import com.azure.resourcemanager.networkcloud.models.KubernetesClusterFeatures; import com.azure.resourcemanager.networkcloud.models.KubernetesClusters; +import com.azure.resourcemanager.networkcloud.models.KubernetesVersions; import com.azure.resourcemanager.networkcloud.models.L2Networks; import com.azure.resourcemanager.networkcloud.models.L3Networks; import com.azure.resourcemanager.networkcloud.models.MetricsConfigurations; @@ -82,6 +86,8 @@ public final class NetworkCloudManager { private Operations operations; + private AccessBridges accessBridges; + private BareMetalMachines bareMetalMachines; private CloudServicesNetworks cloudServicesNetworks; @@ -92,6 +98,8 @@ public final class NetworkCloudManager { private KubernetesClusters kubernetesClusters; + private KubernetesVersions kubernetesVersions; + private L2Networks l2Networks; private L3Networks l3Networks; @@ -112,20 +120,20 @@ public final class NetworkCloudManager { private BmcKeySets bmcKeySets; - private MetricsConfigurations metricsConfigurations; - private AgentPools agentPools; private KubernetesClusterFeatures kubernetesClusterFeatures; private Consoles consoles; - private final NetworkCloud clientObject; + private MetricsConfigurations metricsConfigurations; + + private final NetworkCloudManagementClient clientObject; private NetworkCloudManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new NetworkCloudBuilder().pipeline(httpPipeline) + this.clientObject = new NetworkCloudManagementClientBuilder().pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) .defaultPollInterval(defaultPollInterval) @@ -347,6 +355,18 @@ public Operations operations() { return operations; } + /** + * Gets the resource collection API of AccessBridges. It manages AccessBridge. + * + * @return Resource collection API of AccessBridges. + */ + public AccessBridges accessBridges() { + if (this.accessBridges == null) { + this.accessBridges = new AccessBridgesImpl(clientObject.getAccessBridges(), this); + } + return accessBridges; + } + /** * Gets the resource collection API of BareMetalMachines. It manages BareMetalMachine. * @@ -407,6 +427,18 @@ public KubernetesClusters kubernetesClusters() { return kubernetesClusters; } + /** + * Gets the resource collection API of KubernetesVersions. It manages KubernetesVersion. + * + * @return Resource collection API of KubernetesVersions. + */ + public KubernetesVersions kubernetesVersions() { + if (this.kubernetesVersions == null) { + this.kubernetesVersions = new KubernetesVersionsImpl(clientObject.getKubernetesVersions(), this); + } + return kubernetesVersions; + } + /** * Gets the resource collection API of L2Networks. It manages L2Network. * @@ -528,18 +560,6 @@ public BmcKeySets bmcKeySets() { return bmcKeySets; } - /** - * Gets the resource collection API of MetricsConfigurations. It manages ClusterMetricsConfiguration. - * - * @return Resource collection API of MetricsConfigurations. - */ - public MetricsConfigurations metricsConfigurations() { - if (this.metricsConfigurations == null) { - this.metricsConfigurations = new MetricsConfigurationsImpl(clientObject.getMetricsConfigurations(), this); - } - return metricsConfigurations; - } - /** * Gets the resource collection API of AgentPools. It manages AgentPool. * @@ -578,12 +598,24 @@ public Consoles consoles() { } /** - * Gets wrapped service client NetworkCloud providing direct access to the underlying auto-generated API - * implementation, based on Azure REST API. + * Gets the resource collection API of MetricsConfigurations. It manages ClusterMetricsConfiguration. + * + * @return Resource collection API of MetricsConfigurations. + */ + public MetricsConfigurations metricsConfigurations() { + if (this.metricsConfigurations == null) { + this.metricsConfigurations = new MetricsConfigurationsImpl(clientObject.getMetricsConfigurations(), this); + } + return metricsConfigurations; + } + + /** + * Gets wrapped service client NetworkCloudManagementClient providing direct access to the underlying auto-generated + * API implementation, based on Azure REST API. * - * @return Wrapped service client NetworkCloud. + * @return Wrapped service client NetworkCloudManagementClient. */ - public NetworkCloud serviceClient() { + public NetworkCloudManagementClient serviceClient() { return this.clientObject; } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/AccessBridgesClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/AccessBridgesClient.java new file mode 100644 index 000000000000..36d2313bcc9c --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/AccessBridgesClient.java @@ -0,0 +1,299 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.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.networkcloud.fluent.models.AccessBridgeInner; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeAllowedName; +import com.azure.resourcemanager.networkcloud.models.AccessBridgePatchParameters; + +/** + * An instance of this class provides access to all the operations defined in AccessBridgesClient. + */ +public interface AccessBridgesClient { + /** + * Get the properties of the provided access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @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 properties of the provided access bridge along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName, Context context); + + /** + * Get the properties of the provided access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the provided access bridge. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AccessBridgeInner getByResourceGroup(String resourceGroupName, AccessBridgeAllowedName accessBridgeName); + + /** + * Create a new access bridge or update the properties of the existing access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param accessBridge The access bridge configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AccessBridgeInner> beginCreateOrUpdate(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName, AccessBridgeInner accessBridge); + + /** + * Create a new access bridge or update the properties of the existing access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param accessBridge The access bridge configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AccessBridgeInner> beginCreateOrUpdate(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName, AccessBridgeInner accessBridge, Context context); + + /** + * Create a new access bridge or update the properties of the existing access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param accessBridge The access bridge configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AccessBridgeInner createOrUpdate(String resourceGroupName, AccessBridgeAllowedName accessBridgeName, + AccessBridgeInner accessBridge); + + /** + * Create a new access bridge or update the properties of the existing access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param accessBridge The access bridge configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AccessBridgeInner createOrUpdate(String resourceGroupName, AccessBridgeAllowedName accessBridgeName, + AccessBridgeInner accessBridge, Context context); + + /** + * Update properties of the provided access bridge, or update tags associated with the access bridge. Properties and + * tag updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AccessBridgeInner> beginUpdate(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName); + + /** + * Update properties of the provided access bridge, or update tags associated with the access bridge. Properties and + * tag updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param accessBridgeUpdateParameters The request body. + * @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 accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AccessBridgeInner> beginUpdate(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName, String ifMatch, String ifNoneMatch, + AccessBridgePatchParameters accessBridgeUpdateParameters, Context context); + + /** + * Update properties of the provided access bridge, or update tags associated with the access bridge. Properties and + * tag updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AccessBridgeInner update(String resourceGroupName, AccessBridgeAllowedName accessBridgeName); + + /** + * Update properties of the provided access bridge, or update tags associated with the access bridge. Properties and + * tag updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param accessBridgeUpdateParameters The request body. + * @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 accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AccessBridgeInner update(String resourceGroupName, AccessBridgeAllowedName accessBridgeName, String ifMatch, + String ifNoneMatch, AccessBridgePatchParameters accessBridgeUpdateParameters, Context context); + + /** + * Delete the specified access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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, AccessBridgeAllowedName accessBridgeName); + + /** + * Delete the specified access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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, AccessBridgeAllowedName accessBridgeName, + String ifMatch, String ifNoneMatch, Context context); + + /** + * Delete the specified access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, AccessBridgeAllowedName accessBridgeName); + + /** + * Delete the specified access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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, AccessBridgeAllowedName accessBridgeName, String ifMatch, String ifNoneMatch, + Context context); + + /** + * Get a list of access bridges in the provided resource group. + * + * @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 a list of access bridges in the provided resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of access bridges in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 access bridges in the provided resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); + + /** + * Get a list of access bridges in the provided subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of access bridges in the provided subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of access bridges in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 access bridges in the provided subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Integer top, String skipToken, Context context); +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/AgentPoolsClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/AgentPoolsClient.java index 9e4d50d41655..5babbf172fc6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/AgentPoolsClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/AgentPoolsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.models.AgentPoolInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.AgentPoolPatchParameters; /** @@ -20,45 +19,6 @@ */ public interface AgentPoolsClient { /** - * List agent pools of the Kubernetes cluster. - * - * Get a list of agent pools for the provided Kubernetes cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 agent pools for the provided Kubernetes cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByKubernetesCluster(String resourceGroupName, String kubernetesClusterName); - - /** - * List agent pools of the Kubernetes cluster. - * - * Get a list of agent pools for the provided Kubernetes cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 agent pools for the provided Kubernetes cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByKubernetesCluster(String resourceGroupName, String kubernetesClusterName, - Integer top, String skipToken, Context context); - - /** - * Retrieve the Kubernetes cluster agent pool. - * * Get properties of the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -75,8 +35,6 @@ Response getWithResponse(String resourceGroupName, String kubern String agentPoolName, Context context); /** - * Retrieve the Kubernetes cluster agent pool. - * * Get properties of the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -91,8 +49,6 @@ Response getWithResponse(String resourceGroupName, String kubern AgentPoolInner get(String resourceGroupName, String kubernetesClusterName, String agentPoolName); /** - * Create or update the Kubernetes cluster agent pool. - * * Create a new Kubernetes cluster agent pool or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -109,8 +65,6 @@ SyncPoller, AgentPoolInner> beginCreateOrUpdate(Strin String kubernetesClusterName, String agentPoolName, AgentPoolInner agentPoolParameters); /** - * Create or update the Kubernetes cluster agent pool. - * * Create a new Kubernetes cluster agent pool or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -133,8 +87,6 @@ SyncPoller, AgentPoolInner> beginCreateOrUpdate(Strin String ifNoneMatch, Context context); /** - * Create or update the Kubernetes cluster agent pool. - * * Create a new Kubernetes cluster agent pool or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -151,8 +103,6 @@ AgentPoolInner createOrUpdate(String resourceGroupName, String kubernetesCluster AgentPoolInner agentPoolParameters); /** - * Create or update the Kubernetes cluster agent pool. - * * Create a new Kubernetes cluster agent pool or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -174,9 +124,8 @@ AgentPoolInner createOrUpdate(String resourceGroupName, String kubernetesCluster AgentPoolInner agentPoolParameters, String ifMatch, String ifNoneMatch, Context context); /** - * Delete the Kubernetes cluster agent pool. - * - * Delete the provided Kubernetes cluster agent pool. + * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the + * Kubernetes cluster agent pool. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -184,16 +133,15 @@ AgentPoolInner createOrUpdate(String resourceGroupName, String kubernetesCluster * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of agentPool represents the agent pool of Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, + SyncPoller, AgentPoolInner> beginUpdate(String resourceGroupName, String kubernetesClusterName, String agentPoolName); /** - * Delete the Kubernetes cluster agent pool. - * - * Delete the provided Kubernetes cluster agent pool. + * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the + * Kubernetes cluster agent pool. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -202,20 +150,21 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param agentPoolUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of agentPool represents the agent pool of Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String kubernetesClusterName, String agentPoolName, String ifMatch, String ifNoneMatch, Context context); + SyncPoller, AgentPoolInner> beginUpdate(String resourceGroupName, + String kubernetesClusterName, String agentPoolName, String ifMatch, String ifNoneMatch, + AgentPoolPatchParameters agentPoolUpdateParameters, Context context); /** - * Delete the Kubernetes cluster agent pool. - * - * Delete the provided Kubernetes cluster agent pool. + * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the + * Kubernetes cluster agent pool. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -223,15 +172,14 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return agentPool represents the agent pool of Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String kubernetesClusterName, String agentPoolName); + AgentPoolInner update(String resourceGroupName, String kubernetesClusterName, String agentPoolName); /** - * Delete the Kubernetes cluster agent pool. - * - * Delete the provided Kubernetes cluster agent pool. + * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the + * Kubernetes cluster agent pool. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -240,21 +188,19 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param agentPoolUpdateParameters The request body. * @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. + * @return agentPool represents the agent pool of Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String kubernetesClusterName, String agentPoolName, - String ifMatch, String ifNoneMatch, Context context); + AgentPoolInner update(String resourceGroupName, String kubernetesClusterName, String agentPoolName, String ifMatch, + String ifNoneMatch, AgentPoolPatchParameters agentPoolUpdateParameters, Context context); /** - * Patch the Kubernetes cluster agent pool. - * - * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the - * Kubernetes cluster agent pool. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -262,17 +208,14 @@ OperationStatusResultInner delete(String resourceGroupName, String kubernetesClu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 agentPool represents the agent pool of Kubernetes cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AgentPoolInner> beginUpdate(String resourceGroupName, - String kubernetesClusterName, String agentPoolName); + SyncPoller, Void> beginDelete(String resourceGroupName, String kubernetesClusterName, + String agentPoolName); /** - * Patch the Kubernetes cluster agent pool. - * - * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the - * Kubernetes cluster agent pool. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -281,23 +224,18 @@ SyncPoller, AgentPoolInner> beginUpdate(String resour * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param agentPoolUpdateParameters The request body. * @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 agentPool represents the agent pool of Kubernetes cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AgentPoolInner> beginUpdate(String resourceGroupName, - String kubernetesClusterName, String agentPoolName, String ifMatch, String ifNoneMatch, - AgentPoolPatchParameters agentPoolUpdateParameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String kubernetesClusterName, + String agentPoolName, String ifMatch, String ifNoneMatch, Context context); /** - * Patch the Kubernetes cluster agent pool. - * - * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the - * Kubernetes cluster agent pool. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -305,16 +243,12 @@ SyncPoller, AgentPoolInner> beginUpdate(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return agentPool represents the agent pool of Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - AgentPoolInner update(String resourceGroupName, String kubernetesClusterName, String agentPoolName); + void delete(String resourceGroupName, String kubernetesClusterName, String agentPoolName); /** - * Patch the Kubernetes cluster agent pool. - * - * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the - * Kubernetes cluster agent pool. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -323,14 +257,45 @@ SyncPoller, AgentPoolInner> beginUpdate(String resour * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param agentPoolUpdateParameters The request body. * @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 agentPool represents the agent pool of Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - AgentPoolInner update(String resourceGroupName, String kubernetesClusterName, String agentPoolName, String ifMatch, - String ifNoneMatch, AgentPoolPatchParameters agentPoolUpdateParameters, Context context); + void delete(String resourceGroupName, String kubernetesClusterName, String agentPoolName, String ifMatch, + String ifNoneMatch, Context context); + + /** + * Get a list of agent pools for the provided Kubernetes cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 agent pools for the provided Kubernetes cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByKubernetesCluster(String resourceGroupName, String kubernetesClusterName); + + /** + * Get a list of agent pools for the provided Kubernetes cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 agent pools for the provided Kubernetes cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByKubernetesCluster(String resourceGroupName, String kubernetesClusterName, + Integer top, String skipToken, Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/BareMetalMachineKeySetsClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/BareMetalMachineKeySetsClient.java index ea5779adfda5..549e807cffaa 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/BareMetalMachineKeySetsClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/BareMetalMachineKeySetsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.models.BareMetalMachineKeySetInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineKeySetPatchParameters; /** @@ -20,45 +19,6 @@ */ public interface BareMetalMachineKeySetsClient { /** - * List bare metal machine key sets of the cluster. - * - * Get a list of bare metal machine key sets for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 bare metal machine key sets for the provided cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCluster(String resourceGroupName, String clusterName); - - /** - * List bare metal machine key sets of the cluster. - * - * Get a list of bare metal machine key sets for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 bare metal machine key sets for the provided cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCluster(String resourceGroupName, String clusterName, Integer top, - String skipToken, Context context); - - /** - * Retrieve the bare metal machine key set of the cluster. - * * Get bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -75,8 +35,6 @@ Response getWithResponse(String resourceGroupName, String bareMetalMachineKeySetName, Context context); /** - * Retrieve the bare metal machine key set of the cluster. - * * Get bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -91,8 +49,6 @@ Response getWithResponse(String resourceGroupName, BareMetalMachineKeySetInner get(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName); /** - * Create or update the bare metal machine key set of the cluster. - * * Create a new bare metal machine key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -110,8 +66,6 @@ SyncPoller, BareMetalMachineKeySetInner> BareMetalMachineKeySetInner bareMetalMachineKeySetParameters); /** - * Create or update the bare metal machine key set of the cluster. - * * Create a new bare metal machine key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -135,8 +89,6 @@ SyncPoller, BareMetalMachineKeySetInner> Context context); /** - * Create or update the bare metal machine key set of the cluster. - * * Create a new bare metal machine key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -153,8 +105,6 @@ BareMetalMachineKeySetInner createOrUpdate(String resourceGroupName, String clus String bareMetalMachineKeySetName, BareMetalMachineKeySetInner bareMetalMachineKeySetParameters); /** - * Create or update the bare metal machine key set of the cluster. - * * Create a new bare metal machine key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -177,9 +127,8 @@ BareMetalMachineKeySetInner createOrUpdate(String resourceGroupName, String clus String ifNoneMatch, Context context); /** - * Delete the bare metal machine key set of the cluster. - * - * Delete the bare metal machine key set of the provided cluster. + * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -187,16 +136,15 @@ BareMetalMachineKeySetInner createOrUpdate(String resourceGroupName, String clus * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of bareMetalMachineKeySet represents the bare metal machine key set. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String clusterName, String bareMetalMachineKeySetName); + SyncPoller, BareMetalMachineKeySetInner> + beginUpdate(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName); /** - * Delete the bare metal machine key set of the cluster. - * - * Delete the bare metal machine key set of the provided cluster. + * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -205,20 +153,22 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineKeySetUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of bareMetalMachineKeySet represents the bare metal machine key set. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String clusterName, String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch, Context context); + SyncPoller, BareMetalMachineKeySetInner> beginUpdate( + String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, String ifMatch, + String ifNoneMatch, BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters, + Context context); /** - * Delete the bare metal machine key set of the cluster. - * - * Delete the bare metal machine key set of the provided cluster. + * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -226,15 +176,14 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return bareMetalMachineKeySet represents the bare metal machine key set. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName); + BareMetalMachineKeySetInner update(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName); /** - * Delete the bare metal machine key set of the cluster. - * - * Delete the bare metal machine key set of the provided cluster. + * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -243,21 +192,20 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineKeySetUpdateParameters The request body. * @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. + * @return bareMetalMachineKeySet represents the bare metal machine key set. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, - String ifMatch, String ifNoneMatch, Context context); + BareMetalMachineKeySetInner update(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, + String ifMatch, String ifNoneMatch, + BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters, Context context); /** - * Patch bare metal machine key set of the cluster. - * - * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -265,17 +213,14 @@ OperationStatusResultInner delete(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 bareMetalMachineKeySet represents the bare metal machine key set. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BareMetalMachineKeySetInner> - beginUpdate(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String bareMetalMachineKeySetName); /** - * Patch bare metal machine key set of the cluster. - * - * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -284,24 +229,18 @@ OperationStatusResultInner delete(String resourceGroupName, String clusterName, * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineKeySetUpdateParameters The request body. * @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 bareMetalMachineKeySet represents the bare metal machine key set. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BareMetalMachineKeySetInner> beginUpdate( - String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, String ifMatch, - String ifNoneMatch, BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters, - Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch, Context context); /** - * Patch bare metal machine key set of the cluster. - * - * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -309,16 +248,12 @@ SyncPoller, BareMetalMachineKeySetInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bareMetalMachineKeySet represents the bare metal machine key set. */ @ServiceMethod(returns = ReturnType.SINGLE) - BareMetalMachineKeySetInner update(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName); + void delete(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName); /** - * Patch bare metal machine key set of the cluster. - * - * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -327,15 +262,45 @@ SyncPoller, BareMetalMachineKeySetInner> * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineKeySetUpdateParameters The request body. * @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 bareMetalMachineKeySet represents the bare metal machine key set. */ @ServiceMethod(returns = ReturnType.SINGLE) - BareMetalMachineKeySetInner update(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, - String ifMatch, String ifNoneMatch, - BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters, Context context); + void delete(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, String ifMatch, + String ifNoneMatch, Context context); + + /** + * Get a list of bare metal machine key sets for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 bare metal machine key sets for the provided cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName); + + /** + * Get a list of bare metal machine key sets for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 bare metal machine key sets for the provided cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName, Integer top, + String skipToken, Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/BareMetalMachinesClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/BareMetalMachinesClient.java index ebd0d648a03b..9cc0df3f60fd 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/BareMetalMachinesClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/BareMetalMachinesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -12,88 +12,21 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.models.BareMetalMachineInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineCordonParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachinePatchParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachinePowerOffParameters; +import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReimageParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReplaceParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineRunCommandParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineRunDataExtractsParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineRunReadCommandsParameters; +import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; /** * An instance of this class provides access to all the operations defined in BareMetalMachinesClient. */ public interface BareMetalMachinesClient { /** - * List bare metal machines in the subscription. - * - * Get a list of bare metal machines in the provided subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of bare metal machines in the provided subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List bare metal machines in the subscription. - * - * Get a list of bare metal machines in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 bare metal machines in the provided subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Integer top, String skipToken, Context context); - - /** - * List bare metal machines in the resource group. - * - * Get a list of bare metal machines in the provided resource group. - * - * @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 a list of bare metal machines in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List bare metal machines in the resource group. - * - * Get a list of bare metal machines in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 bare metal machines in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context); - - /** - * Retrieve the bare metal machine. - * * Get properties of the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -109,8 +42,6 @@ Response getByResourceGroupWithResponse(String resourceGr String bareMetalMachineName, Context context); /** - * Retrieve the bare metal machine. - * * Get properties of the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -124,8 +55,6 @@ Response getByResourceGroupWithResponse(String resourceGr BareMetalMachineInner getByResourceGroup(String resourceGroupName, String bareMetalMachineName); /** - * Create or update the bare metal machine. - * * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests * will be rejected as the life cycle of this resource is managed by the system. * @@ -142,8 +71,6 @@ SyncPoller, BareMetalMachineInner> beginCreate String bareMetalMachineName, BareMetalMachineInner bareMetalMachineParameters); /** - * Create or update the bare metal machine. - * * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests * will be rejected as the life cycle of this resource is managed by the system. * @@ -166,8 +93,6 @@ SyncPoller, BareMetalMachineInner> beginCreate String ifNoneMatch, Context context); /** - * Create or update the bare metal machine. - * * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests * will be rejected as the life cycle of this resource is managed by the system. * @@ -184,8 +109,6 @@ BareMetalMachineInner createOrUpdate(String resourceGroupName, String bareMetalM BareMetalMachineInner bareMetalMachineParameters); /** - * Create or update the bare metal machine. - * * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests * will be rejected as the life cycle of this resource is managed by the system. * @@ -207,27 +130,23 @@ BareMetalMachineInner createOrUpdate(String resourceGroupName, String bareMetalM BareMetalMachineInner bareMetalMachineParameters, String ifMatch, String ifNoneMatch, Context context); /** - * Delete the bare metal machine. - * - * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of - * this resource is managed by the system. + * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of bareMetalMachine represents the physical machine in the rack. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, + SyncPoller, BareMetalMachineInner> beginUpdate(String resourceGroupName, String bareMetalMachineName); /** - * Delete the bare metal machine. - * - * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of - * this resource is managed by the system. + * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -235,37 +154,35 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of bareMetalMachine represents the physical machine in the rack. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String bareMetalMachineName, String ifMatch, String ifNoneMatch, Context context); + SyncPoller, BareMetalMachineInner> beginUpdate(String resourceGroupName, + String bareMetalMachineName, String ifMatch, String ifNoneMatch, + BareMetalMachinePatchParameters bareMetalMachineUpdateParameters, Context context); /** - * Delete the bare metal machine. - * - * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of - * this resource is managed by the system. + * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return bareMetalMachine represents the physical machine in the rack. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String bareMetalMachineName); + BareMetalMachineInner update(String resourceGroupName, String bareMetalMachineName); /** - * Delete the bare metal machine. - * - * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of - * this resource is managed by the system. + * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -273,38 +190,34 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineUpdateParameters The request body. * @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. + * @return bareMetalMachine represents the physical machine in the rack. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String bareMetalMachineName, String ifMatch, - String ifNoneMatch, Context context); + BareMetalMachineInner update(String resourceGroupName, String bareMetalMachineName, String ifMatch, + String ifNoneMatch, BareMetalMachinePatchParameters bareMetalMachineUpdateParameters, Context context); /** - * Patch the bare metal machine. - * - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. - * Properties and tag updates can be done independently. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 bareMetalMachine represents the physical machine in the rack. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BareMetalMachineInner> beginUpdate(String resourceGroupName, - String bareMetalMachineName); + SyncPoller, Void> beginDelete(String resourceGroupName, String bareMetalMachineName); /** - * Patch the bare metal machine. - * - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. - * Properties and tag updates can be done independently. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -312,39 +225,32 @@ SyncPoller, BareMetalMachineInner> beginUpdate * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineUpdateParameters The request body. * @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 bareMetalMachine represents the physical machine in the rack. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BareMetalMachineInner> beginUpdate(String resourceGroupName, - String bareMetalMachineName, String ifMatch, String ifNoneMatch, - BareMetalMachinePatchParameters bareMetalMachineUpdateParameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String bareMetalMachineName, + String ifMatch, String ifNoneMatch, Context context); /** - * Patch the bare metal machine. - * - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. - * Properties and tag updates can be done independently. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bareMetalMachine represents the physical machine in the rack. */ @ServiceMethod(returns = ReturnType.SINGLE) - BareMetalMachineInner update(String resourceGroupName, String bareMetalMachineName); + void delete(String resourceGroupName, String bareMetalMachineName); /** - * Patch the bare metal machine. - * - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. - * Properties and tag updates can be done independently. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. @@ -352,20 +258,74 @@ SyncPoller, BareMetalMachineInner> beginUpdate * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineUpdateParameters The request body. * @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 bareMetalMachine represents the physical machine in the rack. */ @ServiceMethod(returns = ReturnType.SINGLE) - BareMetalMachineInner update(String resourceGroupName, String bareMetalMachineName, String ifMatch, - String ifNoneMatch, BareMetalMachinePatchParameters bareMetalMachineUpdateParameters, Context context); + void delete(String resourceGroupName, String bareMetalMachineName, String ifMatch, String ifNoneMatch, + Context context); /** - * Cordon the bare metal machine. + * Get a list of bare metal machines in the provided resource group. * + * @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 a list of bare metal machines in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of bare metal machines in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 bare metal machines in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); + + /** + * Get a list of bare metal machines in the provided subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of bare metal machines in the provided subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of bare metal machines in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 bare metal machines in the provided subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Integer top, String skipToken, Context context); + + /** * Cordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -373,15 +333,13 @@ BareMetalMachineInner update(String resourceGroupName, String bareMetalMachineNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginCordon(String resourceGroupName, + SyncPoller, OperationStatusResult> beginCordon(String resourceGroupName, String bareMetalMachineName); /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -391,16 +349,14 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginCordon(String resourceGroupName, + SyncPoller, OperationStatusResult> beginCordon(String resourceGroupName, String bareMetalMachineName, BareMetalMachineCordonParameters bareMetalMachineCordonParameters, Context context); /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -408,14 +364,12 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner cordon(String resourceGroupName, String bareMetalMachineName); + OperationStatusResult cordon(String resourceGroupName, String bareMetalMachineName); /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -425,15 +379,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner cordon(String resourceGroupName, String bareMetalMachineName, + OperationStatusResult cordon(String resourceGroupName, String bareMetalMachineName, BareMetalMachineCordonParameters bareMetalMachineCordonParameters, Context context); /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -441,15 +393,13 @@ OperationStatusResultInner cordon(String resourceGroupName, String bareMetalMach * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> - beginPowerOff(String resourceGroupName, String bareMetalMachineName); + SyncPoller, OperationStatusResult> beginPowerOff(String resourceGroupName, + String bareMetalMachineName); /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -459,16 +409,14 @@ OperationStatusResultInner cordon(String resourceGroupName, String bareMetalMach * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginPowerOff( - String resourceGroupName, String bareMetalMachineName, - BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters, Context context); + SyncPoller, OperationStatusResult> beginPowerOff(String resourceGroupName, + String bareMetalMachineName, BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters, + Context context); /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -476,14 +424,12 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner powerOff(String resourceGroupName, String bareMetalMachineName); + OperationStatusResult powerOff(String resourceGroupName, String bareMetalMachineName); /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -493,15 +439,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner powerOff(String resourceGroupName, String bareMetalMachineName, + OperationStatusResult powerOff(String resourceGroupName, String bareMetalMachineName, BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters, Context context); /** - * Reimage the bare metal machine. - * * Reimage the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -509,32 +453,29 @@ OperationStatusResultInner powerOff(String resourceGroupName, String bareMetalMa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> - beginReimage(String resourceGroupName, String bareMetalMachineName); + SyncPoller, OperationStatusResult> beginReimage(String resourceGroupName, + String bareMetalMachineName); /** - * Reimage the bare metal machine. - * * Reimage the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. + * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> - beginReimage(String resourceGroupName, String bareMetalMachineName, Context context); + SyncPoller, OperationStatusResult> beginReimage(String resourceGroupName, + String bareMetalMachineName, BareMetalMachineReimageParameters body, Context context); /** - * Reimage the bare metal machine. - * * Reimage the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -542,30 +483,28 @@ OperationStatusResultInner powerOff(String resourceGroupName, String bareMetalMa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner reimage(String resourceGroupName, String bareMetalMachineName); + OperationStatusResult reimage(String resourceGroupName, String bareMetalMachineName); /** - * Reimage the bare metal machine. - * * Reimage the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. + * @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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner reimage(String resourceGroupName, String bareMetalMachineName, Context context); + OperationStatusResult reimage(String resourceGroupName, String bareMetalMachineName, + BareMetalMachineReimageParameters body, Context context); /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -573,15 +512,13 @@ OperationStatusResultInner powerOff(String resourceGroupName, String bareMetalMa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> - beginReplace(String resourceGroupName, String bareMetalMachineName); + SyncPoller, OperationStatusResult> beginReplace(String resourceGroupName, + String bareMetalMachineName); /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -591,16 +528,14 @@ OperationStatusResultInner powerOff(String resourceGroupName, String bareMetalMa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginReplace( - String resourceGroupName, String bareMetalMachineName, - BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters, Context context); + SyncPoller, OperationStatusResult> beginReplace(String resourceGroupName, + String bareMetalMachineName, BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters, + Context context); /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -608,14 +543,12 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner replace(String resourceGroupName, String bareMetalMachineName); + OperationStatusResult replace(String resourceGroupName, String bareMetalMachineName); /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -625,15 +558,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner replace(String resourceGroupName, String bareMetalMachineName, + OperationStatusResult replace(String resourceGroupName, String bareMetalMachineName, BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters, Context context); /** - * Restart the bare metal machine. - * * Restart the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -641,15 +572,13 @@ OperationStatusResultInner replace(String resourceGroupName, String bareMetalMac * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> - beginRestart(String resourceGroupName, String bareMetalMachineName); + SyncPoller, OperationStatusResult> beginRestart(String resourceGroupName, + String bareMetalMachineName); /** - * Restart the bare metal machine. - * * Restart the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -658,15 +587,13 @@ OperationStatusResultInner replace(String resourceGroupName, String bareMetalMac * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> - beginRestart(String resourceGroupName, String bareMetalMachineName, Context context); + SyncPoller, OperationStatusResult> beginRestart(String resourceGroupName, + String bareMetalMachineName, Context context); /** - * Restart the bare metal machine. - * * Restart the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -674,14 +601,12 @@ OperationStatusResultInner replace(String resourceGroupName, String bareMetalMac * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner restart(String resourceGroupName, String bareMetalMachineName); + OperationStatusResult restart(String resourceGroupName, String bareMetalMachineName); /** - * Restart the bare metal machine. - * * Restart the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -690,14 +615,12 @@ OperationStatusResultInner replace(String resourceGroupName, String bareMetalMac * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner restart(String resourceGroupName, String bareMetalMachineName, Context context); + OperationStatusResult restart(String resourceGroupName, String bareMetalMachineName, Context context); /** - * Run the command on the bare metal machine. - * * Run the command or the script on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -707,16 +630,13 @@ OperationStatusResultInner replace(String resourceGroupName, String bareMetalMac * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginRunCommand( - String resourceGroupName, String bareMetalMachineName, - BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters); + SyncPoller, OperationStatusResult> beginRunCommand(String resourceGroupName, + String bareMetalMachineName, BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters); /** - * Run the command on the bare metal machine. - * * Run the command or the script on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -727,16 +647,14 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginRunCommand( - String resourceGroupName, String bareMetalMachineName, - BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters, Context context); + SyncPoller, OperationStatusResult> beginRunCommand(String resourceGroupName, + String bareMetalMachineName, BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters, + Context context); /** - * Run the command on the bare metal machine. - * * Run the command or the script on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -746,15 +664,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner runCommand(String resourceGroupName, String bareMetalMachineName, + OperationStatusResult runCommand(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters); /** - * Run the command on the bare metal machine. - * * Run the command or the script on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -765,15 +681,13 @@ OperationStatusResultInner runCommand(String resourceGroupName, String bareMetal * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner runCommand(String resourceGroupName, String bareMetalMachineName, + OperationStatusResult runCommand(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters, Context context); /** - * Run data extraction for a bare metal machine. - * * Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -783,16 +697,14 @@ OperationStatusResultInner runCommand(String resourceGroupName, String bareMetal * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginRunDataExtracts( - String resourceGroupName, String bareMetalMachineName, + SyncPoller, OperationStatusResult> beginRunDataExtracts(String resourceGroupName, + String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters); /** - * Run data extraction for a bare metal machine. - * * Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -803,16 +715,14 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginRunDataExtracts( - String resourceGroupName, String bareMetalMachineName, + SyncPoller, OperationStatusResult> beginRunDataExtracts(String resourceGroupName, + String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters, Context context); /** - * Run data extraction for a bare metal machine. - * * Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -822,15 +732,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner runDataExtracts(String resourceGroupName, String bareMetalMachineName, + OperationStatusResult runDataExtracts(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters); /** - * Run data extraction for a bare metal machine. - * * Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -841,15 +749,13 @@ OperationStatusResultInner runDataExtracts(String resourceGroupName, String bare * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner runDataExtracts(String resourceGroupName, String bareMetalMachineName, + OperationStatusResult runDataExtracts(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters, Context context); /** - * Run restricted data extraction for a bare metal machine. - * * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with * the command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -860,16 +766,14 @@ OperationStatusResultInner runDataExtracts(String resourceGroupName, String bare * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginRunDataExtractsRestricted( + SyncPoller, OperationStatusResult> beginRunDataExtractsRestricted( String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters); /** - * Run restricted data extraction for a bare metal machine. - * * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with * the command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -881,16 +785,14 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginRunDataExtractsRestricted( + SyncPoller, OperationStatusResult> beginRunDataExtractsRestricted( String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters, Context context); /** - * Run restricted data extraction for a bare metal machine. - * * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with * the command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -901,15 +803,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner runDataExtractsRestricted(String resourceGroupName, String bareMetalMachineName, + OperationStatusResult runDataExtractsRestricted(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters); /** - * Run restricted data extraction for a bare metal machine. - * * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with * the command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -921,15 +821,13 @@ OperationStatusResultInner runDataExtractsRestricted(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner runDataExtractsRestricted(String resourceGroupName, String bareMetalMachineName, + OperationStatusResult runDataExtractsRestricted(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters, Context context); /** - * Run read-only commands against a bare metal machine. - * * Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the * command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -940,16 +838,14 @@ OperationStatusResultInner runDataExtractsRestricted(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginRunReadCommands( - String resourceGroupName, String bareMetalMachineName, + SyncPoller, OperationStatusResult> beginRunReadCommands(String resourceGroupName, + String bareMetalMachineName, BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters); /** - * Run read-only commands against a bare metal machine. - * * Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the * command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -961,16 +857,14 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginRunReadCommands( - String resourceGroupName, String bareMetalMachineName, + SyncPoller, OperationStatusResult> beginRunReadCommands(String resourceGroupName, + String bareMetalMachineName, BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters, Context context); /** - * Run read-only commands against a bare metal machine. - * * Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the * command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -981,15 +875,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner runReadCommands(String resourceGroupName, String bareMetalMachineName, + OperationStatusResult runReadCommands(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters); /** - * Run read-only commands against a bare metal machine. - * * Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the * command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -1001,15 +893,13 @@ OperationStatusResultInner runReadCommands(String resourceGroupName, String bare * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner runReadCommands(String resourceGroupName, String bareMetalMachineName, + OperationStatusResult runReadCommands(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters, Context context); /** - * Start the bare metal machine. - * * Start the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1017,15 +907,13 @@ OperationStatusResultInner runReadCommands(String resourceGroupName, String bare * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginStart(String resourceGroupName, + SyncPoller, OperationStatusResult> beginStart(String resourceGroupName, String bareMetalMachineName); /** - * Start the bare metal machine. - * * Start the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1034,15 +922,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginStart(String resourceGroupName, + SyncPoller, OperationStatusResult> beginStart(String resourceGroupName, String bareMetalMachineName, Context context); /** - * Start the bare metal machine. - * * Start the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1050,14 +936,12 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner start(String resourceGroupName, String bareMetalMachineName); + OperationStatusResult start(String resourceGroupName, String bareMetalMachineName); /** - * Start the bare metal machine. - * * Start the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1066,14 +950,12 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner start(String resourceGroupName, String bareMetalMachineName, Context context); + OperationStatusResult start(String resourceGroupName, String bareMetalMachineName, Context context); /** - * Uncordon the bare metal machine. - * * Uncordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1081,15 +963,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> - beginUncordon(String resourceGroupName, String bareMetalMachineName); + SyncPoller, OperationStatusResult> beginUncordon(String resourceGroupName, + String bareMetalMachineName); /** - * Uncordon the bare metal machine. - * * Uncordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1098,15 +978,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> - beginUncordon(String resourceGroupName, String bareMetalMachineName, Context context); + SyncPoller, OperationStatusResult> beginUncordon(String resourceGroupName, + String bareMetalMachineName, Context context); /** - * Uncordon the bare metal machine. - * * Uncordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1114,14 +992,12 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner uncordon(String resourceGroupName, String bareMetalMachineName); + OperationStatusResult uncordon(String resourceGroupName, String bareMetalMachineName); /** - * Uncordon the bare metal machine. - * * Uncordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1130,8 +1006,8 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner uncordon(String resourceGroupName, String bareMetalMachineName, Context context); + OperationStatusResult uncordon(String resourceGroupName, String bareMetalMachineName, Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/BmcKeySetsClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/BmcKeySetsClient.java index bfa6fd9b2f68..d0a6c5e406c7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/BmcKeySetsClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/BmcKeySetsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.models.BmcKeySetInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.BmcKeySetPatchParameters; /** @@ -20,45 +19,6 @@ */ public interface BmcKeySetsClient { /** - * List baseboard management controller key sets of the cluster. - * - * Get a list of baseboard management controller key sets for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 baseboard management controller key sets for the provided cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCluster(String resourceGroupName, String clusterName); - - /** - * List baseboard management controller key sets of the cluster. - * - * Get a list of baseboard management controller key sets for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 baseboard management controller key sets for the provided cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCluster(String resourceGroupName, String clusterName, Integer top, - String skipToken, Context context); - - /** - * Retrieve the baseboard management controller key set of the cluster. - * * Get baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -75,8 +35,6 @@ Response getWithResponse(String resourceGroupName, String cluste Context context); /** - * Retrieve the baseboard management controller key set of the cluster. - * * Get baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -91,8 +49,6 @@ Response getWithResponse(String resourceGroupName, String cluste BmcKeySetInner get(String resourceGroupName, String clusterName, String bmcKeySetName); /** - * Create or update the baseboard management controller key set of the cluster. - * * Create a new baseboard management controller key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -109,8 +65,6 @@ SyncPoller, BmcKeySetInner> beginCreateOrUpdate(Strin String clusterName, String bmcKeySetName, BmcKeySetInner bmcKeySetParameters); /** - * Create or update the baseboard management controller key set of the cluster. - * * Create a new baseboard management controller key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -133,8 +87,6 @@ SyncPoller, BmcKeySetInner> beginCreateOrUpdate(Strin String ifNoneMatch, Context context); /** - * Create or update the baseboard management controller key set of the cluster. - * * Create a new baseboard management controller key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -151,8 +103,6 @@ BmcKeySetInner createOrUpdate(String resourceGroupName, String clusterName, Stri BmcKeySetInner bmcKeySetParameters); /** - * Create or update the baseboard management controller key set of the cluster. - * * Create a new baseboard management controller key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -174,9 +124,8 @@ BmcKeySetInner createOrUpdate(String resourceGroupName, String clusterName, Stri BmcKeySetInner bmcKeySetParameters, String ifMatch, String ifNoneMatch, Context context); /** - * Delete the baseboard management controller key set of the cluster. - * - * Delete the baseboard management controller key set of the provided cluster. + * Patch properties of baseboard management controller key set for the provided cluster, or update the tags + * associated with it. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -184,16 +133,15 @@ BmcKeySetInner createOrUpdate(String resourceGroupName, String clusterName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of bmcKeySet represents the baseboard management controller key set. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String clusterName, String bmcKeySetName); + SyncPoller, BmcKeySetInner> beginUpdate(String resourceGroupName, String clusterName, + String bmcKeySetName); /** - * Delete the baseboard management controller key set of the cluster. - * - * Delete the baseboard management controller key set of the provided cluster. + * Patch properties of baseboard management controller key set for the provided cluster, or update the tags + * associated with it. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -202,20 +150,21 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bmcKeySetUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of bmcKeySet represents the baseboard management controller key set. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String clusterName, String bmcKeySetName, String ifMatch, String ifNoneMatch, Context context); + SyncPoller, BmcKeySetInner> beginUpdate(String resourceGroupName, String clusterName, + String bmcKeySetName, String ifMatch, String ifNoneMatch, BmcKeySetPatchParameters bmcKeySetUpdateParameters, + Context context); /** - * Delete the baseboard management controller key set of the cluster. - * - * Delete the baseboard management controller key set of the provided cluster. + * Patch properties of baseboard management controller key set for the provided cluster, or update the tags + * associated with it. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -223,15 +172,14 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return bmcKeySet represents the baseboard management controller key set. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String clusterName, String bmcKeySetName); + BmcKeySetInner update(String resourceGroupName, String clusterName, String bmcKeySetName); /** - * Delete the baseboard management controller key set of the cluster. - * - * Delete the baseboard management controller key set of the provided cluster. + * Patch properties of baseboard management controller key set for the provided cluster, or update the tags + * associated with it. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -240,21 +188,19 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bmcKeySetUpdateParameters The request body. * @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. + * @return bmcKeySet represents the baseboard management controller key set. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String clusterName, String bmcKeySetName, - String ifMatch, String ifNoneMatch, Context context); + BmcKeySetInner update(String resourceGroupName, String clusterName, String bmcKeySetName, String ifMatch, + String ifNoneMatch, BmcKeySetPatchParameters bmcKeySetUpdateParameters, Context context); /** - * Patch baseboard management controller key set of the cluster. - * - * Patch properties of baseboard management controller key set for the provided cluster, or update the tags - * associated with it. Properties and tag updates can be done independently. + * Delete the baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -262,17 +208,13 @@ OperationStatusResultInner delete(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 bmcKeySet represents the baseboard management controller key set. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BmcKeySetInner> beginUpdate(String resourceGroupName, String clusterName, - String bmcKeySetName); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String bmcKeySetName); /** - * Patch baseboard management controller key set of the cluster. - * - * Patch properties of baseboard management controller key set for the provided cluster, or update the tags - * associated with it. Properties and tag updates can be done independently. + * Delete the baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -281,23 +223,18 @@ SyncPoller, BmcKeySetInner> beginUpdate(String resour * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bmcKeySetUpdateParameters The request body. * @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 bmcKeySet represents the baseboard management controller key set. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BmcKeySetInner> beginUpdate(String resourceGroupName, String clusterName, - String bmcKeySetName, String ifMatch, String ifNoneMatch, BmcKeySetPatchParameters bmcKeySetUpdateParameters, - Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String bmcKeySetName, + String ifMatch, String ifNoneMatch, Context context); /** - * Patch baseboard management controller key set of the cluster. - * - * Patch properties of baseboard management controller key set for the provided cluster, or update the tags - * associated with it. Properties and tag updates can be done independently. + * Delete the baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -305,16 +242,12 @@ SyncPoller, BmcKeySetInner> beginUpdate(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bmcKeySet represents the baseboard management controller key set. */ @ServiceMethod(returns = ReturnType.SINGLE) - BmcKeySetInner update(String resourceGroupName, String clusterName, String bmcKeySetName); + void delete(String resourceGroupName, String clusterName, String bmcKeySetName); /** - * Patch baseboard management controller key set of the cluster. - * - * Patch properties of baseboard management controller key set for the provided cluster, or update the tags - * associated with it. Properties and tag updates can be done independently. + * Delete the baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -323,14 +256,45 @@ SyncPoller, BmcKeySetInner> beginUpdate(String resour * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bmcKeySetUpdateParameters The request body. * @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 bmcKeySet represents the baseboard management controller key set. */ @ServiceMethod(returns = ReturnType.SINGLE) - BmcKeySetInner update(String resourceGroupName, String clusterName, String bmcKeySetName, String ifMatch, - String ifNoneMatch, BmcKeySetPatchParameters bmcKeySetUpdateParameters, Context context); + void delete(String resourceGroupName, String clusterName, String bmcKeySetName, String ifMatch, String ifNoneMatch, + Context context); + + /** + * Get a list of baseboard management controller key sets for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 baseboard management controller key sets for the provided cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName); + + /** + * Get a list of baseboard management controller key sets for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 baseboard management controller key sets for the provided cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName, Integer top, + String skipToken, Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/CloudServicesNetworksClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/CloudServicesNetworksClient.java index 73836f144196..f31b74c0c496 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/CloudServicesNetworksClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/CloudServicesNetworksClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.models.CloudServicesNetworkInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkPatchParameters; /** @@ -20,74 +19,6 @@ */ public interface CloudServicesNetworksClient { /** - * List cloud services networks in the subscription. - * - * Get a list of cloud services networks in the provided subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of cloud services networks in the provided subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List cloud services networks in the subscription. - * - * Get a list of cloud services networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 cloud services networks in the provided subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Integer top, String skipToken, Context context); - - /** - * List cloud services networks in the resource group. - * - * Get a list of cloud services networks in the provided resource group. - * - * @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 a list of cloud services networks in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List cloud services networks in the resource group. - * - * Get a list of cloud services networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 cloud services networks in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, - String skipToken, Context context); - - /** - * Retrieve the cloud services network. - * * Get properties of the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -103,8 +34,6 @@ Response getByResourceGroupWithResponse(String resour String cloudServicesNetworkName, Context context); /** - * Retrieve the cloud services network. - * * Get properties of the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -118,8 +47,6 @@ Response getByResourceGroupWithResponse(String resour CloudServicesNetworkInner getByResourceGroup(String resourceGroupName, String cloudServicesNetworkName); /** - * Create or update the cloud services network. - * * Create a new cloud services network or update the properties of the existing cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -128,8 +55,8 @@ Response getByResourceGroupWithResponse(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 cloudServicesNetwork represents additional egress information that - * will be used by associated virtual machines or hybrid AKS clusters. + * @return the {@link SyncPoller} for polling of upon creation, the additional services that are provided by the + * platform will be allocated and represented in the status of this resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CloudServicesNetworkInner> beginCreateOrUpdate( @@ -137,8 +64,6 @@ SyncPoller, CloudServicesNetworkInner> beg CloudServicesNetworkInner cloudServicesNetworkParameters); /** - * Create or update the cloud services network. - * * Create a new cloud services network or update the properties of the existing cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -152,8 +77,8 @@ SyncPoller, CloudServicesNetworkInner> beg * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 cloudServicesNetwork represents additional egress information that - * will be used by associated virtual machines or hybrid AKS clusters. + * @return the {@link SyncPoller} for polling of upon creation, the additional services that are provided by the + * platform will be allocated and represented in the status of this resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CloudServicesNetworkInner> beginCreateOrUpdate( @@ -161,8 +86,6 @@ SyncPoller, CloudServicesNetworkInner> beg CloudServicesNetworkInner cloudServicesNetworkParameters, String ifMatch, String ifNoneMatch, Context context); /** - * Create or update the cloud services network. - * * Create a new cloud services network or update the properties of the existing cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -171,16 +94,14 @@ SyncPoller, CloudServicesNetworkInner> beg * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudServicesNetwork represents additional egress information that will be used by associated virtual - * machines or hybrid AKS clusters. + * @return upon creation, the additional services that are provided by the platform will be allocated and + * represented in the status of this resource. */ @ServiceMethod(returns = ReturnType.SINGLE) CloudServicesNetworkInner createOrUpdate(String resourceGroupName, String cloudServicesNetworkName, CloudServicesNetworkInner cloudServicesNetworkParameters); /** - * Create or update the cloud services network. - * * Create a new cloud services network or update the properties of the existing cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -194,33 +115,32 @@ CloudServicesNetworkInner createOrUpdate(String resourceGroupName, String cloudS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudServicesNetwork represents additional egress information that will be used by associated virtual - * machines or hybrid AKS clusters. + * @return upon creation, the additional services that are provided by the platform will be allocated and + * represented in the status of this resource. */ @ServiceMethod(returns = ReturnType.SINGLE) CloudServicesNetworkInner createOrUpdate(String resourceGroupName, String cloudServicesNetworkName, CloudServicesNetworkInner cloudServicesNetworkParameters, String ifMatch, String ifNoneMatch, Context context); /** - * Delete the cloud services network. - * - * Delete the provided cloud services network. + * Update properties of the provided cloud services network, or update the tags associated with it. Properties and + * tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services 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 the current status of an async operation. + * @return the {@link SyncPoller} for polling of upon creation, the additional services that are provided by the + * platform will be allocated and represented in the status of this resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, + SyncPoller, CloudServicesNetworkInner> beginUpdate(String resourceGroupName, String cloudServicesNetworkName); /** - * Delete the cloud services network. - * - * Delete the provided cloud services network. + * Update properties of the provided cloud services network, or update the tags associated with it. Properties and + * tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. @@ -228,35 +148,37 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param cloudServicesNetworkUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of upon creation, the additional services that are provided by the + * platform will be allocated and represented in the status of this resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String cloudServicesNetworkName, String ifMatch, String ifNoneMatch, Context context); + SyncPoller, CloudServicesNetworkInner> beginUpdate(String resourceGroupName, + String cloudServicesNetworkName, String ifMatch, String ifNoneMatch, + CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters, Context context); /** - * Delete the cloud services network. - * - * Delete the provided cloud services network. + * Update properties of the provided cloud services network, or update the tags associated with it. Properties and + * tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services 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 current status of an async operation. + * @return upon creation, the additional services that are provided by the platform will be allocated and + * represented in the status of this resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String cloudServicesNetworkName); + CloudServicesNetworkInner update(String resourceGroupName, String cloudServicesNetworkName); /** - * Delete the cloud services network. - * - * Delete the provided cloud services network. + * Update properties of the provided cloud services network, or update the tags associated with it. Properties and + * tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. @@ -264,39 +186,33 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param cloudServicesNetworkUpdateParameters The request body. * @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. + * @return upon creation, the additional services that are provided by the platform will be allocated and + * represented in the status of this resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String cloudServicesNetworkName, String ifMatch, - String ifNoneMatch, Context context); + CloudServicesNetworkInner update(String resourceGroupName, String cloudServicesNetworkName, String ifMatch, + String ifNoneMatch, CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters, Context context); /** - * Patch the cloud services network. - * - * Update properties of the provided cloud services network, or update the tags associated with it. Properties and - * tag updates can be done independently. + * Delete the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services 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 cloudServicesNetwork represents additional egress information that - * will be used by associated virtual machines or hybrid AKS clusters. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CloudServicesNetworkInner> beginUpdate(String resourceGroupName, - String cloudServicesNetworkName); + SyncPoller, Void> beginDelete(String resourceGroupName, String cloudServicesNetworkName); /** - * Patch the cloud services network. - * - * Update properties of the provided cloud services network, or update the tags associated with it. Properties and - * tag updates can be done independently. + * Delete the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. @@ -304,41 +220,30 @@ SyncPoller, CloudServicesNetworkInner> beg * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param cloudServicesNetworkUpdateParameters The request body. * @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 cloudServicesNetwork represents additional egress information that - * will be used by associated virtual machines or hybrid AKS clusters. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CloudServicesNetworkInner> beginUpdate(String resourceGroupName, - String cloudServicesNetworkName, String ifMatch, String ifNoneMatch, - CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String cloudServicesNetworkName, + String ifMatch, String ifNoneMatch, Context context); /** - * Patch the cloud services network. - * - * Update properties of the provided cloud services network, or update the tags associated with it. Properties and - * tag updates can be done independently. + * Delete the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services 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 cloudServicesNetwork represents additional egress information that will be used by associated virtual - * machines or hybrid AKS clusters. */ @ServiceMethod(returns = ReturnType.SINGLE) - CloudServicesNetworkInner update(String resourceGroupName, String cloudServicesNetworkName); + void delete(String resourceGroupName, String cloudServicesNetworkName); /** - * Patch the cloud services network. - * - * Update properties of the provided cloud services network, or update the tags associated with it. Properties and - * tag updates can be done independently. + * Delete the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. @@ -346,15 +251,70 @@ SyncPoller, CloudServicesNetworkInner> beg * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param cloudServicesNetworkUpdateParameters The request body. * @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 cloudServicesNetwork represents additional egress information that will be used by associated virtual - * machines or hybrid AKS clusters. */ @ServiceMethod(returns = ReturnType.SINGLE) - CloudServicesNetworkInner update(String resourceGroupName, String cloudServicesNetworkName, String ifMatch, - String ifNoneMatch, CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters, Context context); + void delete(String resourceGroupName, String cloudServicesNetworkName, String ifMatch, String ifNoneMatch, + Context context); + + /** + * Get a list of cloud services networks in the provided resource group. + * + * @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 a list of cloud services networks in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of cloud services networks in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 cloud services networks in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, + String skipToken, Context context); + + /** + * Get a list of cloud services networks in the provided subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of cloud services networks in the provided subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of cloud services networks in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 cloud services networks in the provided subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Integer top, String skipToken, Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/ClusterManagersClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/ClusterManagersClient.java index b4294ff812d0..613d633f643a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/ClusterManagersClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/ClusterManagersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -12,80 +12,15 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.models.ClusterManagerInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.ClusterManagerPatchParameters; +import com.azure.resourcemanager.networkcloud.models.ClusterManagerUpdateRelayPrivateEndpointConnectionParameters; +import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; /** * An instance of this class provides access to all the operations defined in ClusterManagersClient. */ public interface ClusterManagersClient { /** - * List cluster managers in the subscription. - * - * Get a list of cluster managers in the provided subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of cluster managers in the provided subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List cluster managers in the subscription. - * - * Get a list of cluster managers in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 cluster managers in the provided subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Integer top, String skipToken, Context context); - - /** - * List cluster managers in the resource group. - * - * Get a list of cluster managers in the provided resource group. - * - * @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 a list of cluster managers in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List cluster managers in the resource group. - * - * Get a list of cluster managers in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 cluster managers in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context); - - /** - * Retrieve the cluster manager. - * * Get the properties of the provided cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -101,8 +36,6 @@ Response getByResourceGroupWithResponse(String resourceGrou Context context); /** - * Retrieve the cluster manager. - * * Get the properties of the provided cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -116,8 +49,6 @@ Response getByResourceGroupWithResponse(String resourceGrou ClusterManagerInner getByResourceGroup(String resourceGroupName, String clusterManagerName); /** - * Create or update the cluster manager. - * * Create a new cluster manager or update properties of the cluster manager if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -134,8 +65,6 @@ SyncPoller, ClusterManagerInner> beginCreateOrUp String clusterManagerName, ClusterManagerInner clusterManagerParameters); /** - * Create or update the cluster manager. - * * Create a new cluster manager or update properties of the cluster manager if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -158,8 +87,6 @@ SyncPoller, ClusterManagerInner> beginCreateOrUp Context context); /** - * Create or update the cluster manager. - * * Create a new cluster manager or update properties of the cluster manager if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -175,8 +102,6 @@ ClusterManagerInner createOrUpdate(String resourceGroupName, String clusterManag ClusterManagerInner clusterManagerParameters); /** - * Create or update the cluster manager. - * * Create a new cluster manager or update properties of the cluster manager if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -197,8 +122,43 @@ ClusterManagerInner createOrUpdate(String resourceGroupName, String clusterManag ClusterManagerInner clusterManagerParameters, String ifMatch, String ifNoneMatch, Context context); /** - * Delete the cluster manager. + * Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties + * and tag updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param clusterManagerUpdateParameters The request body. + * @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 clusterManager represents a control-plane to manage one or more on-premises clusters along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String clusterManagerName, + String ifMatch, String ifNoneMatch, ClusterManagerPatchParameters clusterManagerUpdateParameters, + Context context); + + /** + * Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties + * and tag updates can be done independently. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return clusterManager represents a control-plane to manage one or more on-premises clusters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterManagerInner update(String resourceGroupName, String clusterManagerName); + + /** * Delete the provided cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -206,15 +166,12 @@ ClusterManagerInner createOrUpdate(String resourceGroupName, String clusterManag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String clusterManagerName); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterManagerName); /** - * Delete the cluster manager. - * * Delete the provided cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -227,15 +184,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String clusterManagerName, String ifMatch, String ifNoneMatch, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterManagerName, String ifMatch, + String ifNoneMatch, Context context); /** - * Delete the cluster manager. - * * Delete the provided cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -243,14 +198,11 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 delete(String resourceGroupName, String clusterManagerName); + void delete(String resourceGroupName, String clusterManagerName); /** - * Delete the cluster manager. - * * Delete the provided cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -263,50 +215,134 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 delete(String resourceGroupName, String clusterManagerName, String ifMatch, - String ifNoneMatch, Context context); + void delete(String resourceGroupName, String clusterManagerName, String ifMatch, String ifNoneMatch, + Context context); /** - * Patch the cluster manager. + * Get a list of cluster managers in the provided resource group. * - * Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties - * and tag updates can be done independently. + * @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 a list of cluster managers in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of cluster managers in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 cluster managers in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); + + /** + * Get a list of cluster managers in the provided subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of cluster managers in the provided subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of cluster managers in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 cluster managers in the provided subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Integer top, String skipToken, Context context); + + /** + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param clusterManagerUpdateParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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, OperationStatusResult> + beginUpdateRelayPrivateEndpointConnection(String resourceGroupName, String clusterManagerName); + + /** + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. + * @param clusterManagerUpdateRelayPrivateEndpointConnectionParameters The request body. * @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 clusterManager represents a control-plane to manage one or more on-premises clusters along with - * {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String clusterManagerName, - String ifMatch, String ifNoneMatch, ClusterManagerPatchParameters clusterManagerUpdateParameters, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResult> beginUpdateRelayPrivateEndpointConnection( + String resourceGroupName, String clusterManagerName, + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters, Context context); /** - * Patch the cluster manager. + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. * - * Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties - * and tag updates can be done independently. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResult updateRelayPrivateEndpointConnection(String resourceGroupName, String clusterManagerName); + + /** + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. + * @param clusterManagerUpdateRelayPrivateEndpointConnectionParameters The request body. + * @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 clusterManager represents a control-plane to manage one or more on-premises clusters. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterManagerInner update(String resourceGroupName, String clusterManagerName); + OperationStatusResult updateRelayPrivateEndpointConnection(String resourceGroupName, String clusterManagerName, + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters, + Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/ClustersClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/ClustersClient.java index b9a61f1f99d5..25c59f38e1f1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/ClustersClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/ClustersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -12,82 +12,20 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.models.ClusterInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.ClusterContinueUpdateVersionParameters; import com.azure.resourcemanager.networkcloud.models.ClusterDeployParameters; +import com.azure.resourcemanager.networkcloud.models.ClusterInspectParameters; import com.azure.resourcemanager.networkcloud.models.ClusterPatchParameters; +import com.azure.resourcemanager.networkcloud.models.ClusterRotateCredentialParameters; import com.azure.resourcemanager.networkcloud.models.ClusterScanRuntimeParameters; import com.azure.resourcemanager.networkcloud.models.ClusterUpdateVersionParameters; +import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; /** * An instance of this class provides access to all the operations defined in ClustersClient. */ public interface ClustersClient { /** - * List clusters in the subscription. - * - * Get a list of clusters in the provided subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of clusters in the provided subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List clusters in the subscription. - * - * Get a list of clusters in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 clusters in the provided subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Integer top, String skipToken, Context context); - - /** - * List clusters in the resource group. - * - * Get a list of clusters in the provided resource group. - * - * @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 a list of clusters in the provided resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List clusters in the resource group. - * - * Get a list of clusters in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 clusters in the provided resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context); - - /** - * Retrieve the cluster. - * * Get properties of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -103,8 +41,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, Context context); /** - * Retrieve the cluster. - * * Get properties of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -118,8 +54,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, ClusterInner getByResourceGroup(String resourceGroupName, String clusterName); /** - * Create or update the cluster. - * * Create a new cluster or update the properties of the cluster if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -135,8 +69,6 @@ SyncPoller, ClusterInner> beginCreateOrUpdate(String re ClusterInner clusterParameters); /** - * Create or update the cluster. - * * Create a new cluster or update the properties of the cluster if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -157,8 +89,6 @@ SyncPoller, ClusterInner> beginCreateOrUpdate(String re ClusterInner clusterParameters, String ifMatch, String ifNoneMatch, Context context); /** - * Create or update the cluster. - * * Create a new cluster or update the properties of the cluster if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -173,8 +103,6 @@ SyncPoller, ClusterInner> beginCreateOrUpdate(String re ClusterInner createOrUpdate(String resourceGroupName, String clusterName, ClusterInner clusterParameters); /** - * Create or update the cluster. - * * Create a new cluster or update the properties of the cluster if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -195,25 +123,22 @@ ClusterInner createOrUpdate(String resourceGroupName, String clusterName, Cluste String ifMatch, String ifNoneMatch, Context context); /** - * Delete the cluster. - * - * Delete the provided cluster. + * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag + * updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of cluster represents the on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String clusterName); + SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterName); /** - * Delete the cluster. - * - * Delete the provided cluster. + * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag + * updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -221,35 +146,34 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param clusterUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of cluster represents the on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String clusterName, String ifMatch, String ifNoneMatch, Context context); + SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterName, + String ifMatch, String ifNoneMatch, ClusterPatchParameters clusterUpdateParameters, Context context); /** - * Delete the cluster. - * - * Delete the provided cluster. + * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag + * updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return cluster represents the on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String clusterName); + ClusterInner update(String resourceGroupName, String clusterName); /** - * Delete the cluster. - * - * Delete the provided cluster. + * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag + * updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -257,37 +181,32 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param clusterUpdateParameters The request body. * @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. + * @return cluster represents the on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String clusterName, String ifMatch, String ifNoneMatch, - Context context); + ClusterInner update(String resourceGroupName, String clusterName, String ifMatch, String ifNoneMatch, + ClusterPatchParameters clusterUpdateParameters, Context context); /** - * Patch the cluster. - * - * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag - * updates can be done independently. + * Delete the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 cluster represents the on-premises Network Cloud cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterName); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName); /** - * Patch the cluster. - * - * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag - * updates can be done independently. + * Delete the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -295,38 +214,30 @@ OperationStatusResultInner delete(String resourceGroupName, String clusterName, * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param clusterUpdateParameters The request body. * @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 cluster represents the on-premises Network Cloud cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterName, - String ifMatch, String ifNoneMatch, ClusterPatchParameters clusterUpdateParameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String ifMatch, + String ifNoneMatch, Context context); /** - * Patch the cluster. - * - * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag - * updates can be done independently. + * Delete the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster represents the on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner update(String resourceGroupName, String clusterName); + void delete(String resourceGroupName, String clusterName); /** - * Patch the cluster. - * - * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag - * updates can be done independently. + * Delete the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -334,20 +245,69 @@ SyncPoller, ClusterInner> beginUpdate(String resourceGr * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param clusterUpdateParameters The request body. * @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 cluster represents the on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner update(String resourceGroupName, String clusterName, String ifMatch, String ifNoneMatch, - ClusterPatchParameters clusterUpdateParameters, Context context); + void delete(String resourceGroupName, String clusterName, String ifMatch, String ifNoneMatch, Context context); + + /** + * Get a list of clusters in the provided resource group. + * + * @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 a list of clusters in the provided resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of clusters in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 clusters in the provided resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); /** - * Continue a paused update to the cluster version. + * Get a list of clusters in the provided subscription. * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of clusters in the provided subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of clusters in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 clusters in the provided subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Integer top, String skipToken, Context context); + + /** * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after * completing a segment of the update. * @@ -357,16 +317,14 @@ ClusterInner update(String resourceGroupName, String clusterName, String ifMatch * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginContinueUpdateVersion( + SyncPoller, OperationStatusResult> beginContinueUpdateVersion( String resourceGroupName, String clusterName, ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters); /** - * Continue a paused update to the cluster version. - * * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after * completing a segment of the update. * @@ -377,16 +335,14 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginContinueUpdateVersion( + SyncPoller, OperationStatusResult> beginContinueUpdateVersion( String resourceGroupName, String clusterName, ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters, Context context); /** - * Continue a paused update to the cluster version. - * * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after * completing a segment of the update. * @@ -396,15 +352,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner continueUpdateVersion(String resourceGroupName, String clusterName, + OperationStatusResult continueUpdateVersion(String resourceGroupName, String clusterName, ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters); /** - * Continue a paused update to the cluster version. - * * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after * completing a segment of the update. * @@ -415,15 +369,13 @@ OperationStatusResultInner continueUpdateVersion(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner continueUpdateVersion(String resourceGroupName, String clusterName, + OperationStatusResult continueUpdateVersion(String resourceGroupName, String clusterName, ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters, Context context); /** - * Deploy the cluster. - * * Deploy the cluster using the rack configuration provided during creation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -431,15 +383,13 @@ OperationStatusResultInner continueUpdateVersion(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDeploy(String resourceGroupName, + SyncPoller, OperationStatusResult> beginDeploy(String resourceGroupName, String clusterName); /** - * Deploy the cluster. - * * Deploy the cluster using the rack configuration provided during creation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -449,15 +399,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDeploy(String resourceGroupName, + SyncPoller, OperationStatusResult> beginDeploy(String resourceGroupName, String clusterName, ClusterDeployParameters clusterDeployParameters, Context context); /** - * Deploy the cluster. - * * Deploy the cluster using the rack configuration provided during creation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -465,14 +413,12 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner deploy(String resourceGroupName, String clusterName); + OperationStatusResult deploy(String resourceGroupName, String clusterName); /** - * Deploy the cluster. - * * Deploy the cluster using the rack configuration provided during creation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -482,15 +428,138 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner deploy(String resourceGroupName, String clusterName, + OperationStatusResult deploy(String resourceGroupName, String clusterName, ClusterDeployParameters clusterDeployParameters, Context context); /** - * Execute a runtime protection scan on the cluster. + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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, OperationStatusResult> beginInspect(String resourceGroupName, + String clusterName); + + /** + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param clusterInspectParameters The request body. + * @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, OperationStatusResult> beginInspect(String resourceGroupName, + String clusterName, ClusterInspectParameters clusterInspectParameters, Context context); + + /** + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResult inspect(String resourceGroupName, String clusterName); + + /** + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param clusterInspectParameters The request body. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResult inspect(String resourceGroupName, String clusterName, + ClusterInspectParameters clusterInspectParameters, Context context); + + /** + * Rotate the specified cluster credential. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResult> beginRotateCredential(String resourceGroupName, + String clusterName, ClusterRotateCredentialParameters body); + + /** + * Rotate the specified cluster credential. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResult> beginRotateCredential(String resourceGroupName, + String clusterName, ClusterRotateCredentialParameters body, Context context); + + /** + * Rotate the specified cluster credential. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResult rotateCredential(String resourceGroupName, String clusterName, + ClusterRotateCredentialParameters body); + + /** + * Rotate the specified cluster credential. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResult rotateCredential(String resourceGroupName, String clusterName, + ClusterRotateCredentialParameters body, Context context); + + /** * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -499,15 +568,13 @@ OperationStatusResultInner deploy(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> - beginScanRuntime(String resourceGroupName, String clusterName); + SyncPoller, OperationStatusResult> beginScanRuntime(String resourceGroupName, + String clusterName); /** - * Execute a runtime protection scan on the cluster. - * * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -518,16 +585,13 @@ OperationStatusResultInner deploy(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginScanRuntime( - String resourceGroupName, String clusterName, ClusterScanRuntimeParameters clusterScanRuntimeParameters, - Context context); + SyncPoller, OperationStatusResult> beginScanRuntime(String resourceGroupName, + String clusterName, ClusterScanRuntimeParameters clusterScanRuntimeParameters, Context context); /** - * Execute a runtime protection scan on the cluster. - * * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -536,14 +600,12 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner scanRuntime(String resourceGroupName, String clusterName); + OperationStatusResult scanRuntime(String resourceGroupName, String clusterName); /** - * Execute a runtime protection scan on the cluster. - * * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -554,15 +616,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner scanRuntime(String resourceGroupName, String clusterName, + OperationStatusResult scanRuntime(String resourceGroupName, String clusterName, ClusterScanRuntimeParameters clusterScanRuntimeParameters, Context context); /** - * Update the cluster version. - * * Update the version of the provided cluster to one of the available supported versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -571,15 +631,13 @@ OperationStatusResultInner scanRuntime(String resourceGroupName, String clusterN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginUpdateVersion( - String resourceGroupName, String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters); + SyncPoller, OperationStatusResult> beginUpdateVersion(String resourceGroupName, + String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters); /** - * Update the cluster version. - * * Update the version of the provided cluster to one of the available supported versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -589,16 +647,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginUpdateVersion( - String resourceGroupName, String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters, - Context context); + SyncPoller, OperationStatusResult> beginUpdateVersion(String resourceGroupName, + String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters, Context context); /** - * Update the cluster version. - * * Update the version of the provided cluster to one of the available supported versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -607,15 +662,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner updateVersion(String resourceGroupName, String clusterName, + OperationStatusResult updateVersion(String resourceGroupName, String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters); /** - * Update the cluster version. - * * Update the version of the provided cluster to one of the available supported versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -625,9 +678,9 @@ OperationStatusResultInner updateVersion(String resourceGroupName, String cluste * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner updateVersion(String resourceGroupName, String clusterName, + OperationStatusResult updateVersion(String resourceGroupName, String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters, Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/ConsolesClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/ConsolesClient.java index b489349015ce..ca59a504eca6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/ConsolesClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/ConsolesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.models.ConsoleInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.ConsolePatchParameters; /** @@ -20,43 +19,6 @@ */ public interface ConsolesClient { /** - * List consoles of the virtual machine. - * - * Get a list of consoles for the provided virtual machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 consoles for the provided virtual machine as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByVirtualMachine(String resourceGroupName, String virtualMachineName); - - /** - * List consoles of the virtual machine. - * - * Get a list of consoles for the provided virtual machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 consoles for the provided virtual machine as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByVirtualMachine(String resourceGroupName, String virtualMachineName, Integer top, - String skipToken, Context context); - - /** - * Retrieve the virtual machine console. - * * Get properties of the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -73,8 +35,6 @@ Response getWithResponse(String resourceGroupName, String virtualM Context context); /** - * Retrieve the virtual machine console. - * * Get properties of the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -89,8 +49,6 @@ Response getWithResponse(String resourceGroupName, String virtualM ConsoleInner get(String resourceGroupName, String virtualMachineName, String consoleName); /** - * Create or update the virtual machine console. - * * Create a new virtual machine console or update the properties of the existing virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -108,8 +66,6 @@ SyncPoller, ConsoleInner> beginCreateOrUpdate(String re String virtualMachineName, String consoleName, ConsoleInner consoleParameters); /** - * Create or update the virtual machine console. - * * Create a new virtual machine console or update the properties of the existing virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -133,8 +89,6 @@ SyncPoller, ConsoleInner> beginCreateOrUpdate(String re String ifNoneMatch, Context context); /** - * Create or update the virtual machine console. - * * Create a new virtual machine console or update the properties of the existing virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -151,8 +105,6 @@ ConsoleInner createOrUpdate(String resourceGroupName, String virtualMachineName, ConsoleInner consoleParameters); /** - * Create or update the virtual machine console. - * * Create a new virtual machine console or update the properties of the existing virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -174,9 +126,8 @@ ConsoleInner createOrUpdate(String resourceGroupName, String virtualMachineName, ConsoleInner consoleParameters, String ifMatch, String ifNoneMatch, Context context); /** - * Delete the virtual machine console. - * - * Delete the provided virtual machine console. + * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual + * machine console. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -184,16 +135,16 @@ ConsoleInner createOrUpdate(String resourceGroupName, String virtualMachineName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of console represents the console of an on-premises Network Cloud + * virtual machine. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String virtualMachineName, String consoleName); + SyncPoller, ConsoleInner> beginUpdate(String resourceGroupName, String virtualMachineName, + String consoleName); /** - * Delete the virtual machine console. - * - * Delete the provided virtual machine console. + * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual + * machine console. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -202,20 +153,22 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param consoleUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of console represents the console of an on-premises Network Cloud + * virtual machine. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String virtualMachineName, String consoleName, String ifMatch, String ifNoneMatch, Context context); + SyncPoller, ConsoleInner> beginUpdate(String resourceGroupName, String virtualMachineName, + String consoleName, String ifMatch, String ifNoneMatch, ConsolePatchParameters consoleUpdateParameters, + Context context); /** - * Delete the virtual machine console. - * - * Delete the provided virtual machine console. + * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual + * machine console. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -223,15 +176,14 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return console represents the console of an on-premises Network Cloud virtual machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String virtualMachineName, String consoleName); + ConsoleInner update(String resourceGroupName, String virtualMachineName, String consoleName); /** - * Delete the virtual machine console. - * - * Delete the provided virtual machine console. + * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual + * machine console. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -240,21 +192,19 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param consoleUpdateParameters The request body. * @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. + * @return console represents the console of an on-premises Network Cloud virtual machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String virtualMachineName, String consoleName, - String ifMatch, String ifNoneMatch, Context context); + ConsoleInner update(String resourceGroupName, String virtualMachineName, String consoleName, String ifMatch, + String ifNoneMatch, ConsolePatchParameters consoleUpdateParameters, Context context); /** - * Patch the virtual machine console. - * - * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual - * machine console. Properties and tag updates can be done independently. + * Delete the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -262,18 +212,14 @@ OperationStatusResultInner delete(String resourceGroupName, String virtualMachin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 console represents the console of an on-premises Network Cloud - * virtual machine. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConsoleInner> beginUpdate(String resourceGroupName, String virtualMachineName, + SyncPoller, Void> beginDelete(String resourceGroupName, String virtualMachineName, String consoleName); /** - * Patch the virtual machine console. - * - * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual - * machine console. Properties and tag updates can be done independently. + * Delete the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -282,24 +228,18 @@ SyncPoller, ConsoleInner> beginUpdate(String resourceGr * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param consoleUpdateParameters The request body. * @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 console represents the console of an on-premises Network Cloud - * virtual machine. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConsoleInner> beginUpdate(String resourceGroupName, String virtualMachineName, - String consoleName, String ifMatch, String ifNoneMatch, ConsolePatchParameters consoleUpdateParameters, - Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String virtualMachineName, + String consoleName, String ifMatch, String ifNoneMatch, Context context); /** - * Patch the virtual machine console. - * - * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual - * machine console. Properties and tag updates can be done independently. + * Delete the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -307,16 +247,12 @@ SyncPoller, ConsoleInner> beginUpdate(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return console represents the console of an on-premises Network Cloud virtual machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConsoleInner update(String resourceGroupName, String virtualMachineName, String consoleName); + void delete(String resourceGroupName, String virtualMachineName, String consoleName); /** - * Patch the virtual machine console. - * - * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual - * machine console. Properties and tag updates can be done independently. + * Delete the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -325,14 +261,43 @@ SyncPoller, ConsoleInner> beginUpdate(String resourceGr * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param consoleUpdateParameters The request body. * @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 console represents the console of an on-premises Network Cloud virtual machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConsoleInner update(String resourceGroupName, String virtualMachineName, String consoleName, String ifMatch, - String ifNoneMatch, ConsolePatchParameters consoleUpdateParameters, Context context); + void delete(String resourceGroupName, String virtualMachineName, String consoleName, String ifMatch, + String ifNoneMatch, Context context); + + /** + * Get a list of consoles for the provided virtual machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 consoles for the provided virtual machine as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVirtualMachine(String resourceGroupName, String virtualMachineName); + + /** + * Get a list of consoles for the provided virtual machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 consoles for the provided virtual machine as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVirtualMachine(String resourceGroupName, String virtualMachineName, Integer top, + String skipToken, Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/KubernetesClusterFeaturesClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/KubernetesClusterFeaturesClient.java index 5ff7a205575e..4b4b92cb0090 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/KubernetesClusterFeaturesClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/KubernetesClusterFeaturesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.models.KubernetesClusterFeatureInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.KubernetesClusterFeaturePatchParameters; /** @@ -20,44 +19,6 @@ */ public interface KubernetesClusterFeaturesClient { /** - * List features for the Kubernetes cluster. - * - * Get a list of features for the provided Kubernetes cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 features for the provided Kubernetes cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByKubernetesCluster(String resourceGroupName, - String kubernetesClusterName); - - /** - * List features for the Kubernetes cluster. - * - * Get a list of features for the provided Kubernetes cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 features for the provided Kubernetes cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByKubernetesCluster(String resourceGroupName, - String kubernetesClusterName, Integer top, String skipToken, Context context); - - /** - * Retrieve the Kubernetes cluster feature. - * * Get properties of the provided the Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -74,8 +35,6 @@ Response getWithResponse(String resourceGroupName String featureName, Context context); /** - * Retrieve the Kubernetes cluster feature. - * * Get properties of the provided the Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -90,8 +49,6 @@ Response getWithResponse(String resourceGroupName KubernetesClusterFeatureInner get(String resourceGroupName, String kubernetesClusterName, String featureName); /** - * Create or update the Kubernetes cluster feature. - * * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -110,8 +67,6 @@ SyncPoller, KubernetesClusterFeatureIn KubernetesClusterFeatureInner kubernetesClusterFeatureParameters); /** - * Create or update the Kubernetes cluster feature. - * * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -136,8 +91,6 @@ SyncPoller, KubernetesClusterFeatureIn Context context); /** - * Create or update the Kubernetes cluster feature. - * * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -154,8 +107,6 @@ KubernetesClusterFeatureInner createOrUpdate(String resourceGroupName, String ku String featureName, KubernetesClusterFeatureInner kubernetesClusterFeatureParameters); /** - * Create or update the Kubernetes cluster feature. - * * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -178,9 +129,7 @@ KubernetesClusterFeatureInner createOrUpdate(String resourceGroupName, String ku String ifNoneMatch, Context context); /** - * Delete the Kubernetes cluster feature. - * - * Delete the provided Kubernetes cluster feature. + * Patch properties of the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -188,16 +137,15 @@ KubernetesClusterFeatureInner createOrUpdate(String resourceGroupName, String ku * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of kubernetesClusterFeature represents the feature of a Kubernetes + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String kubernetesClusterName, String featureName); + SyncPoller, KubernetesClusterFeatureInner> + beginUpdate(String resourceGroupName, String kubernetesClusterName, String featureName); /** - * Delete the Kubernetes cluster feature. - * - * Delete the provided Kubernetes cluster feature. + * Patch properties of the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -206,20 +154,21 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterFeatureUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of kubernetesClusterFeature represents the feature of a Kubernetes + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String kubernetesClusterName, String featureName, String ifMatch, String ifNoneMatch, Context context); + SyncPoller, KubernetesClusterFeatureInner> beginUpdate( + String resourceGroupName, String kubernetesClusterName, String featureName, String ifMatch, String ifNoneMatch, + KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters, Context context); /** - * Delete the Kubernetes cluster feature. - * - * Delete the provided Kubernetes cluster feature. + * Patch properties of the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -227,15 +176,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return kubernetesClusterFeature represents the feature of a Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String kubernetesClusterName, String featureName); + KubernetesClusterFeatureInner update(String resourceGroupName, String kubernetesClusterName, String featureName); /** - * Delete the Kubernetes cluster feature. - * - * Delete the provided Kubernetes cluster feature. + * Patch properties of the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -244,20 +191,20 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterFeatureUpdateParameters The request body. * @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. + * @return kubernetesClusterFeature represents the feature of a Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String kubernetesClusterName, String featureName, - String ifMatch, String ifNoneMatch, Context context); + KubernetesClusterFeatureInner update(String resourceGroupName, String kubernetesClusterName, String featureName, + String ifMatch, String ifNoneMatch, + KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters, Context context); /** - * Patch the Kubernetes cluster feature. - * - * Patch properties of the provided Kubernetes cluster feature. + * Delete the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -265,17 +212,14 @@ OperationStatusResultInner delete(String resourceGroupName, String kubernetesClu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 kubernetesClusterFeature represents the feature of a Kubernetes - * cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, KubernetesClusterFeatureInner> - beginUpdate(String resourceGroupName, String kubernetesClusterName, String featureName); + SyncPoller, Void> beginDelete(String resourceGroupName, String kubernetesClusterName, + String featureName); /** - * Patch the Kubernetes cluster feature. - * - * Patch properties of the provided Kubernetes cluster feature. + * Delete the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -284,23 +228,18 @@ OperationStatusResultInner delete(String resourceGroupName, String kubernetesClu * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterFeatureUpdateParameters The request body. * @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 kubernetesClusterFeature represents the feature of a Kubernetes - * cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, KubernetesClusterFeatureInner> beginUpdate( - String resourceGroupName, String kubernetesClusterName, String featureName, String ifMatch, String ifNoneMatch, - KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String kubernetesClusterName, + String featureName, String ifMatch, String ifNoneMatch, Context context); /** - * Patch the Kubernetes cluster feature. - * - * Patch properties of the provided Kubernetes cluster feature. + * Delete the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -308,15 +247,12 @@ SyncPoller, KubernetesClusterFeatureIn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return kubernetesClusterFeature represents the feature of a Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - KubernetesClusterFeatureInner update(String resourceGroupName, String kubernetesClusterName, String featureName); + void delete(String resourceGroupName, String kubernetesClusterName, String featureName); /** - * Patch the Kubernetes cluster feature. - * - * Patch properties of the provided Kubernetes cluster feature. + * Delete the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -325,15 +261,44 @@ SyncPoller, KubernetesClusterFeatureIn * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterFeatureUpdateParameters The request body. * @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 kubernetesClusterFeature represents the feature of a Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - KubernetesClusterFeatureInner update(String resourceGroupName, String kubernetesClusterName, String featureName, - String ifMatch, String ifNoneMatch, - KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters, Context context); + void delete(String resourceGroupName, String kubernetesClusterName, String featureName, String ifMatch, + String ifNoneMatch, Context context); + + /** + * Get a list of features for the provided Kubernetes cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 features for the provided Kubernetes cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByKubernetesCluster(String resourceGroupName, + String kubernetesClusterName); + + /** + * Get a list of features for the provided Kubernetes cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 features for the provided Kubernetes cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByKubernetesCluster(String resourceGroupName, + String kubernetesClusterName, Integer top, String skipToken, Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/KubernetesClustersClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/KubernetesClustersClient.java index dd3531526d1c..6dd1dcc3eb52 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/KubernetesClustersClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/KubernetesClustersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -12,83 +12,15 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.models.KubernetesClusterInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.KubernetesClusterPatchParameters; import com.azure.resourcemanager.networkcloud.models.KubernetesClusterRestartNodeParameters; +import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; /** * An instance of this class provides access to all the operations defined in KubernetesClustersClient. */ public interface KubernetesClustersClient { /** - * List Kubernetes clusters in the subscription. - * - * Get a list of Kubernetes clusters in the provided subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Kubernetes clusters in the provided subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List Kubernetes clusters in the subscription. - * - * Get a list of Kubernetes clusters in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 Kubernetes clusters in the provided subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Integer top, String skipToken, Context context); - - /** - * List Kubernetes clusters in the resource group. - * - * Get a list of Kubernetes clusters in the provided resource group. - * - * @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 a list of Kubernetes clusters in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List Kubernetes clusters in the resource group. - * - * Get a list of Kubernetes clusters in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 Kubernetes clusters in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context); - - /** - * Retrieve the Kubernetes cluster. - * * Get properties of the provided the Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -104,8 +36,6 @@ Response getByResourceGroupWithResponse(String resourceG String kubernetesClusterName, Context context); /** - * Retrieve the Kubernetes cluster. - * * Get properties of the provided the Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -119,8 +49,6 @@ Response getByResourceGroupWithResponse(String resourceG KubernetesClusterInner getByResourceGroup(String resourceGroupName, String kubernetesClusterName); /** - * Create or update the Kubernetes cluster. - * * Create a new Kubernetes cluster or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -137,8 +65,6 @@ SyncPoller, KubernetesClusterInner> beginCrea String kubernetesClusterName, KubernetesClusterInner kubernetesClusterParameters); /** - * Create or update the Kubernetes cluster. - * * Create a new Kubernetes cluster or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -161,8 +87,6 @@ SyncPoller, KubernetesClusterInner> beginCrea String ifNoneMatch, Context context); /** - * Create or update the Kubernetes cluster. - * * Create a new Kubernetes cluster or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -178,8 +102,6 @@ KubernetesClusterInner createOrUpdate(String resourceGroupName, String kubernete KubernetesClusterInner kubernetesClusterParameters); /** - * Create or update the Kubernetes cluster. - * * Create a new Kubernetes cluster or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -200,25 +122,24 @@ KubernetesClusterInner createOrUpdate(String resourceGroupName, String kubernete KubernetesClusterInner kubernetesClusterParameters, String ifMatch, String ifNoneMatch, Context context); /** - * Delete the Kubernetes cluster. - * - * Delete the provided Kubernetes cluster. + * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes + * cluster. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of kubernetesCluster represents the Kubernetes cluster hosted on + * Network Cloud. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, + SyncPoller, KubernetesClusterInner> beginUpdate(String resourceGroupName, String kubernetesClusterName); /** - * Delete the Kubernetes cluster. - * - * Delete the provided Kubernetes cluster. + * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes + * cluster. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -226,35 +147,36 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of kubernetesCluster represents the Kubernetes cluster hosted on + * Network Cloud. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String kubernetesClusterName, String ifMatch, String ifNoneMatch, Context context); + SyncPoller, KubernetesClusterInner> beginUpdate(String resourceGroupName, + String kubernetesClusterName, String ifMatch, String ifNoneMatch, + KubernetesClusterPatchParameters kubernetesClusterUpdateParameters, Context context); /** - * Delete the Kubernetes cluster. - * - * Delete the provided Kubernetes cluster. + * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes + * cluster. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String kubernetesClusterName); + KubernetesClusterInner update(String resourceGroupName, String kubernetesClusterName); /** - * Delete the Kubernetes cluster. - * - * Delete the provided Kubernetes cluster. + * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes + * cluster. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -262,39 +184,32 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterUpdateParameters The request body. * @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. + * @return kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String kubernetesClusterName, String ifMatch, - String ifNoneMatch, Context context); + KubernetesClusterInner update(String resourceGroupName, String kubernetesClusterName, String ifMatch, + String ifNoneMatch, KubernetesClusterPatchParameters kubernetesClusterUpdateParameters, Context context); /** - * Patch the Kubernetes cluster. - * - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes - * cluster. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 kubernetesCluster represents the Kubernetes cluster hosted on - * Network Cloud. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, KubernetesClusterInner> beginUpdate(String resourceGroupName, - String kubernetesClusterName); + SyncPoller, Void> beginDelete(String resourceGroupName, String kubernetesClusterName); /** - * Patch the Kubernetes cluster. - * - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes - * cluster. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -302,40 +217,30 @@ SyncPoller, KubernetesClusterInner> beginUpda * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterUpdateParameters The request body. * @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 kubernetesCluster represents the Kubernetes cluster hosted on - * Network Cloud. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, KubernetesClusterInner> beginUpdate(String resourceGroupName, - String kubernetesClusterName, String ifMatch, String ifNoneMatch, - KubernetesClusterPatchParameters kubernetesClusterUpdateParameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String kubernetesClusterName, + String ifMatch, String ifNoneMatch, Context context); /** - * Patch the Kubernetes cluster. - * - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes - * cluster. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud. */ @ServiceMethod(returns = ReturnType.SINGLE) - KubernetesClusterInner update(String resourceGroupName, String kubernetesClusterName); + void delete(String resourceGroupName, String kubernetesClusterName); /** - * Patch the Kubernetes cluster. - * - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes - * cluster. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -343,20 +248,74 @@ SyncPoller, KubernetesClusterInner> beginUpda * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterUpdateParameters The request body. * @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 kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud. */ @ServiceMethod(returns = ReturnType.SINGLE) - KubernetesClusterInner update(String resourceGroupName, String kubernetesClusterName, String ifMatch, - String ifNoneMatch, KubernetesClusterPatchParameters kubernetesClusterUpdateParameters, Context context); + void delete(String resourceGroupName, String kubernetesClusterName, String ifMatch, String ifNoneMatch, + Context context); + + /** + * Get a list of Kubernetes clusters in the provided resource group. + * + * @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 a list of Kubernetes clusters in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of Kubernetes clusters in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 Kubernetes clusters in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); /** - * Restart a targeted node. + * Get a list of Kubernetes clusters in the provided subscription. * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Kubernetes clusters in the provided subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of Kubernetes clusters in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 Kubernetes clusters in the provided subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Integer top, String skipToken, Context context); + + /** * Restart a targeted node of a Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -365,16 +324,13 @@ KubernetesClusterInner update(String resourceGroupName, String kubernetesCluster * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginRestartNode( - String resourceGroupName, String kubernetesClusterName, - KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters); + SyncPoller, OperationStatusResult> beginRestartNode(String resourceGroupName, + String kubernetesClusterName, KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters); /** - * Restart a targeted node. - * * Restart a targeted node of a Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -384,16 +340,14 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginRestartNode( - String resourceGroupName, String kubernetesClusterName, - KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters, Context context); + SyncPoller, OperationStatusResult> beginRestartNode(String resourceGroupName, + String kubernetesClusterName, KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters, + Context context); /** - * Restart a targeted node. - * * Restart a targeted node of a Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -402,15 +356,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner restartNode(String resourceGroupName, String kubernetesClusterName, + OperationStatusResult restartNode(String resourceGroupName, String kubernetesClusterName, KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters); /** - * Restart a targeted node. - * * Restart a targeted node of a Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -420,9 +372,9 @@ OperationStatusResultInner restartNode(String resourceGroupName, String kubernet * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner restartNode(String resourceGroupName, String kubernetesClusterName, + OperationStatusResult restartNode(String resourceGroupName, String kubernetesClusterName, KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters, Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/KubernetesVersionsClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/KubernetesVersionsClient.java new file mode 100644 index 000000000000..59d64608c670 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/KubernetesVersionsClient.java @@ -0,0 +1,315 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.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.networkcloud.fluent.models.KubernetesVersionInner; +import com.azure.resourcemanager.networkcloud.models.KubernetesVersionPatchParameters; + +/** + * An instance of this class provides access to all the operations defined in KubernetesVersionsClient. + */ +public interface KubernetesVersionsClient { + /** + * Retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @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 kubernetesVersion represents the available Kubernetes versions for a cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String kubernetesVersionName, Context context); + + /** + * Retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return kubernetesVersion represents the available Kubernetes versions for a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KubernetesVersionInner getByResourceGroup(String resourceGroupName, String kubernetesVersionName); + + /** + * Create the Kubernetes version resource or update its tags. This resource is system managed and should only be + * created with the name "default". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param kubernetesVersionParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 kubernetesVersion represents the available Kubernetes versions for + * a cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, KubernetesVersionInner> beginCreateOrUpdate(String resourceGroupName, + String kubernetesVersionName, KubernetesVersionInner kubernetesVersionParameters); + + /** + * Create the Kubernetes version resource or update its tags. This resource is system managed and should only be + * created with the name "default". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param kubernetesVersionParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 kubernetesVersion represents the available Kubernetes versions for + * a cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, KubernetesVersionInner> beginCreateOrUpdate(String resourceGroupName, + String kubernetesVersionName, KubernetesVersionInner kubernetesVersionParameters, String ifMatch, + String ifNoneMatch, Context context); + + /** + * Create the Kubernetes version resource or update its tags. This resource is system managed and should only be + * created with the name "default". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param kubernetesVersionParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return kubernetesVersion represents the available Kubernetes versions for a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KubernetesVersionInner createOrUpdate(String resourceGroupName, String kubernetesVersionName, + KubernetesVersionInner kubernetesVersionParameters); + + /** + * Create the Kubernetes version resource or update its tags. This resource is system managed and should only be + * created with the name "default". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param kubernetesVersionParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 kubernetesVersion represents the available Kubernetes versions for a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KubernetesVersionInner createOrUpdate(String resourceGroupName, String kubernetesVersionName, + KubernetesVersionInner kubernetesVersionParameters, String ifMatch, String ifNoneMatch, Context context); + + /** + * Update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 kubernetesVersion represents the available Kubernetes versions for + * a cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, KubernetesVersionInner> beginUpdate(String resourceGroupName, + String kubernetesVersionName); + + /** + * Update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param kubernetesVersionPatchParameters The request body. + * @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 kubernetesVersion represents the available Kubernetes versions for + * a cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, KubernetesVersionInner> beginUpdate(String resourceGroupName, + String kubernetesVersionName, String ifMatch, String ifNoneMatch, + KubernetesVersionPatchParameters kubernetesVersionPatchParameters, Context context); + + /** + * Update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return kubernetesVersion represents the available Kubernetes versions for a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KubernetesVersionInner update(String resourceGroupName, String kubernetesVersionName); + + /** + * Update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param kubernetesVersionPatchParameters The request body. + * @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 kubernetesVersion represents the available Kubernetes versions for a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KubernetesVersionInner update(String resourceGroupName, String kubernetesVersionName, String ifMatch, + String ifNoneMatch, KubernetesVersionPatchParameters kubernetesVersionPatchParameters, Context context); + + /** + * Delete the specified Kubernetes version resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 kubernetesVersionName); + + /** + * Delete the specified Kubernetes version resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 kubernetesVersionName, + String ifMatch, String ifNoneMatch, Context context); + + /** + * Delete the specified Kubernetes version resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 kubernetesVersionName); + + /** + * Delete the specified Kubernetes version resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 kubernetesVersionName, String ifMatch, String ifNoneMatch, + Context context); + + /** + * Get a list of Kubernetes version resources in the provided resource group. + * + * @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 a list of Kubernetes version resources in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of Kubernetes version resources in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 Kubernetes version resources in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); + + /** + * Get a list of Kubernetes version resources in the provided subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Kubernetes version resources in the provided subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of Kubernetes version resources in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 Kubernetes version resources in the provided subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Integer top, String skipToken, Context context); +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/L2NetworksClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/L2NetworksClient.java index 27ff20022d27..e5c6cd1ba979 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/L2NetworksClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/L2NetworksClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.models.L2NetworkInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.L2NetworkPatchParameters; /** @@ -20,74 +19,6 @@ */ public interface L2NetworksClient { /** - * List layer 2 (L2) networks in the subscription. - * - * Get a list of layer 2 (L2) networks in the provided subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of layer 2 (L2) networks in the provided subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List layer 2 (L2) networks in the subscription. - * - * Get a list of layer 2 (L2) networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 layer 2 (L2) networks in the provided subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Integer top, String skipToken, Context context); - - /** - * List layer 2 (L2) networks in the resource group. - * - * Get a list of layer 2 (L2) networks in the provided resource group. - * - * @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 a list of layer 2 (L2) networks in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List layer 2 (L2) networks in the resource group. - * - * Get a list of layer 2 (L2) networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 layer 2 (L2) networks in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context); - - /** - * Retrieve the layer 2 (L2) network. - * * Get properties of the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -103,8 +34,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName Context context); /** - * Retrieve the layer 2 (L2) network. - * * Get properties of the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -118,8 +47,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName L2NetworkInner getByResourceGroup(String resourceGroupName, String l2NetworkName); /** - * Create or update the layer 2 (L2) network. - * * Create a new layer 2 (L2) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -136,8 +63,6 @@ SyncPoller, L2NetworkInner> beginCreateOrUpdate(Strin String l2NetworkName, L2NetworkInner l2NetworkParameters); /** - * Create or update the layer 2 (L2) network. - * * Create a new layer 2 (L2) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -159,8 +84,6 @@ SyncPoller, L2NetworkInner> beginCreateOrUpdate(Strin String l2NetworkName, L2NetworkInner l2NetworkParameters, String ifMatch, String ifNoneMatch, Context context); /** - * Create or update the layer 2 (L2) network. - * * Create a new layer 2 (L2) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -175,8 +98,6 @@ SyncPoller, L2NetworkInner> beginCreateOrUpdate(Strin L2NetworkInner createOrUpdate(String resourceGroupName, String l2NetworkName, L2NetworkInner l2NetworkParameters); /** - * Create or update the layer 2 (L2) network. - * * Create a new layer 2 (L2) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -197,8 +118,40 @@ L2NetworkInner createOrUpdate(String resourceGroupName, String l2NetworkName, L2 String ifMatch, String ifNoneMatch, Context context); /** - * Delete the layer 2 (L2) network. + * Update tags associated with the provided layer 2 (L2) network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2NetworkName The name of the L2 network. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param l2NetworkUpdateParameters The request body. + * @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 l2Network represents a network that utilizes a single isolation domain set up for layer-2 resources along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String l2NetworkName, String ifMatch, + String ifNoneMatch, L2NetworkPatchParameters l2NetworkUpdateParameters, Context context); + + /** + * Update tags associated with the provided layer 2 (L2) network. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2NetworkName The name of the L2 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 l2Network represents a network that utilizes a single isolation domain set up for layer-2 resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + L2NetworkInner update(String resourceGroupName, String l2NetworkName); + + /** * Delete the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -206,15 +159,12 @@ L2NetworkInner createOrUpdate(String resourceGroupName, String l2NetworkName, L2 * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String l2NetworkName); + SyncPoller, Void> beginDelete(String resourceGroupName, String l2NetworkName); /** - * Delete the layer 2 (L2) network. - * * Delete the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -227,15 +177,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String l2NetworkName, String ifMatch, String ifNoneMatch, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String l2NetworkName, String ifMatch, + String ifNoneMatch, Context context); /** - * Delete the layer 2 (L2) network. - * * Delete the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -243,14 +191,11 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 delete(String resourceGroupName, String l2NetworkName); + void delete(String resourceGroupName, String l2NetworkName); /** - * Delete the layer 2 (L2) network. - * * Delete the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -263,47 +208,65 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 delete(String resourceGroupName, String l2NetworkName, String ifMatch, - String ifNoneMatch, Context context); + void delete(String resourceGroupName, String l2NetworkName, String ifMatch, String ifNoneMatch, Context context); /** - * Patch the layer 2 (L2) network. + * Get a list of layer 2 (L2) networks in the provided resource group. * - * Update tags associated with the provided layer 2 (L2) network. + * @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 a list of layer 2 (L2) networks in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of layer 2 (L2) networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param l2NetworkUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 l2Network represents a network that utilizes a single isolation domain set up for layer-2 resources along - * with {@link Response}. + * @return a list of layer 2 (L2) networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String l2NetworkName, String ifMatch, - String ifNoneMatch, L2NetworkPatchParameters l2NetworkUpdateParameters, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); /** - * Patch the layer 2 (L2) network. + * Get a list of layer 2 (L2) networks in the provided subscription. * - * Update tags associated with the provided layer 2 (L2) network. + * @throws com.azure.core.management.exception.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 layer 2 (L2) networks in the provided subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of layer 2 (L2) networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 l2Network represents a network that utilizes a single isolation domain set up for layer-2 resources. + * @return a list of layer 2 (L2) networks in the provided subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - L2NetworkInner update(String resourceGroupName, String l2NetworkName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Integer top, String skipToken, Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/L3NetworksClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/L3NetworksClient.java index 5955b5f29424..6edb8496e804 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/L3NetworksClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/L3NetworksClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.models.L3NetworkInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.L3NetworkPatchParameters; /** @@ -20,74 +19,6 @@ */ public interface L3NetworksClient { /** - * List layer 3 (L3) networks in the subscription. - * - * Get a list of layer 3 (L3) networks in the provided subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of layer 3 (L3) networks in the provided subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List layer 3 (L3) networks in the subscription. - * - * Get a list of layer 3 (L3) networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 layer 3 (L3) networks in the provided subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Integer top, String skipToken, Context context); - - /** - * List layer 3 (L3) networks in the resource group. - * - * Get a list of layer 3 (L3) networks in the provided resource group. - * - * @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 a list of layer 3 (L3) networks in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List layer 3 (L3) networks in the resource group. - * - * Get a list of layer 3 (L3) networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 layer 3 (L3) networks in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context); - - /** - * Retrieve the layer 3 (L3) network. - * * Get properties of the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -103,8 +34,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName Context context); /** - * Retrieve the layer 3 (L3) network. - * * Get properties of the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -118,8 +47,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName L3NetworkInner getByResourceGroup(String resourceGroupName, String l3NetworkName); /** - * Create or update the layer 3 (L3) network. - * * Create a new layer 3 (L3) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -136,8 +63,6 @@ SyncPoller, L3NetworkInner> beginCreateOrUpdate(Strin String l3NetworkName, L3NetworkInner l3NetworkParameters); /** - * Create or update the layer 3 (L3) network. - * * Create a new layer 3 (L3) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -159,8 +84,6 @@ SyncPoller, L3NetworkInner> beginCreateOrUpdate(Strin String l3NetworkName, L3NetworkInner l3NetworkParameters, String ifMatch, String ifNoneMatch, Context context); /** - * Create or update the layer 3 (L3) network. - * * Create a new layer 3 (L3) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -175,8 +98,6 @@ SyncPoller, L3NetworkInner> beginCreateOrUpdate(Strin L3NetworkInner createOrUpdate(String resourceGroupName, String l3NetworkName, L3NetworkInner l3NetworkParameters); /** - * Create or update the layer 3 (L3) network. - * * Create a new layer 3 (L3) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -197,8 +118,40 @@ L3NetworkInner createOrUpdate(String resourceGroupName, String l3NetworkName, L3 String ifMatch, String ifNoneMatch, Context context); /** - * Delete the layer 3 (L3) network. + * Update tags associated with the provided layer 3 (L3) network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3NetworkName The name of the L3 network. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param l3NetworkUpdateParameters The request body. + * @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 l3Network represents a network that utilizes a single isolation domain set up for layer-3 resources along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String l3NetworkName, String ifMatch, + String ifNoneMatch, L3NetworkPatchParameters l3NetworkUpdateParameters, Context context); + + /** + * Update tags associated with the provided layer 3 (L3) network. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3NetworkName The name of the L3 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 l3Network represents a network that utilizes a single isolation domain set up for layer-3 resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + L3NetworkInner update(String resourceGroupName, String l3NetworkName); + + /** * Delete the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -206,15 +159,12 @@ L3NetworkInner createOrUpdate(String resourceGroupName, String l3NetworkName, L3 * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String l3NetworkName); + SyncPoller, Void> beginDelete(String resourceGroupName, String l3NetworkName); /** - * Delete the layer 3 (L3) network. - * * Delete the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -227,15 +177,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String l3NetworkName, String ifMatch, String ifNoneMatch, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String l3NetworkName, String ifMatch, + String ifNoneMatch, Context context); /** - * Delete the layer 3 (L3) network. - * * Delete the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -243,14 +191,11 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 delete(String resourceGroupName, String l3NetworkName); + void delete(String resourceGroupName, String l3NetworkName); /** - * Delete the layer 3 (L3) network. - * * Delete the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -263,47 +208,65 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 delete(String resourceGroupName, String l3NetworkName, String ifMatch, - String ifNoneMatch, Context context); + void delete(String resourceGroupName, String l3NetworkName, String ifMatch, String ifNoneMatch, Context context); /** - * Patch the layer 3 (L3) network. + * Get a list of layer 3 (L3) networks in the provided resource group. * - * Update tags associated with the provided layer 3 (L3) network. + * @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 a list of layer 3 (L3) networks in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of layer 3 (L3) networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param l3NetworkUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 l3Network represents a network that utilizes a single isolation domain set up for layer-3 resources along - * with {@link Response}. + * @return a list of layer 3 (L3) networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String l3NetworkName, String ifMatch, - String ifNoneMatch, L3NetworkPatchParameters l3NetworkUpdateParameters, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); /** - * Patch the layer 3 (L3) network. + * Get a list of layer 3 (L3) networks in the provided subscription. * - * Update tags associated with the provided layer 3 (L3) network. + * @throws com.azure.core.management.exception.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 layer 3 (L3) networks in the provided subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of layer 3 (L3) networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 l3Network represents a network that utilizes a single isolation domain set up for layer-3 resources. + * @return a list of layer 3 (L3) networks in the provided subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - L3NetworkInner update(String resourceGroupName, String l3NetworkName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Integer top, String skipToken, Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/MetricsConfigurationsClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/MetricsConfigurationsClient.java index c0804c1ef5b6..59f9d35df3ac 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/MetricsConfigurationsClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/MetricsConfigurationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.models.ClusterMetricsConfigurationInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.ClusterMetricsConfigurationPatchParameters; /** @@ -20,45 +19,6 @@ */ public interface MetricsConfigurationsClient { /** - * List metrics configurations of the cluster. - * - * Get a list of metrics configurations for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 metrics configurations for the provided cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCluster(String resourceGroupName, String clusterName); - - /** - * List metrics configurations of the cluster. - * - * Get a list of metrics configurations for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 metrics configurations for the provided cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCluster(String resourceGroupName, String clusterName, - Integer top, String skipToken, Context context); - - /** - * Retrieve the metrics configuration of the cluster. - * * Get metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -75,8 +35,6 @@ Response getWithResponse(String resourceGroupN String metricsConfigurationName, Context context); /** - * Retrieve the metrics configuration of the cluster. - * * Get metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -91,8 +49,6 @@ Response getWithResponse(String resourceGroupN ClusterMetricsConfigurationInner get(String resourceGroupName, String clusterName, String metricsConfigurationName); /** - * Create or update metrics configuration of the cluster. - * * Create new or update the existing metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -111,8 +67,6 @@ SyncPoller, ClusterMetricsConfigura ClusterMetricsConfigurationInner metricsConfigurationParameters); /** - * Create or update metrics configuration of the cluster. - * * Create new or update the existing metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -137,8 +91,6 @@ SyncPoller, ClusterMetricsConfigura Context context); /** - * Create or update metrics configuration of the cluster. - * * Create new or update the existing metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -155,8 +107,6 @@ ClusterMetricsConfigurationInner createOrUpdate(String resourceGroupName, String String metricsConfigurationName, ClusterMetricsConfigurationInner metricsConfigurationParameters); /** - * Create or update metrics configuration of the cluster. - * * Create new or update the existing metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -179,9 +129,8 @@ ClusterMetricsConfigurationInner createOrUpdate(String resourceGroupName, String String ifMatch, String ifNoneMatch, Context context); /** - * Delete the metrics configuration of the cluster. - * - * Delete the metrics configuration of the provided cluster. + * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -189,16 +138,16 @@ ClusterMetricsConfigurationInner createOrUpdate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of clusterMetricsConfiguration represents the metrics configuration of + * an on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String clusterName, String metricsConfigurationName); + SyncPoller, ClusterMetricsConfigurationInner> + beginUpdate(String resourceGroupName, String clusterName, String metricsConfigurationName); /** - * Delete the metrics configuration of the cluster. - * - * Delete the metrics configuration of the provided cluster. + * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -207,20 +156,23 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param metricsConfigurationUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of clusterMetricsConfiguration represents the metrics configuration of + * an on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String clusterName, String metricsConfigurationName, String ifMatch, String ifNoneMatch, Context context); + SyncPoller, ClusterMetricsConfigurationInner> beginUpdate( + String resourceGroupName, String clusterName, String metricsConfigurationName, String ifMatch, + String ifNoneMatch, ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters, + Context context); /** - * Delete the metrics configuration of the cluster. - * - * Delete the metrics configuration of the provided cluster. + * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -228,15 +180,15 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return clusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String clusterName, String metricsConfigurationName); + ClusterMetricsConfigurationInner update(String resourceGroupName, String clusterName, + String metricsConfigurationName); /** - * Delete the metrics configuration of the cluster. - * - * Delete the metrics configuration of the provided cluster. + * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -245,21 +197,20 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param metricsConfigurationUpdateParameters The request body. * @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. + * @return clusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String clusterName, String metricsConfigurationName, - String ifMatch, String ifNoneMatch, Context context); + ClusterMetricsConfigurationInner update(String resourceGroupName, String clusterName, + String metricsConfigurationName, String ifMatch, String ifNoneMatch, + ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters, Context context); /** - * Patch metrics configuration of the cluster. - * - * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -267,18 +218,14 @@ OperationStatusResultInner delete(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 clusterMetricsConfiguration represents the metrics configuration of - * an on-premises Network Cloud cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterMetricsConfigurationInner> - beginUpdate(String resourceGroupName, String clusterName, String metricsConfigurationName); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String metricsConfigurationName); /** - * Patch metrics configuration of the cluster. - * - * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -287,25 +234,18 @@ OperationStatusResultInner delete(String resourceGroupName, String clusterName, * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param metricsConfigurationUpdateParameters The request body. * @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 clusterMetricsConfiguration represents the metrics configuration of - * an on-premises Network Cloud cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterMetricsConfigurationInner> beginUpdate( - String resourceGroupName, String clusterName, String metricsConfigurationName, String ifMatch, - String ifNoneMatch, ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters, - Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String metricsConfigurationName, String ifMatch, String ifNoneMatch, Context context); /** - * Patch metrics configuration of the cluster. - * - * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -313,17 +253,12 @@ SyncPoller, ClusterMetricsConfigura * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterMetricsConfigurationInner update(String resourceGroupName, String clusterName, - String metricsConfigurationName); + void delete(String resourceGroupName, String clusterName, String metricsConfigurationName); /** - * Patch metrics configuration of the cluster. - * - * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -332,15 +267,45 @@ ClusterMetricsConfigurationInner update(String resourceGroupName, String cluster * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param metricsConfigurationUpdateParameters The request body. * @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 clusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterMetricsConfigurationInner update(String resourceGroupName, String clusterName, - String metricsConfigurationName, String ifMatch, String ifNoneMatch, - ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters, Context context); + void delete(String resourceGroupName, String clusterName, String metricsConfigurationName, String ifMatch, + String ifNoneMatch, Context context); + + /** + * Get a list of metrics configurations for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 metrics configurations for the provided cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName); + + /** + * Get a list of metrics configurations for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 metrics configurations for the provided cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName, + Integer top, String skipToken, Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/NetworkCloud.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/NetworkCloudManagementClient.java similarity index 88% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/NetworkCloud.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/NetworkCloudManagementClient.java index 2a5073c41590..b68a0e10a6d2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/NetworkCloud.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/NetworkCloudManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -8,30 +8,30 @@ import java.time.Duration; /** - * The interface for NetworkCloud class. + * The interface for NetworkCloudManagementClient class. */ -public interface NetworkCloud { +public interface NetworkCloudManagementClient { /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -53,6 +53,13 @@ public interface NetworkCloud { */ OperationsClient getOperations(); + /** + * Gets the AccessBridgesClient object to access its operations. + * + * @return the AccessBridgesClient object. + */ + AccessBridgesClient getAccessBridges(); + /** * Gets the BareMetalMachinesClient object to access its operations. * @@ -88,6 +95,13 @@ public interface NetworkCloud { */ KubernetesClustersClient getKubernetesClusters(); + /** + * Gets the KubernetesVersionsClient object to access its operations. + * + * @return the KubernetesVersionsClient object. + */ + KubernetesVersionsClient getKubernetesVersions(); + /** * Gets the L2NetworksClient object to access its operations. * @@ -158,13 +172,6 @@ public interface NetworkCloud { */ BmcKeySetsClient getBmcKeySets(); - /** - * Gets the MetricsConfigurationsClient object to access its operations. - * - * @return the MetricsConfigurationsClient object. - */ - MetricsConfigurationsClient getMetricsConfigurations(); - /** * Gets the AgentPoolsClient object to access its operations. * @@ -185,4 +192,11 @@ public interface NetworkCloud { * @return the ConsolesClient object. */ ConsolesClient getConsoles(); + + /** + * Gets the MetricsConfigurationsClient object to access its operations. + * + * @return the MetricsConfigurationsClient object. + */ + MetricsConfigurationsClient getMetricsConfigurations(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/OperationsClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/OperationsClient.java index aaa79c8b407d..452931b434c5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/OperationsClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -15,27 +15,25 @@ */ public interface OperationsClient { /** - * List resource provider operations. - * - * Get a list of all available resource provider operations. It contains a URL link to get the next set of results. + * 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 all available resource provider operations as paginated response with {@link PagedIterable}. + * @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 resource provider operations. - * - * Get a list of all available resource provider operations. It contains a URL link to get the next set of results. + * 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 all available resource provider operations as paginated response with {@link PagedIterable}. + * @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/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/RackSkusClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/RackSkusClient.java index 1ffb54240ddf..45a3042d6347 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/RackSkusClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/RackSkusClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -16,57 +16,49 @@ */ public interface RackSkusClient { /** - * List rack SKUs in the subscription. - * - * Get a list of rack SKUs in the provided subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of rack SKUs in the provided subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List rack SKUs in the subscription. - * - * Get a list of rack SKUs in the provided subscription. + * Get the properties of the provided rack SKU. * + * @param rackSkuName The name of the rack SKU. * @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 rack SKUs in the provided subscription as paginated response with {@link PagedIterable}. + * @return the properties of the provided rack SKU along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String rackSkuName, Context context); /** - * Retrieve the rack SKU. - * * Get the properties of the provided rack SKU. * * @param rackSkuName The name of the rack SKU. - * @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 properties of the provided rack SKU along with {@link Response}. + * @return the properties of the provided rack SKU. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String rackSkuName, Context context); + RackSkuInner get(String rackSkuName); /** - * Retrieve the rack SKU. + * Get a list of rack SKUs in the provided subscription. * - * Get the properties of the provided rack SKU. + * @throws com.azure.core.management.exception.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 rack SKUs in the provided subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of rack SKUs in the provided subscription. * - * @param rackSkuName The name of the rack SKU. + * @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 properties of the provided rack SKU. + * @return a list of rack SKUs in the provided subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - RackSkuInner get(String rackSkuName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/RacksClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/RacksClient.java index fbc6b780460d..6253751e55bf 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/RacksClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/RacksClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -11,7 +11,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.fluent.models.RackInner; import com.azure.resourcemanager.networkcloud.models.RackPatchParameters; @@ -20,70 +19,6 @@ */ public interface RacksClient { /** - * List racks in the subscription. - * - * Get a list of racks in the provided subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of racks in the provided subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List racks in the subscription. - * - * Get a list of racks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 racks in the provided subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Integer top, String skipToken, Context context); - - /** - * List racks in the resource group. - * - * Get a list of racks in the provided resource group. - * - * @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 a list of racks in the provided resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List racks in the resource group. - * - * Get a list of racks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 racks in the provided resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context); - - /** - * Retrieve the rack. - * * Get properties of the provided rack. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -98,8 +33,6 @@ PagedIterable listByResourceGroup(String resourceGroupName, Integer t Response getByResourceGroupWithResponse(String resourceGroupName, String rackName, Context context); /** - * Retrieve the rack. - * * Get properties of the provided rack. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -113,8 +46,6 @@ PagedIterable listByResourceGroup(String resourceGroupName, Integer t RackInner getByResourceGroup(String resourceGroupName, String rackName); /** - * Create or update the rack. - * * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as * the life cycle of this resource is managed by the system. * @@ -132,8 +63,6 @@ SyncPoller, RackInner> beginCreateOrUpdate(String resource RackInner rackParameters); /** - * Create or update the rack. - * * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as * the life cycle of this resource is managed by the system. * @@ -156,8 +85,6 @@ SyncPoller, RackInner> beginCreateOrUpdate(String resource RackInner rackParameters, String ifMatch, String ifNoneMatch, Context context); /** - * Create or update the rack. - * * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as * the life cycle of this resource is managed by the system. * @@ -173,8 +100,6 @@ SyncPoller, RackInner> beginCreateOrUpdate(String resource RackInner createOrUpdate(String resourceGroupName, String rackName, RackInner rackParameters); /** - * Create or update the rack. - * * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as * the life cycle of this resource is managed by the system. * @@ -196,27 +121,23 @@ RackInner createOrUpdate(String resourceGroupName, String rackName, RackInner ra String ifNoneMatch, Context context); /** - * Delete the rack. - * - * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is - * managed by the system. + * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates + * can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of rack represents the hardware of the rack and is dependent upon the + * cluster for lifecycle. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String rackName); + SyncPoller, RackInner> beginUpdate(String resourceGroupName, String rackName); /** - * Delete the rack. - * - * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is - * managed by the system. + * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates + * can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -224,37 +145,35 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param rackUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of rack represents the hardware of the rack and is dependent upon the + * cluster for lifecycle. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String rackName, String ifMatch, String ifNoneMatch, Context context); + SyncPoller, RackInner> beginUpdate(String resourceGroupName, String rackName, String ifMatch, + String ifNoneMatch, RackPatchParameters rackUpdateParameters, Context context); /** - * Delete the rack. - * - * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is - * managed by the system. + * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates + * can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return rack represents the hardware of the rack and is dependent upon the cluster for lifecycle. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String rackName); + RackInner update(String resourceGroupName, String rackName); /** - * Delete the rack. - * - * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is - * managed by the system. + * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates + * can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -262,38 +181,34 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param rackUpdateParameters The request body. * @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. + * @return rack represents the hardware of the rack and is dependent upon the cluster for lifecycle. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch, - Context context); + RackInner update(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch, + RackPatchParameters rackUpdateParameters, Context context); /** - * Patch the rack. - * - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates - * can be done independently. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 rack represents the hardware of the rack and is dependent upon the - * cluster for lifecycle. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RackInner> beginUpdate(String resourceGroupName, String rackName); + SyncPoller, Void> beginDelete(String resourceGroupName, String rackName); /** - * Patch the rack. - * - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates - * can be done independently. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -301,39 +216,32 @@ OperationStatusResultInner delete(String resourceGroupName, String rackName, Str * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param rackUpdateParameters The request body. * @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 rack represents the hardware of the rack and is dependent upon the - * cluster for lifecycle. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RackInner> beginUpdate(String resourceGroupName, String rackName, String ifMatch, - String ifNoneMatch, RackPatchParameters rackUpdateParameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String rackName, String ifMatch, + String ifNoneMatch, Context context); /** - * Patch the rack. - * - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates - * can be done independently. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return rack represents the hardware of the rack and is dependent upon the cluster for lifecycle. */ @ServiceMethod(returns = ReturnType.SINGLE) - RackInner update(String resourceGroupName, String rackName); + void delete(String resourceGroupName, String rackName); /** - * Patch the rack. - * - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates - * can be done independently. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. @@ -341,14 +249,65 @@ SyncPoller, RackInner> beginUpdate(String resourceGroupNam * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param rackUpdateParameters The request body. * @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 rack represents the hardware of the rack and is dependent upon the cluster for lifecycle. */ @ServiceMethod(returns = ReturnType.SINGLE) - RackInner update(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch, - RackPatchParameters rackUpdateParameters, Context context); + void delete(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch, Context context); + + /** + * Get a list of racks in the provided resource group. + * + * @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 a list of racks in the provided resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of racks in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 racks in the provided resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); + + /** + * Get a list of racks in the provided subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of racks in the provided subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of racks in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 racks in the provided subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Integer top, String skipToken, Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/StorageAppliancesClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/StorageAppliancesClient.java index faa15e823c64..a50a0f9f5d82 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/StorageAppliancesClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/StorageAppliancesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -11,8 +11,8 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.fluent.models.StorageApplianceInner; +import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; import com.azure.resourcemanager.networkcloud.models.StorageApplianceEnableRemoteVendorManagementParameters; import com.azure.resourcemanager.networkcloud.models.StorageAppliancePatchParameters; import com.azure.resourcemanager.networkcloud.models.StorageApplianceRunReadCommandsParameters; @@ -22,74 +22,6 @@ */ public interface StorageAppliancesClient { /** - * List storage appliances in the subscription. - * - * Get a list of storage appliances in the provided subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of storage appliances in the provided subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List storage appliances in the subscription. - * - * Get a list of storage appliances in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 storage appliances in the provided subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Integer top, String skipToken, Context context); - - /** - * List storage appliances in the resource group. - * - * Get a list of storage appliances in the provided resource group. - * - * @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 a list of storage appliances in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List storage appliances in the resource group. - * - * Get a list of storage appliances in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 storage appliances in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context); - - /** - * Retrieve the storage appliance. - * * Get properties of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -105,8 +37,6 @@ Response getByResourceGroupWithResponse(String resourceGr String storageApplianceName, Context context); /** - * Retrieve the storage appliance. - * * Get properties of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -120,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGr StorageApplianceInner getByResourceGroup(String resourceGroupName, String storageApplianceName); /** - * Create or update the storage appliance. - * * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will * be rejected as the life cycle of this resource is managed by the system. * @@ -139,8 +67,6 @@ SyncPoller, StorageApplianceInner> beginCreate String storageApplianceName, StorageApplianceInner storageApplianceParameters); /** - * Create or update the storage appliance. - * * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will * be rejected as the life cycle of this resource is managed by the system. * @@ -164,8 +90,6 @@ SyncPoller, StorageApplianceInner> beginCreate String ifNoneMatch, Context context); /** - * Create or update the storage appliance. - * * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will * be rejected as the life cycle of this resource is managed by the system. * @@ -182,8 +106,6 @@ StorageApplianceInner createOrUpdate(String resourceGroupName, String storageApp StorageApplianceInner storageApplianceParameters); /** - * Create or update the storage appliance. - * * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will * be rejected as the life cycle of this resource is managed by the system. * @@ -205,27 +127,24 @@ StorageApplianceInner createOrUpdate(String resourceGroupName, String storageApp StorageApplianceInner storageApplianceParameters, String ifMatch, String ifNoneMatch, Context context); /** - * Delete the storage appliance. - * - * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this - * resource is managed by the system. + * Update properties of the provided storage appliance, or update tags associated with the storage appliance + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of storageAppliance represents on-premises Network Cloud storage + * appliance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, + SyncPoller, StorageApplianceInner> beginUpdate(String resourceGroupName, String storageApplianceName); /** - * Delete the storage appliance. - * - * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this - * resource is managed by the system. + * Update properties of the provided storage appliance, or update tags associated with the storage appliance + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -233,37 +152,36 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param storageApplianceUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of storageAppliance represents on-premises Network Cloud storage + * appliance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String storageApplianceName, String ifMatch, String ifNoneMatch, Context context); + SyncPoller, StorageApplianceInner> beginUpdate(String resourceGroupName, + String storageApplianceName, String ifMatch, String ifNoneMatch, + StorageAppliancePatchParameters storageApplianceUpdateParameters, Context context); /** - * Delete the storage appliance. - * - * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this - * resource is managed by the system. + * Update properties of the provided storage appliance, or update tags associated with the storage appliance + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return storageAppliance represents on-premises Network Cloud storage appliance. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String storageApplianceName); + StorageApplianceInner update(String resourceGroupName, String storageApplianceName); /** - * Delete the storage appliance. - * - * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this - * resource is managed by the system. + * Update properties of the provided storage appliance, or update tags associated with the storage appliance + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -271,39 +189,34 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param storageApplianceUpdateParameters The request body. * @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. + * @return storageAppliance represents on-premises Network Cloud storage appliance. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String storageApplianceName, String ifMatch, - String ifNoneMatch, Context context); + StorageApplianceInner update(String resourceGroupName, String storageApplianceName, String ifMatch, + String ifNoneMatch, StorageAppliancePatchParameters storageApplianceUpdateParameters, Context context); /** - * Patch the storage appliance. - * - * Update properties of the provided storage appliance, or update tags associated with the storage appliance - * Properties and tag updates can be done independently. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 storageAppliance represents on-premises Network Cloud storage - * appliance. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, StorageApplianceInner> beginUpdate(String resourceGroupName, - String storageApplianceName); + SyncPoller, Void> beginDelete(String resourceGroupName, String storageApplianceName); /** - * Patch the storage appliance. - * - * Update properties of the provided storage appliance, or update tags associated with the storage appliance - * Properties and tag updates can be done independently. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -311,40 +224,32 @@ SyncPoller, StorageApplianceInner> beginUpdate * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param storageApplianceUpdateParameters The request body. * @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 storageAppliance represents on-premises Network Cloud storage - * appliance. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, StorageApplianceInner> beginUpdate(String resourceGroupName, - String storageApplianceName, String ifMatch, String ifNoneMatch, - StorageAppliancePatchParameters storageApplianceUpdateParameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String storageApplianceName, + String ifMatch, String ifNoneMatch, Context context); /** - * Patch the storage appliance. - * - * Update properties of the provided storage appliance, or update tags associated with the storage appliance - * Properties and tag updates can be done independently. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storageAppliance represents on-premises Network Cloud storage appliance. */ @ServiceMethod(returns = ReturnType.SINGLE) - StorageApplianceInner update(String resourceGroupName, String storageApplianceName); + void delete(String resourceGroupName, String storageApplianceName); /** - * Patch the storage appliance. - * - * Update properties of the provided storage appliance, or update tags associated with the storage appliance - * Properties and tag updates can be done independently. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. @@ -352,20 +257,74 @@ SyncPoller, StorageApplianceInner> beginUpdate * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param storageApplianceUpdateParameters The request body. * @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 storageAppliance represents on-premises Network Cloud storage appliance. */ @ServiceMethod(returns = ReturnType.SINGLE) - StorageApplianceInner update(String resourceGroupName, String storageApplianceName, String ifMatch, - String ifNoneMatch, StorageAppliancePatchParameters storageApplianceUpdateParameters, Context context); + void delete(String resourceGroupName, String storageApplianceName, String ifMatch, String ifNoneMatch, + Context context); + + /** + * Get a list of storage appliances in the provided resource group. + * + * @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 a list of storage appliances in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Turn off remote vendor management for a storage appliance, if supported. + * Get a list of storage appliances in the provided resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 storage appliances in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); + + /** + * Get a list of storage appliances in the provided subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of storage appliances in the provided subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of storage appliances in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 storage appliances in the provided subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Integer top, String skipToken, Context context); + + /** * Disable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -373,15 +332,13 @@ StorageApplianceInner update(String resourceGroupName, String storageApplianceNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> + SyncPoller, OperationStatusResult> beginDisableRemoteVendorManagement(String resourceGroupName, String storageApplianceName); /** - * Turn off remote vendor management for a storage appliance, if supported. - * * Disable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -390,15 +347,13 @@ StorageApplianceInner update(String resourceGroupName, String storageApplianceNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> + SyncPoller, OperationStatusResult> beginDisableRemoteVendorManagement(String resourceGroupName, String storageApplianceName, Context context); /** - * Turn off remote vendor management for a storage appliance, if supported. - * * Disable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -406,14 +361,12 @@ StorageApplianceInner update(String resourceGroupName, String storageApplianceNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner disableRemoteVendorManagement(String resourceGroupName, String storageApplianceName); + OperationStatusResult disableRemoteVendorManagement(String resourceGroupName, String storageApplianceName); /** - * Turn off remote vendor management for a storage appliance, if supported. - * * Disable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -422,15 +375,13 @@ StorageApplianceInner update(String resourceGroupName, String storageApplianceNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner disableRemoteVendorManagement(String resourceGroupName, String storageApplianceName, + OperationStatusResult disableRemoteVendorManagement(String resourceGroupName, String storageApplianceName, Context context); /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -438,15 +389,13 @@ OperationStatusResultInner disableRemoteVendorManagement(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> + SyncPoller, OperationStatusResult> beginEnableRemoteVendorManagement(String resourceGroupName, String storageApplianceName); /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -456,17 +405,15 @@ OperationStatusResultInner disableRemoteVendorManagement(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginEnableRemoteVendorManagement( + SyncPoller, OperationStatusResult> beginEnableRemoteVendorManagement( String resourceGroupName, String storageApplianceName, StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters, Context context); /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -474,14 +421,12 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner enableRemoteVendorManagement(String resourceGroupName, String storageApplianceName); + OperationStatusResult enableRemoteVendorManagement(String resourceGroupName, String storageApplianceName); /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -491,16 +436,14 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner enableRemoteVendorManagement(String resourceGroupName, String storageApplianceName, + OperationStatusResult enableRemoteVendorManagement(String resourceGroupName, String storageApplianceName, StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters, Context context); /** - * Run read-only commands against a storage appliance. - * * Run one or more read-only commands on the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -509,16 +452,14 @@ OperationStatusResultInner enableRemoteVendorManagement(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginRunReadCommands( - String resourceGroupName, String storageApplianceName, + SyncPoller, OperationStatusResult> beginRunReadCommands(String resourceGroupName, + String storageApplianceName, StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters); /** - * Run read-only commands against a storage appliance. - * * Run one or more read-only commands on the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -528,16 +469,14 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginRunReadCommands( - String resourceGroupName, String storageApplianceName, + SyncPoller, OperationStatusResult> beginRunReadCommands(String resourceGroupName, + String storageApplianceName, StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters, Context context); /** - * Run read-only commands against a storage appliance. - * * Run one or more read-only commands on the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -546,15 +485,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner runReadCommands(String resourceGroupName, String storageApplianceName, + OperationStatusResult runReadCommands(String resourceGroupName, String storageApplianceName, StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters); /** - * Run read-only commands against a storage appliance. - * * Run one or more read-only commands on the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -564,9 +501,9 @@ OperationStatusResultInner runReadCommands(String resourceGroupName, String stor * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner runReadCommands(String resourceGroupName, String storageApplianceName, + OperationStatusResult runReadCommands(String resourceGroupName, String storageApplianceName, StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters, Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/TrunkedNetworksClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/TrunkedNetworksClient.java index 86167de67903..21b58740ebde 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/TrunkedNetworksClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/TrunkedNetworksClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -11,7 +11,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.fluent.models.TrunkedNetworkInner; import com.azure.resourcemanager.networkcloud.models.TrunkedNetworkPatchParameters; @@ -20,72 +19,6 @@ */ public interface TrunkedNetworksClient { /** - * List trunked networks in the subscription. - * - * Get a list of trunked networks in the provided subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of trunked networks in the provided subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List trunked networks in the subscription. - * - * Get a list of trunked networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 trunked networks in the provided subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Integer top, String skipToken, Context context); - - /** - * List trunked networks in the resource group. - * - * Get a list of trunked networks in the provided resource group. - * - * @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 a list of trunked networks in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List trunked networks in the resource group. - * - * Get a list of trunked networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 trunked networks in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context); - - /** - * Retrieve the trunked network. - * * Get properties of the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -101,8 +34,6 @@ Response getByResourceGroupWithResponse(String resourceGrou Context context); /** - * Retrieve the trunked network. - * * Get properties of the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -116,8 +47,6 @@ Response getByResourceGroupWithResponse(String resourceGrou TrunkedNetworkInner getByResourceGroup(String resourceGroupName, String trunkedNetworkName); /** - * Create or update the trunked network. - * * Create a new trunked network or update the properties of the existing trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -134,8 +63,6 @@ SyncPoller, TrunkedNetworkInner> beginCreateOrUp String trunkedNetworkName, TrunkedNetworkInner trunkedNetworkParameters); /** - * Create or update the trunked network. - * * Create a new trunked network or update the properties of the existing trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -158,8 +85,6 @@ SyncPoller, TrunkedNetworkInner> beginCreateOrUp Context context); /** - * Create or update the trunked network. - * * Create a new trunked network or update the properties of the existing trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -176,8 +101,6 @@ TrunkedNetworkInner createOrUpdate(String resourceGroupName, String trunkedNetwo TrunkedNetworkInner trunkedNetworkParameters); /** - * Create or update the trunked network. - * * Create a new trunked network or update the properties of the existing trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -199,8 +122,42 @@ TrunkedNetworkInner createOrUpdate(String resourceGroupName, String trunkedNetwo TrunkedNetworkInner trunkedNetworkParameters, String ifMatch, String ifNoneMatch, Context context); /** - * Delete the trunked network. + * Update tags associated with the provided trunked network. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param trunkedNetworkName The name of the trunked network. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param trunkedNetworkUpdateParameters The request body. + * @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 trunkedNetwork represents a network that utilizes multiple isolation domains and specified VLANs to + * create a trunked network along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String trunkedNetworkName, + String ifMatch, String ifNoneMatch, TrunkedNetworkPatchParameters trunkedNetworkUpdateParameters, + Context context); + + /** + * Update tags associated with the provided trunked network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param trunkedNetworkName The name of the trunked 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 trunkedNetwork represents a network that utilizes multiple isolation domains and specified VLANs to + * create a trunked network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TrunkedNetworkInner update(String resourceGroupName, String trunkedNetworkName); + + /** * Delete the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -208,15 +165,12 @@ TrunkedNetworkInner createOrUpdate(String resourceGroupName, String trunkedNetwo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String trunkedNetworkName); + SyncPoller, Void> beginDelete(String resourceGroupName, String trunkedNetworkName); /** - * Delete the trunked network. - * * Delete the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -229,15 +183,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String trunkedNetworkName, String ifMatch, String ifNoneMatch, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String trunkedNetworkName, String ifMatch, + String ifNoneMatch, Context context); /** - * Delete the trunked network. - * * Delete the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -245,14 +197,11 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 delete(String resourceGroupName, String trunkedNetworkName); + void delete(String resourceGroupName, String trunkedNetworkName); /** - * Delete the trunked network. - * * Delete the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -265,49 +214,64 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 delete(String resourceGroupName, String trunkedNetworkName, String ifMatch, - String ifNoneMatch, Context context); + void delete(String resourceGroupName, String trunkedNetworkName, String ifMatch, String ifNoneMatch, + Context context); /** - * Patch the trunked network. + * Get a list of trunked networks in the provided resource group. * - * Update tags associated with the provided trunked network. + * @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 a list of trunked networks in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of trunked networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param trunkedNetworkUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 trunkedNetwork represents a network that utilizes multiple isolation domains and specified VLANs to - * create a trunked network along with {@link Response}. + * @return a list of trunked networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String trunkedNetworkName, - String ifMatch, String ifNoneMatch, TrunkedNetworkPatchParameters trunkedNetworkUpdateParameters, + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, Context context); /** - * Patch the trunked network. + * Get a list of trunked networks in the provided subscription. * - * Update tags associated with the provided trunked network. + * @throws com.azure.core.management.exception.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 trunked networks in the provided subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of trunked networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 trunkedNetwork represents a network that utilizes multiple isolation domains and specified VLANs to - * create a trunked network. + * @return a list of trunked networks in the provided subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - TrunkedNetworkInner update(String resourceGroupName, String trunkedNetworkName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Integer top, String skipToken, Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/VirtualMachinesClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/VirtualMachinesClient.java index 383c7c686050..eab953d04c6a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/VirtualMachinesClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/VirtualMachinesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -11,8 +11,8 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.fluent.models.VirtualMachineInner; +import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; import com.azure.resourcemanager.networkcloud.models.VirtualMachineAssignRelayParameters; import com.azure.resourcemanager.networkcloud.models.VirtualMachinePatchParameters; import com.azure.resourcemanager.networkcloud.models.VirtualMachinePowerOffParameters; @@ -22,72 +22,6 @@ */ public interface VirtualMachinesClient { /** - * List virtual machines in the subscription. - * - * Get a list of virtual machines in the provided subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of virtual machines in the provided subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List virtual machines in the subscription. - * - * Get a list of virtual machines in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 virtual machines in the provided subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Integer top, String skipToken, Context context); - - /** - * List virtual machines in the resource group. - * - * Get a list of virtual machines in the provided resource group. - * - * @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 a list of virtual machines in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List virtual machines in the resource group. - * - * Get a list of virtual machines in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 virtual machines in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context); - - /** - * Retrieve the virtual machine. - * * Get properties of the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -103,8 +37,6 @@ Response getByResourceGroupWithResponse(String resourceGrou Context context); /** - * Retrieve the virtual machine. - * * Get properties of the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -118,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGrou VirtualMachineInner getByResourceGroup(String resourceGroupName, String virtualMachineName); /** - * Create or update the virtual machine. - * * Create a new virtual machine or update the properties of the existing virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -136,8 +66,6 @@ SyncPoller, VirtualMachineInner> beginCreateOrUp String virtualMachineName, VirtualMachineInner virtualMachineParameters); /** - * Create or update the virtual machine. - * * Create a new virtual machine or update the properties of the existing virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -160,8 +88,6 @@ SyncPoller, VirtualMachineInner> beginCreateOrUp Context context); /** - * Create or update the virtual machine. - * * Create a new virtual machine or update the properties of the existing virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -177,8 +103,6 @@ VirtualMachineInner createOrUpdate(String resourceGroupName, String virtualMachi VirtualMachineInner virtualMachineParameters); /** - * Create or update the virtual machine. - * * Create a new virtual machine or update the properties of the existing virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -199,25 +123,24 @@ VirtualMachineInner createOrUpdate(String resourceGroupName, String virtualMachi VirtualMachineInner virtualMachineParameters, String ifMatch, String ifNoneMatch, Context context); /** - * Delete the virtual machine. - * - * Delete the provided virtual machine. + * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of virtualMachine represents the on-premises Network Cloud virtual + * machine. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, + SyncPoller, VirtualMachineInner> beginUpdate(String resourceGroupName, String virtualMachineName); /** - * Delete the virtual machine. - * - * Delete the provided virtual machine. + * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -225,35 +148,36 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param virtualMachineUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of virtualMachine represents the on-premises Network Cloud virtual + * machine. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String virtualMachineName, String ifMatch, String ifNoneMatch, Context context); + SyncPoller, VirtualMachineInner> beginUpdate(String resourceGroupName, + String virtualMachineName, String ifMatch, String ifNoneMatch, + VirtualMachinePatchParameters virtualMachineUpdateParameters, Context context); /** - * Delete the virtual machine. - * - * Delete the provided virtual machine. + * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return virtualMachine represents the on-premises Network Cloud virtual machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String virtualMachineName); + VirtualMachineInner update(String resourceGroupName, String virtualMachineName); /** - * Delete the virtual machine. - * - * Delete the provided virtual machine. + * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -261,39 +185,32 @@ SyncPoller, OperationStatusResultInner> b * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param virtualMachineUpdateParameters The request body. * @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. + * @return virtualMachine represents the on-premises Network Cloud virtual machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner delete(String resourceGroupName, String virtualMachineName, String ifMatch, - String ifNoneMatch, Context context); + VirtualMachineInner update(String resourceGroupName, String virtualMachineName, String ifMatch, String ifNoneMatch, + VirtualMachinePatchParameters virtualMachineUpdateParameters, Context context); /** - * Patch the virtual machine. - * - * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. - * Properties and tag updates can be done independently. + * Delete the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 virtualMachine represents the on-premises Network Cloud virtual - * machine. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualMachineInner> beginUpdate(String resourceGroupName, - String virtualMachineName); + SyncPoller, Void> beginDelete(String resourceGroupName, String virtualMachineName); /** - * Patch the virtual machine. - * - * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. - * Properties and tag updates can be done independently. + * Delete the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -301,40 +218,30 @@ SyncPoller, VirtualMachineInner> beginUpdate(Str * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param virtualMachineUpdateParameters The request body. * @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 virtualMachine represents the on-premises Network Cloud virtual - * machine. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualMachineInner> beginUpdate(String resourceGroupName, - String virtualMachineName, String ifMatch, String ifNoneMatch, - VirtualMachinePatchParameters virtualMachineUpdateParameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String virtualMachineName, String ifMatch, + String ifNoneMatch, Context context); /** - * Patch the virtual machine. - * - * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. - * Properties and tag updates can be done independently. + * Delete the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtualMachine represents the on-premises Network Cloud virtual machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualMachineInner update(String resourceGroupName, String virtualMachineName); + void delete(String resourceGroupName, String virtualMachineName); /** - * Patch the virtual machine. - * - * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. - * Properties and tag updates can be done independently. + * Delete the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -342,20 +249,72 @@ SyncPoller, VirtualMachineInner> beginUpdate(Str * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param virtualMachineUpdateParameters The request body. * @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 virtualMachine represents the on-premises Network Cloud virtual machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualMachineInner update(String resourceGroupName, String virtualMachineName, String ifMatch, String ifNoneMatch, - VirtualMachinePatchParameters virtualMachineUpdateParameters, Context context); + void delete(String resourceGroupName, String virtualMachineName, String ifMatch, String ifNoneMatch, + Context context); + + /** + * Get a list of virtual machines in the provided resource group. + * + * @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 a list of virtual machines in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. + * Get a list of virtual machines in the provided resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 virtual machines in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); + + /** + * Get a list of virtual machines in the provided subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of virtual machines in the provided subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of virtual machines in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 virtual machines in the provided subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Integer top, String skipToken, Context context); + + /** * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -363,15 +322,13 @@ VirtualMachineInner update(String resourceGroupName, String virtualMachineName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> - beginAssignRelay(String resourceGroupName, String virtualMachineName); + SyncPoller, OperationStatusResult> beginAssignRelay(String resourceGroupName, + String virtualMachineName); /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -381,16 +338,14 @@ VirtualMachineInner update(String resourceGroupName, String virtualMachineName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginAssignRelay( - String resourceGroupName, String virtualMachineName, - VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters, Context context); + SyncPoller, OperationStatusResult> beginAssignRelay(String resourceGroupName, + String virtualMachineName, VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters, + Context context); /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -398,14 +353,12 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner assignRelay(String resourceGroupName, String virtualMachineName); + OperationStatusResult assignRelay(String resourceGroupName, String virtualMachineName); /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -415,15 +368,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner assignRelay(String resourceGroupName, String virtualMachineName, + OperationStatusResult assignRelay(String resourceGroupName, String virtualMachineName, VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters, Context context); /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -431,15 +382,13 @@ OperationStatusResultInner assignRelay(String resourceGroupName, String virtualM * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> - beginPowerOff(String resourceGroupName, String virtualMachineName); + SyncPoller, OperationStatusResult> beginPowerOff(String resourceGroupName, + String virtualMachineName); /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -449,16 +398,13 @@ OperationStatusResultInner assignRelay(String resourceGroupName, String virtualM * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginPowerOff( - String resourceGroupName, String virtualMachineName, - VirtualMachinePowerOffParameters virtualMachinePowerOffParameters, Context context); + SyncPoller, OperationStatusResult> beginPowerOff(String resourceGroupName, + String virtualMachineName, VirtualMachinePowerOffParameters virtualMachinePowerOffParameters, Context context); /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -466,14 +412,12 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner powerOff(String resourceGroupName, String virtualMachineName); + OperationStatusResult powerOff(String resourceGroupName, String virtualMachineName); /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -483,15 +427,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner powerOff(String resourceGroupName, String virtualMachineName, + OperationStatusResult powerOff(String resourceGroupName, String virtualMachineName, VirtualMachinePowerOffParameters virtualMachinePowerOffParameters, Context context); /** - * Reimage the virtual machine. - * * Reimage the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -499,15 +441,13 @@ OperationStatusResultInner powerOff(String resourceGroupName, String virtualMach * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> - beginReimage(String resourceGroupName, String virtualMachineName); + SyncPoller, OperationStatusResult> beginReimage(String resourceGroupName, + String virtualMachineName); /** - * Reimage the virtual machine. - * * Reimage the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -516,15 +456,13 @@ OperationStatusResultInner powerOff(String resourceGroupName, String virtualMach * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> - beginReimage(String resourceGroupName, String virtualMachineName, Context context); + SyncPoller, OperationStatusResult> beginReimage(String resourceGroupName, + String virtualMachineName, Context context); /** - * Reimage the virtual machine. - * * Reimage the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -532,14 +470,12 @@ OperationStatusResultInner powerOff(String resourceGroupName, String virtualMach * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner reimage(String resourceGroupName, String virtualMachineName); + OperationStatusResult reimage(String resourceGroupName, String virtualMachineName); /** - * Reimage the virtual machine. - * * Reimage the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -548,14 +484,12 @@ OperationStatusResultInner powerOff(String resourceGroupName, String virtualMach * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner reimage(String resourceGroupName, String virtualMachineName, Context context); + OperationStatusResult reimage(String resourceGroupName, String virtualMachineName, Context context); /** - * Restart the virtual machine. - * * Restart the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -563,15 +497,13 @@ OperationStatusResultInner powerOff(String resourceGroupName, String virtualMach * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> - beginRestart(String resourceGroupName, String virtualMachineName); + SyncPoller, OperationStatusResult> beginRestart(String resourceGroupName, + String virtualMachineName); /** - * Restart the virtual machine. - * * Restart the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -580,15 +512,13 @@ OperationStatusResultInner powerOff(String resourceGroupName, String virtualMach * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> - beginRestart(String resourceGroupName, String virtualMachineName, Context context); + SyncPoller, OperationStatusResult> beginRestart(String resourceGroupName, + String virtualMachineName, Context context); /** - * Restart the virtual machine. - * * Restart the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -596,14 +526,12 @@ OperationStatusResultInner powerOff(String resourceGroupName, String virtualMach * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner restart(String resourceGroupName, String virtualMachineName); + OperationStatusResult restart(String resourceGroupName, String virtualMachineName); /** - * Restart the virtual machine. - * * Restart the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -612,14 +540,12 @@ OperationStatusResultInner powerOff(String resourceGroupName, String virtualMach * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner restart(String resourceGroupName, String virtualMachineName, Context context); + OperationStatusResult restart(String resourceGroupName, String virtualMachineName, Context context); /** - * Start the virtual machine. - * * Start the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -627,15 +553,13 @@ OperationStatusResultInner powerOff(String resourceGroupName, String virtualMach * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginStart(String resourceGroupName, + SyncPoller, OperationStatusResult> beginStart(String resourceGroupName, String virtualMachineName); /** - * Start the virtual machine. - * * Start the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -644,15 +568,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginStart(String resourceGroupName, + SyncPoller, OperationStatusResult> beginStart(String resourceGroupName, String virtualMachineName, Context context); /** - * Start the virtual machine. - * * Start the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -660,14 +582,12 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner start(String resourceGroupName, String virtualMachineName); + OperationStatusResult start(String resourceGroupName, String virtualMachineName); /** - * Start the virtual machine. - * * Start the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -676,8 +596,8 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner start(String resourceGroupName, String virtualMachineName, Context context); + OperationStatusResult start(String resourceGroupName, String virtualMachineName, Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/VolumesClient.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/VolumesClient.java index 34e5e8e8d7e2..f18d81117b9f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/VolumesClient.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/VolumesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent; @@ -11,7 +11,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.fluent.models.VolumeInner; import com.azure.resourcemanager.networkcloud.models.VolumePatchParameters; @@ -20,70 +19,6 @@ */ public interface VolumesClient { /** - * List volumes in the subscription. - * - * Get a list of volumes in the provided subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of volumes in the provided subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List volumes in the subscription. - * - * Get a list of volumes in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 volumes in the provided subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Integer top, String skipToken, Context context); - - /** - * List volumes in the resource group. - * - * Get a list of volumes in the provided resource group. - * - * @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 a list of volumes in the provided resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List volumes in the resource group. - * - * Get a list of volumes in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 volumes in the provided resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context); - - /** - * Retrieve the volume. - * * Get properties of the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -98,8 +33,6 @@ PagedIterable listByResourceGroup(String resourceGroupName, Integer Response getByResourceGroupWithResponse(String resourceGroupName, String volumeName, Context context); /** - * Retrieve the volume. - * * Get properties of the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -113,8 +46,6 @@ PagedIterable listByResourceGroup(String resourceGroupName, Integer VolumeInner getByResourceGroup(String resourceGroupName, String volumeName); /** - * Create or update the volume. - * * Create a new volume or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -131,8 +62,6 @@ SyncPoller, VolumeInner> beginCreateOrUpdate(String reso VolumeInner volumeParameters); /** - * Create or update the volume. - * * Create a new volume or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -154,8 +83,6 @@ SyncPoller, VolumeInner> beginCreateOrUpdate(String reso VolumeInner volumeParameters, String ifMatch, String ifNoneMatch, Context context); /** - * Create or update the volume. - * * Create a new volume or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -170,8 +97,6 @@ SyncPoller, VolumeInner> beginCreateOrUpdate(String reso VolumeInner createOrUpdate(String resourceGroupName, String volumeName, VolumeInner volumeParameters); /** - * Create or update the volume. - * * Create a new volume or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -192,8 +117,40 @@ VolumeInner createOrUpdate(String resourceGroupName, String volumeName, VolumeIn String ifMatch, String ifNoneMatch, Context context); /** - * Delete the volume. + * Update tags associated with the provided volume. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param volumeName The name of the volume. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param volumeUpdateParameters The request body. + * @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 volume represents storage made available for use by resources running on the cluster along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String volumeName, String ifMatch, + String ifNoneMatch, VolumePatchParameters volumeUpdateParameters, Context context); + + /** + * Update tags associated with the provided volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return volume represents storage made available for use by resources running on the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeInner update(String resourceGroupName, String volumeName); + + /** * Delete the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -201,15 +158,12 @@ VolumeInner createOrUpdate(String resourceGroupName, String volumeName, VolumeIn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String volumeName); + SyncPoller, Void> beginDelete(String resourceGroupName, String volumeName); /** - * Delete the volume. - * * Delete the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -222,15 +176,13 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationStatusResultInner> beginDelete(String resourceGroupName, - String volumeName, String ifMatch, String ifNoneMatch, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String volumeName, String ifMatch, + String ifNoneMatch, Context context); /** - * Delete the volume. - * * Delete the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -238,14 +190,11 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 delete(String resourceGroupName, String volumeName); + void delete(String resourceGroupName, String volumeName); /** - * Delete the volume. - * * Delete the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -258,47 +207,61 @@ SyncPoller, OperationStatusResultInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 delete(String resourceGroupName, String volumeName, String ifMatch, String ifNoneMatch, - Context context); + void delete(String resourceGroupName, String volumeName, String ifMatch, String ifNoneMatch, Context context); /** - * Patch the volume. + * Get a list of volumes in the provided resource group. * - * Update tags associated with the provided volume. + * @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 a list of volumes in the provided resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of volumes in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param volumeUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 volume represents storage made available for use by resources running on the cluster along with - * {@link Response}. + * @return a list of volumes in the provided resource group as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String volumeName, String ifMatch, - String ifNoneMatch, VolumePatchParameters volumeUpdateParameters, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); /** - * Patch the volume. + * Get a list of volumes in the provided subscription. * - * Update tags associated with the provided volume. + * @throws com.azure.core.management.exception.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 volumes in the provided subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of volumes in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 volume represents storage made available for use by resources running on the cluster. + * @return a list of volumes in the provided subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - VolumeInner update(String resourceGroupName, String volumeName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Integer top, String skipToken, Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AccessBridgeInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AccessBridgeInner.java new file mode 100644 index 000000000000..36211487f461 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AccessBridgeInner.java @@ -0,0 +1,369 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.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.networkcloud.models.AccessBridgeDetailedStatus; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeEndpoint; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeProvisioningState; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeSecurityRule; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.TransportProtocol; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * AccessBridge represents a managed access bridge resource. + */ +@Fluent +public final class AccessBridgeInner extends Resource { + /* + * The list of the resource properties. + */ + private AccessBridgeProperties innerProperties = new AccessBridgeProperties(); + + /* + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) + */ + private String etag; + + /* + * The extended location of the resource. This property is required when creating 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 AccessBridgeInner class. + */ + public AccessBridgeInner() { + } + + /** + * Get the innerProperties property: The list of the resource properties. + * + * @return the innerProperties value. + */ + private AccessBridgeProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Get the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. + * + * @return the extendedLocation value. + */ + public ExtendedLocation extendedLocation() { + return this.extendedLocation; + } + + /** + * Set the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. + * + * @param extendedLocation the extendedLocation value to set. + * @return the AccessBridgeInner object itself. + */ + public AccessBridgeInner 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 AccessBridgeInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccessBridgeInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the ipv4ConnectedPrefix property: The IPv4 subnet from which the access bridge allocates an address. This + * subnet must be part of the internal network specified by networkId. + * + * @return the ipv4ConnectedPrefix value. + */ + public String ipv4ConnectedPrefix() { + return this.innerProperties() == null ? null : this.innerProperties().ipv4ConnectedPrefix(); + } + + /** + * Set the ipv4ConnectedPrefix property: The IPv4 subnet from which the access bridge allocates an address. This + * subnet must be part of the internal network specified by networkId. + * + * @param ipv4ConnectedPrefix the ipv4ConnectedPrefix value to set. + * @return the AccessBridgeInner object itself. + */ + public AccessBridgeInner withIpv4ConnectedPrefix(String ipv4ConnectedPrefix) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessBridgeProperties(); + } + this.innerProperties().withIpv4ConnectedPrefix(ipv4ConnectedPrefix); + return this; + } + + /** + * Get the ipv6ConnectedPrefix property: The IPv6 subnet from which the access bridge allocates an address. This + * subnet must be part of the internal network specified by networkId. + * + * @return the ipv6ConnectedPrefix value. + */ + public String ipv6ConnectedPrefix() { + return this.innerProperties() == null ? null : this.innerProperties().ipv6ConnectedPrefix(); + } + + /** + * Set the ipv6ConnectedPrefix property: The IPv6 subnet from which the access bridge allocates an address. This + * subnet must be part of the internal network specified by networkId. + * + * @param ipv6ConnectedPrefix the ipv6ConnectedPrefix value to set. + * @return the AccessBridgeInner object itself. + */ + public AccessBridgeInner withIpv6ConnectedPrefix(String ipv6ConnectedPrefix) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessBridgeProperties(); + } + this.innerProperties().withIpv6ConnectedPrefix(ipv6ConnectedPrefix); + return this; + } + + /** + * Get the networkId property: The resource ID of the internal network in a layer 3 isolation domain containing the + * IP subnets to use. + * + * @return the networkId value. + */ + public String networkId() { + return this.innerProperties() == null ? null : this.innerProperties().networkId(); + } + + /** + * Set the networkId property: The resource ID of the internal network in a layer 3 isolation domain containing the + * IP subnets to use. + * + * @param networkId the networkId value to set. + * @return the AccessBridgeInner object itself. + */ + public AccessBridgeInner withNetworkId(String networkId) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessBridgeProperties(); + } + this.innerProperties().withNetworkId(networkId); + return this; + } + + /** + * Get the securityRules property: The list of security rules enforced by the access bridge. + * + * @return the securityRules value. + */ + public List securityRules() { + return this.innerProperties() == null ? null : this.innerProperties().securityRules(); + } + + /** + * Set the securityRules property: The list of security rules enforced by the access bridge. + * + * @param securityRules the securityRules value to set. + * @return the AccessBridgeInner object itself. + */ + public AccessBridgeInner withSecurityRules(List securityRules) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessBridgeProperties(); + } + this.innerProperties().withSecurityRules(securityRules); + return this; + } + + /** + * Get the detailedStatus property: The detailed status reported by the access bridge. + * + * @return the detailedStatus value. + */ + public AccessBridgeDetailedStatus detailedStatus() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); + } + + /** + * Get the detailedStatusMessage property: The descriptive message that accompanies the detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); + } + + /** + * Get the endpoints property: The observed endpoints that clients should use to reach the access bridge. + * + * @return the endpoints value. + */ + public List endpoints() { + return this.innerProperties() == null ? null : this.innerProperties().endpoints(); + } + + /** + * Get the protocol property: The protocol advertised by the access bridge endpoints. + * + * @return the protocol value. + */ + public TransportProtocol protocol() { + return this.innerProperties() == null ? null : this.innerProperties().protocol(); + } + + /** + * Get the provisioningState property: The provisioning state of the access bridge. + * + * @return the provisioningState value. + */ + public AccessBridgeProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * {@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.innerProperties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessBridgeInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessBridgeInner 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 AccessBridgeInner. + */ + public static AccessBridgeInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessBridgeInner deserializedAccessBridgeInner = new AccessBridgeInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedAccessBridgeInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedAccessBridgeInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedAccessBridgeInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedAccessBridgeInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedAccessBridgeInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedAccessBridgeInner.innerProperties = AccessBridgeProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedAccessBridgeInner.extendedLocation = ExtendedLocation.fromJson(reader); + } else if ("etag".equals(fieldName)) { + deserializedAccessBridgeInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedAccessBridgeInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAccessBridgeInner; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AccessBridgeProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AccessBridgeProperties.java new file mode 100644 index 000000000000..7ce2ada575e5 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AccessBridgeProperties.java @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeDetailedStatus; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeEndpoint; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeProvisioningState; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeSecurityRule; +import com.azure.resourcemanager.networkcloud.models.TransportProtocol; +import java.io.IOException; +import java.util.List; + +/** + * AccessBridgeProperties captures the input and status for an access bridge. + */ +@Fluent +public final class AccessBridgeProperties implements JsonSerializable { + /* + * The IPv4 subnet from which the access bridge allocates an address. This subnet must be part of the internal + * network specified by networkId. + */ + private String ipv4ConnectedPrefix; + + /* + * The IPv6 subnet from which the access bridge allocates an address. This subnet must be part of the internal + * network specified by networkId. + */ + private String ipv6ConnectedPrefix; + + /* + * The resource ID of the internal network in a layer 3 isolation domain containing the IP subnets to use. + */ + private String networkId; + + /* + * The list of security rules enforced by the access bridge. + */ + private List securityRules; + + /* + * The detailed status reported by the access bridge. + */ + private AccessBridgeDetailedStatus detailedStatus; + + /* + * The descriptive message that accompanies the detailed status. + */ + private String detailedStatusMessage; + + /* + * The observed endpoints that clients should use to reach the access bridge. + */ + private List endpoints; + + /* + * The protocol advertised by the access bridge endpoints. + */ + private TransportProtocol protocol; + + /* + * The provisioning state of the access bridge. + */ + private AccessBridgeProvisioningState provisioningState; + + /** + * Creates an instance of AccessBridgeProperties class. + */ + public AccessBridgeProperties() { + } + + /** + * Get the ipv4ConnectedPrefix property: The IPv4 subnet from which the access bridge allocates an address. This + * subnet must be part of the internal network specified by networkId. + * + * @return the ipv4ConnectedPrefix value. + */ + public String ipv4ConnectedPrefix() { + return this.ipv4ConnectedPrefix; + } + + /** + * Set the ipv4ConnectedPrefix property: The IPv4 subnet from which the access bridge allocates an address. This + * subnet must be part of the internal network specified by networkId. + * + * @param ipv4ConnectedPrefix the ipv4ConnectedPrefix value to set. + * @return the AccessBridgeProperties object itself. + */ + public AccessBridgeProperties withIpv4ConnectedPrefix(String ipv4ConnectedPrefix) { + this.ipv4ConnectedPrefix = ipv4ConnectedPrefix; + return this; + } + + /** + * Get the ipv6ConnectedPrefix property: The IPv6 subnet from which the access bridge allocates an address. This + * subnet must be part of the internal network specified by networkId. + * + * @return the ipv6ConnectedPrefix value. + */ + public String ipv6ConnectedPrefix() { + return this.ipv6ConnectedPrefix; + } + + /** + * Set the ipv6ConnectedPrefix property: The IPv6 subnet from which the access bridge allocates an address. This + * subnet must be part of the internal network specified by networkId. + * + * @param ipv6ConnectedPrefix the ipv6ConnectedPrefix value to set. + * @return the AccessBridgeProperties object itself. + */ + public AccessBridgeProperties withIpv6ConnectedPrefix(String ipv6ConnectedPrefix) { + this.ipv6ConnectedPrefix = ipv6ConnectedPrefix; + return this; + } + + /** + * Get the networkId property: The resource ID of the internal network in a layer 3 isolation domain containing the + * IP subnets to use. + * + * @return the networkId value. + */ + public String networkId() { + return this.networkId; + } + + /** + * Set the networkId property: The resource ID of the internal network in a layer 3 isolation domain containing the + * IP subnets to use. + * + * @param networkId the networkId value to set. + * @return the AccessBridgeProperties object itself. + */ + public AccessBridgeProperties withNetworkId(String networkId) { + this.networkId = networkId; + return this; + } + + /** + * Get the securityRules property: The list of security rules enforced by the access bridge. + * + * @return the securityRules value. + */ + public List securityRules() { + return this.securityRules; + } + + /** + * Set the securityRules property: The list of security rules enforced by the access bridge. + * + * @param securityRules the securityRules value to set. + * @return the AccessBridgeProperties object itself. + */ + public AccessBridgeProperties withSecurityRules(List securityRules) { + this.securityRules = securityRules; + return this; + } + + /** + * Get the detailedStatus property: The detailed status reported by the access bridge. + * + * @return the detailedStatus value. + */ + public AccessBridgeDetailedStatus detailedStatus() { + return this.detailedStatus; + } + + /** + * Get the detailedStatusMessage property: The descriptive message that accompanies the detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.detailedStatusMessage; + } + + /** + * Get the endpoints property: The observed endpoints that clients should use to reach the access bridge. + * + * @return the endpoints value. + */ + public List endpoints() { + return this.endpoints; + } + + /** + * Get the protocol property: The protocol advertised by the access bridge endpoints. + * + * @return the protocol value. + */ + public TransportProtocol protocol() { + return this.protocol; + } + + /** + * Get the provisioningState property: The provisioning state of the access bridge. + * + * @return the provisioningState value. + */ + public AccessBridgeProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("networkId", this.networkId); + jsonWriter.writeStringField("ipv4ConnectedPrefix", this.ipv4ConnectedPrefix); + jsonWriter.writeStringField("ipv6ConnectedPrefix", this.ipv6ConnectedPrefix); + jsonWriter.writeArrayField("securityRules", this.securityRules, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessBridgeProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessBridgeProperties 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 AccessBridgeProperties. + */ + public static AccessBridgeProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessBridgeProperties deserializedAccessBridgeProperties = new AccessBridgeProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("networkId".equals(fieldName)) { + deserializedAccessBridgeProperties.networkId = reader.getString(); + } else if ("ipv4ConnectedPrefix".equals(fieldName)) { + deserializedAccessBridgeProperties.ipv4ConnectedPrefix = reader.getString(); + } else if ("ipv6ConnectedPrefix".equals(fieldName)) { + deserializedAccessBridgeProperties.ipv6ConnectedPrefix = reader.getString(); + } else if ("securityRules".equals(fieldName)) { + List securityRules + = reader.readArray(reader1 -> AccessBridgeSecurityRule.fromJson(reader1)); + deserializedAccessBridgeProperties.securityRules = securityRules; + } else if ("detailedStatus".equals(fieldName)) { + deserializedAccessBridgeProperties.detailedStatus + = AccessBridgeDetailedStatus.fromString(reader.getString()); + } else if ("detailedStatusMessage".equals(fieldName)) { + deserializedAccessBridgeProperties.detailedStatusMessage = reader.getString(); + } else if ("endpoints".equals(fieldName)) { + List endpoints + = reader.readArray(reader1 -> AccessBridgeEndpoint.fromJson(reader1)); + deserializedAccessBridgeProperties.endpoints = endpoints; + } else if ("protocol".equals(fieldName)) { + deserializedAccessBridgeProperties.protocol = TransportProtocol.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedAccessBridgeProperties.provisioningState + = AccessBridgeProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAccessBridgeProperties; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AgentPoolInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AgentPoolInner.java index 07206562c205..ed6b1a350695 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AgentPoolInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AgentPoolInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -30,19 +29,20 @@ @Fluent public final class AgentPoolInner extends Resource { /* - * Resource ETag. + * The list of the resource properties. */ - private String etag; + private AgentPoolProperties innerProperties = new AgentPoolProperties(); /* - * The extended location of the cluster associated with the resource. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private ExtendedLocation extendedLocation; + private String etag; /* - * The list of the resource properties. + * The extendedLocation property. */ - private AgentPoolProperties innerProperties = new AgentPoolProperties(); + private ExtendedLocation extendedLocation; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -71,7 +71,19 @@ public AgentPoolInner() { } /** - * Get the etag property: Resource ETag. + * Get the innerProperties property: The list of the resource properties. + * + * @return the innerProperties value. + */ + private AgentPoolProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ @@ -80,7 +92,7 @@ public String etag() { } /** - * Get the extendedLocation property: The extended location of the cluster associated with the resource. + * Get the extendedLocation property: The extendedLocation property. * * @return the extendedLocation value. */ @@ -89,7 +101,7 @@ public ExtendedLocation extendedLocation() { } /** - * Set the extendedLocation property: The extended location of the cluster associated with the resource. + * Set the extendedLocation property: The extendedLocation property. * * @param extendedLocation the extendedLocation value to set. * @return the AgentPoolInner object itself. @@ -99,15 +111,6 @@ public AgentPoolInner withExtendedLocation(ExtendedLocation extendedLocation) { return this; } - /** - * Get the innerProperties property: The list of the resource properties. - * - * @return the innerProperties value. - */ - private AgentPoolProperties innerProperties() { - return this.innerProperties; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -286,33 +289,6 @@ public AgentPoolInner withCount(long count) { return this; } - /** - * Get the detailedStatus property: The current status of the agent pool. - * - * @return the detailedStatus value. - */ - public AgentPoolDetailedStatus detailedStatus() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); - } - - /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); - } - - /** - * Get the kubernetesVersion property: The Kubernetes version running in this agent pool. - * - * @return the kubernetesVersion value. - */ - public String kubernetesVersion() { - return this.innerProperties() == null ? null : this.innerProperties().kubernetesVersion(); - } - /** * Get the labels property: The labels applied to the nodes in this agent pool. * @@ -363,15 +339,6 @@ public AgentPoolInner withMode(AgentPoolMode mode) { return this; } - /** - * Get the provisioningState property: The provisioning state of the agent pool. - * - * @return the provisioningState value. - */ - public AgentPoolProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - /** * Get the taints property: The taints applied to the nodes in this agent pool. * @@ -442,23 +409,40 @@ public AgentPoolInner withVmSkuName(String vmSkuName) { } /** - * Validates the instance. + * Get the detailedStatus property: The current status of the agent pool. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the detailedStatus value. */ - public void validate() { - if (extendedLocation() != null) { - extendedLocation().validate(); - } - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property innerProperties in model AgentPoolInner")); - } else { - innerProperties().validate(); - } + public AgentPoolDetailedStatus detailedStatus() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); } - private static final ClientLogger LOGGER = new ClientLogger(AgentPoolInner.class); + /** + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); + } + + /** + * Get the kubernetesVersion property: The Kubernetes version running in this agent pool. + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.innerProperties() == null ? null : this.innerProperties().kubernetesVersion(); + } + + /** + * Get the provisioningState property: The provisioning state of the agent pool. + * + * @return the provisioningState value. + */ + public AgentPoolProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } /** * {@inheritDoc} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AgentPoolPatchProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AgentPoolPatchProperties.java index 1c29e12dbf7f..f015ad2b4abc 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AgentPoolPatchProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AgentPoolPatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -102,20 +102,6 @@ public AgentPoolPatchProperties withUpgradeSettings(AgentPoolUpgradeSettings upg return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (administratorConfiguration() != null) { - administratorConfiguration().validate(); - } - if (upgradeSettings() != null) { - upgradeSettings().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AgentPoolProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AgentPoolProperties.java index 036f2e2c7158..1b503376cdd6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AgentPoolProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AgentPoolProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -53,21 +52,6 @@ public final class AgentPoolProperties implements JsonSerializable e.validate()); - } - if (mode() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property mode in model AgentPoolProperties")); - } - if (taints() != null) { - taints().forEach(e -> e.validate()); - } - if (upgradeSettings() != null) { - upgradeSettings().validate(); - } - if (vmSkuName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property vmSkuName in model AgentPoolProperties")); - } + * @return the detailedStatus value. + */ + public AgentPoolDetailedStatus detailedStatus() { + return this.detailedStatus; } - private static final ClientLogger LOGGER = new ClientLogger(AgentPoolProperties.class); + /** + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.detailedStatusMessage; + } + + /** + * Get the kubernetesVersion property: The Kubernetes version running in this agent pool. + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Get the provisioningState property: The provisioning state of the agent pool. + * + * @return the provisioningState value. + */ + public AgentPoolProvisioningState provisioningState() { + return this.provisioningState; + } /** * {@inheritDoc} @@ -442,6 +405,14 @@ public static AgentPoolProperties fromJson(JsonReader jsonReader) throws IOExcep } else if ("availabilityZones".equals(fieldName)) { List availabilityZones = reader.readArray(reader1 -> reader1.getString()); deserializedAgentPoolProperties.availabilityZones = availabilityZones; + } else if ("labels".equals(fieldName)) { + List labels = reader.readArray(reader1 -> KubernetesLabel.fromJson(reader1)); + deserializedAgentPoolProperties.labels = labels; + } else if ("taints".equals(fieldName)) { + List taints = reader.readArray(reader1 -> KubernetesLabel.fromJson(reader1)); + deserializedAgentPoolProperties.taints = taints; + } else if ("upgradeSettings".equals(fieldName)) { + deserializedAgentPoolProperties.upgradeSettings = AgentPoolUpgradeSettings.fromJson(reader); } else if ("detailedStatus".equals(fieldName)) { deserializedAgentPoolProperties.detailedStatus = AgentPoolDetailedStatus.fromString(reader.getString()); @@ -449,17 +420,9 @@ public static AgentPoolProperties fromJson(JsonReader jsonReader) throws IOExcep deserializedAgentPoolProperties.detailedStatusMessage = reader.getString(); } else if ("kubernetesVersion".equals(fieldName)) { deserializedAgentPoolProperties.kubernetesVersion = reader.getString(); - } else if ("labels".equals(fieldName)) { - List labels = reader.readArray(reader1 -> KubernetesLabel.fromJson(reader1)); - deserializedAgentPoolProperties.labels = labels; } else if ("provisioningState".equals(fieldName)) { deserializedAgentPoolProperties.provisioningState = AgentPoolProvisioningState.fromString(reader.getString()); - } else if ("taints".equals(fieldName)) { - List taints = reader.readArray(reader1 -> KubernetesLabel.fromJson(reader1)); - deserializedAgentPoolProperties.taints = taints; - } else if ("upgradeSettings".equals(fieldName)) { - deserializedAgentPoolProperties.upgradeSettings = AgentPoolUpgradeSettings.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineInner.java index 9667c52142fb..bf054d28f816 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -15,6 +14,7 @@ import com.azure.resourcemanager.networkcloud.models.AdministrativeCredentials; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineCordonStatus; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineDetailedStatus; +import com.azure.resourcemanager.networkcloud.models.BareMetalMachineMonitoringConfigurationStatus; import com.azure.resourcemanager.networkcloud.models.BareMetalMachinePowerState; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineProvisioningState; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReadyState; @@ -34,19 +34,20 @@ @Fluent public final class BareMetalMachineInner extends Resource { /* - * Resource ETag. + * The list of the resource properties. */ - private String etag; + private BareMetalMachineProperties innerProperties = new BareMetalMachineProperties(); /* - * The extended location of the cluster associated with the resource. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private ExtendedLocation extendedLocation; + private String etag; /* - * The list of the resource properties. + * The extended location of the resource. This property is required when creating the resource. */ - private BareMetalMachineProperties innerProperties = new BareMetalMachineProperties(); + private ExtendedLocation extendedLocation; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -75,7 +76,19 @@ public BareMetalMachineInner() { } /** - * Get the etag property: Resource ETag. + * Get the innerProperties property: The list of the resource properties. + * + * @return the innerProperties value. + */ + private BareMetalMachineProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ @@ -84,7 +97,8 @@ public String etag() { } /** - * Get the extendedLocation property: The extended location of the cluster associated with the resource. + * Get the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @return the extendedLocation value. */ @@ -93,7 +107,8 @@ public ExtendedLocation extendedLocation() { } /** - * Set the extendedLocation property: The extended location of the cluster associated with the resource. + * Set the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @param extendedLocation the extendedLocation value to set. * @return the BareMetalMachineInner object itself. @@ -103,15 +118,6 @@ public BareMetalMachineInner withExtendedLocation(ExtendedLocation extendedLocat return this; } - /** - * Get the innerProperties property: The list of the resource properties. - * - * @return the innerProperties value. - */ - private BareMetalMachineProperties innerProperties() { - return this.innerProperties; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -169,26 +175,6 @@ public BareMetalMachineInner withTags(Map tags) { return this; } - /** - * Get the actionStates property: The current state of any in progress or completed actions. The most recent known - * instance of each action type is shown. - * - * @return the actionStates value. - */ - public List actionStates() { - return this.innerProperties() == null ? null : this.innerProperties().actionStates(); - } - - /** - * Get the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources - * that have attached this network. - * - * @return the associatedResourceIds value. - */ - public List associatedResourceIds() { - return this.innerProperties() == null ? null : this.innerProperties().associatedResourceIds(); - } - /** * Get the bmcConnectionString property: The connection string for the baseboard management controller including IP * address and protocol. @@ -285,6 +271,184 @@ public BareMetalMachineInner withBootMacAddress(String bootMacAddress) { return this; } + /** + * Get the machineDetails property: The custom details provided by the customer. + * + * @return the machineDetails value. + */ + public String machineDetails() { + return this.innerProperties() == null ? null : this.innerProperties().machineDetails(); + } + + /** + * Set the machineDetails property: The custom details provided by the customer. + * + * @param machineDetails the machineDetails value to set. + * @return the BareMetalMachineInner object itself. + */ + public BareMetalMachineInner withMachineDetails(String machineDetails) { + if (this.innerProperties() == null) { + this.innerProperties = new BareMetalMachineProperties(); + } + this.innerProperties().withMachineDetails(machineDetails); + return this; + } + + /** + * Get the machineName property: The OS-level hostname assigned to this machine. + * + * @return the machineName value. + */ + public String machineName() { + return this.innerProperties() == null ? null : this.innerProperties().machineName(); + } + + /** + * Set the machineName property: The OS-level hostname assigned to this machine. + * + * @param machineName the machineName value to set. + * @return the BareMetalMachineInner object itself. + */ + public BareMetalMachineInner withMachineName(String machineName) { + if (this.innerProperties() == null) { + this.innerProperties = new BareMetalMachineProperties(); + } + this.innerProperties().withMachineName(machineName); + return this; + } + + /** + * Get the machineSkuId property: The unique internal identifier of the bare metal machine SKU. + * + * @return the machineSkuId value. + */ + public String machineSkuId() { + return this.innerProperties() == null ? null : this.innerProperties().machineSkuId(); + } + + /** + * Set the machineSkuId property: The unique internal identifier of the bare metal machine SKU. + * + * @param machineSkuId the machineSkuId value to set. + * @return the BareMetalMachineInner object itself. + */ + public BareMetalMachineInner withMachineSkuId(String machineSkuId) { + if (this.innerProperties() == null) { + this.innerProperties = new BareMetalMachineProperties(); + } + this.innerProperties().withMachineSkuId(machineSkuId); + return this; + } + + /** + * Get the rackId property: The resource ID of the rack where this bare metal machine resides. + * + * @return the rackId value. + */ + public String rackId() { + return this.innerProperties() == null ? null : this.innerProperties().rackId(); + } + + /** + * Set the rackId property: The resource ID of the rack where this bare metal machine resides. + * + * @param rackId the rackId value to set. + * @return the BareMetalMachineInner object itself. + */ + public BareMetalMachineInner withRackId(String rackId) { + if (this.innerProperties() == null) { + this.innerProperties = new BareMetalMachineProperties(); + } + this.innerProperties().withRackId(rackId); + return this; + } + + /** + * Get the rackSlot property: The rack slot in which this bare metal machine is located, ordered from the bottom up + * i.e. the lowest slot is 1. + * + * @return the rackSlot value. + */ + public long rackSlot() { + return this.innerProperties() == null ? 0L : this.innerProperties().rackSlot(); + } + + /** + * Set the rackSlot property: The rack slot in which this bare metal machine is located, ordered from the bottom up + * i.e. the lowest slot is 1. + * + * @param rackSlot the rackSlot value to set. + * @return the BareMetalMachineInner object itself. + */ + public BareMetalMachineInner withRackSlot(long rackSlot) { + if (this.innerProperties() == null) { + this.innerProperties = new BareMetalMachineProperties(); + } + this.innerProperties().withRackSlot(rackSlot); + return this; + } + + /** + * Get the serialNumber property: The serial number of the bare metal machine. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); + } + + /** + * Set the serialNumber property: The serial number of the bare metal machine. + * + * @param serialNumber the serialNumber value to set. + * @return the BareMetalMachineInner object itself. + */ + public BareMetalMachineInner withSerialNumber(String serialNumber) { + if (this.innerProperties() == null) { + this.innerProperties = new BareMetalMachineProperties(); + } + this.innerProperties().withSerialNumber(serialNumber); + return this; + } + + /** + * Get the actionStates property: The current state of any in progress or completed actions. The most recent known + * instance of each action type is shown. + * + * @return the actionStates value. + */ + public List actionStates() { + return this.innerProperties() == null ? null : this.innerProperties().actionStates(); + } + + /** + * Get the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources + * that have attached this network. + * + * @return the associatedResourceIds value. + */ + public List associatedResourceIds() { + return this.innerProperties() == null ? null : this.innerProperties().associatedResourceIds(); + } + + /** + * Get the bmcIpv4Address property: The IPv4 address of the BMC interface for the bare metal machine. + * + * @return the bmcIpv4Address value. + */ + public String bmcIpv4Address() { + return this.innerProperties() == null ? null : this.innerProperties().bmcIpv4Address(); + } + + /** + * Get the bmcIpv6Address property: The IPv6 address of the BMC interface for the bare metal machine. + * + * @return the bmcIpv6Address value. + */ + public String bmcIpv6Address() { + return this.innerProperties() == null ? null : this.innerProperties().bmcIpv6Address(); + } + /** * Get the caCertificate property: The CA certificate information issued by the platform for connecting to TLS * interfaces for the bare metal machine. Callers add this certificate to the trusted CA store on the Kubernetes @@ -406,52 +570,6 @@ public BareMetalMachineInner withMachineClusterVersion(String machineClusterVers return this; } - /** - * Get the machineDetails property: The custom details provided by the customer. - * - * @return the machineDetails value. - */ - public String machineDetails() { - return this.innerProperties() == null ? null : this.innerProperties().machineDetails(); - } - - /** - * Set the machineDetails property: The custom details provided by the customer. - * - * @param machineDetails the machineDetails value to set. - * @return the BareMetalMachineInner object itself. - */ - public BareMetalMachineInner withMachineDetails(String machineDetails) { - if (this.innerProperties() == null) { - this.innerProperties = new BareMetalMachineProperties(); - } - this.innerProperties().withMachineDetails(machineDetails); - return this; - } - - /** - * Get the machineName property: The OS-level hostname assigned to this machine. - * - * @return the machineName value. - */ - public String machineName() { - return this.innerProperties() == null ? null : this.innerProperties().machineName(); - } - - /** - * Set the machineName property: The OS-level hostname assigned to this machine. - * - * @param machineName the machineName value to set. - * @return the BareMetalMachineInner object itself. - */ - public BareMetalMachineInner withMachineName(String machineName) { - if (this.innerProperties() == null) { - this.innerProperties = new BareMetalMachineProperties(); - } - this.innerProperties().withMachineName(machineName); - return this; - } - /** * Get the machineRoles property: The list of roles that are assigned to the cluster node running on this machine. * @@ -462,26 +580,12 @@ public List machineRoles() { } /** - * Get the machineSkuId property: The unique internal identifier of the bare metal machine SKU. + * Get the monitoringConfigurationStatus property: The monitoring configuration status of the bare metal machine. * - * @return the machineSkuId value. + * @return the monitoringConfigurationStatus value. */ - public String machineSkuId() { - return this.innerProperties() == null ? null : this.innerProperties().machineSkuId(); - } - - /** - * Set the machineSkuId property: The unique internal identifier of the bare metal machine SKU. - * - * @param machineSkuId the machineSkuId value to set. - * @return the BareMetalMachineInner object itself. - */ - public BareMetalMachineInner withMachineSkuId(String machineSkuId) { - if (this.innerProperties() == null) { - this.innerProperties = new BareMetalMachineProperties(); - } - this.innerProperties().withMachineSkuId(machineSkuId); - return this; + public BareMetalMachineMonitoringConfigurationStatus monitoringConfigurationStatus() { + return this.innerProperties() == null ? null : this.innerProperties().monitoringConfigurationStatus(); } /** @@ -522,63 +626,6 @@ public BareMetalMachinePowerState powerState() { return this.innerProperties() == null ? null : this.innerProperties().powerState(); } - /** - * Get the provisioningState property: The provisioning state of the bare metal machine. - * - * @return the provisioningState value. - */ - public BareMetalMachineProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the rackId property: The resource ID of the rack where this bare metal machine resides. - * - * @return the rackId value. - */ - public String rackId() { - return this.innerProperties() == null ? null : this.innerProperties().rackId(); - } - - /** - * Set the rackId property: The resource ID of the rack where this bare metal machine resides. - * - * @param rackId the rackId value to set. - * @return the BareMetalMachineInner object itself. - */ - public BareMetalMachineInner withRackId(String rackId) { - if (this.innerProperties() == null) { - this.innerProperties = new BareMetalMachineProperties(); - } - this.innerProperties().withRackId(rackId); - return this; - } - - /** - * Get the rackSlot property: The rack slot in which this bare metal machine is located, ordered from the bottom up - * i.e. the lowest slot is 1. - * - * @return the rackSlot value. - */ - public long rackSlot() { - return this.innerProperties() == null ? 0L : this.innerProperties().rackSlot(); - } - - /** - * Set the rackSlot property: The rack slot in which this bare metal machine is located, ordered from the bottom up - * i.e. the lowest slot is 1. - * - * @param rackSlot the rackSlot value to set. - * @return the BareMetalMachineInner object itself. - */ - public BareMetalMachineInner withRackSlot(long rackSlot) { - if (this.innerProperties() == null) { - this.innerProperties = new BareMetalMachineProperties(); - } - this.innerProperties().withRackSlot(rackSlot); - return this; - } - /** * Get the readyState property: The indicator of whether the bare metal machine is ready to receive workloads. * @@ -606,29 +653,6 @@ public List secretRotationStatus() { return this.innerProperties() == null ? null : this.innerProperties().secretRotationStatus(); } - /** - * Get the serialNumber property: The serial number of the bare metal machine. - * - * @return the serialNumber value. - */ - public String serialNumber() { - return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); - } - - /** - * Set the serialNumber property: The serial number of the bare metal machine. - * - * @param serialNumber the serialNumber value to set. - * @return the BareMetalMachineInner object itself. - */ - public BareMetalMachineInner withSerialNumber(String serialNumber) { - if (this.innerProperties() == null) { - this.innerProperties = new BareMetalMachineProperties(); - } - this.innerProperties().withSerialNumber(serialNumber); - return this; - } - /** * Get the serviceTag property: The discovered value of the machine's service tag. * @@ -649,29 +673,14 @@ public List virtualMachinesAssociatedIds() { } /** - * Validates the instance. + * Get the provisioningState property: The provisioning state of the bare metal machine. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - public void validate() { - if (extendedLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property extendedLocation in model BareMetalMachineInner")); - } else { - extendedLocation().validate(); - } - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model BareMetalMachineInner")); - } else { - innerProperties().validate(); - } + public BareMetalMachineProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - private static final ClientLogger LOGGER = new ClientLogger(BareMetalMachineInner.class); - /** * {@inheritDoc} */ @@ -680,8 +689,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); return jsonWriter.writeEndObject(); } @@ -712,10 +721,10 @@ public static BareMetalMachineInner fromJson(JsonReader jsonReader) throws IOExc } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedBareMetalMachineInner.withTags(tags); - } else if ("extendedLocation".equals(fieldName)) { - deserializedBareMetalMachineInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedBareMetalMachineInner.innerProperties = BareMetalMachineProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedBareMetalMachineInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedBareMetalMachineInner.etag = reader.getString(); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineKeySetInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineKeySetInner.java index 45bae4a28188..2bec99e251f3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineKeySetInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineKeySetInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -28,19 +27,20 @@ @Fluent public final class BareMetalMachineKeySetInner extends Resource { /* - * Resource ETag. + * The list of the resource properties. */ - private String etag; + private BareMetalMachineKeySetProperties innerProperties = new BareMetalMachineKeySetProperties(); /* - * The extended location of the cluster associated with the resource. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private ExtendedLocation extendedLocation; + private String etag; /* - * The list of the resource properties. + * The extended location of the resource. This property is required when creating the resource. */ - private BareMetalMachineKeySetProperties innerProperties = new BareMetalMachineKeySetProperties(); + private ExtendedLocation extendedLocation; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -69,7 +69,19 @@ public BareMetalMachineKeySetInner() { } /** - * Get the etag property: Resource ETag. + * Get the innerProperties property: The list of the resource properties. + * + * @return the innerProperties value. + */ + private BareMetalMachineKeySetProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ @@ -78,7 +90,8 @@ public String etag() { } /** - * Get the extendedLocation property: The extended location of the cluster associated with the resource. + * Get the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @return the extendedLocation value. */ @@ -87,7 +100,8 @@ public ExtendedLocation extendedLocation() { } /** - * Set the extendedLocation property: The extended location of the cluster associated with the resource. + * Set the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @param extendedLocation the extendedLocation value to set. * @return the BareMetalMachineKeySetInner object itself. @@ -97,15 +111,6 @@ public BareMetalMachineKeySetInner withExtendedLocation(ExtendedLocation extende return this; } - /** - * Get the innerProperties property: The list of the resource properties. - * - * @return the innerProperties value. - */ - private BareMetalMachineKeySetProperties innerProperties() { - return this.innerProperties; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -188,24 +193,6 @@ public BareMetalMachineKeySetInner withAzureGroupId(String azureGroupId) { return this; } - /** - * Get the detailedStatus property: The more detailed status of the key set. - * - * @return the detailedStatus value. - */ - public BareMetalMachineKeySetDetailedStatus detailedStatus() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); - } - - /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); - } - /** * Get the expiration property: The date and time after which the users in this key set will be removed from the * bare metal machines. @@ -256,15 +243,6 @@ public BareMetalMachineKeySetInner withJumpHostsAllowed(List jumpHostsAl return this; } - /** - * Get the lastValidation property: The last time this key set was validated. - * - * @return the lastValidation value. - */ - public OffsetDateTime lastValidation() { - return this.innerProperties() == null ? null : this.innerProperties().lastValidation(); - } - /** * Get the osGroupName property: The name of the group that users will be assigned to on the operating system of the * machines. @@ -338,15 +316,6 @@ public BareMetalMachineKeySetInner withPrivilegeLevelName(String privilegeLevelN return this; } - /** - * Get the provisioningState property: The provisioning state of the bare metal machine key set. - * - * @return the provisioningState value. - */ - public BareMetalMachineKeySetProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - /** * Get the userList property: The unique list of permitted users. * @@ -370,6 +339,33 @@ public BareMetalMachineKeySetInner withUserList(List userList) { return this; } + /** + * Get the detailedStatus property: The more detailed status of the key set. + * + * @return the detailedStatus value. + */ + public BareMetalMachineKeySetDetailedStatus detailedStatus() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); + } + + /** + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); + } + + /** + * Get the lastValidation property: The last time this key set was validated. + * + * @return the lastValidation value. + */ + public OffsetDateTime lastValidation() { + return this.innerProperties() == null ? null : this.innerProperties().lastValidation(); + } + /** * Get the userListStatus property: The status evaluation of each user. * @@ -380,29 +376,14 @@ public List userListStatus() { } /** - * Validates the instance. + * Get the provisioningState property: The provisioning state of the bare metal machine key set. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (extendedLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property extendedLocation in model BareMetalMachineKeySetInner")); - } else { - extendedLocation().validate(); - } - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model BareMetalMachineKeySetInner")); - } else { - innerProperties().validate(); - } + * @return the provisioningState value. + */ + public BareMetalMachineKeySetProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - private static final ClientLogger LOGGER = new ClientLogger(BareMetalMachineKeySetInner.class); - /** * {@inheritDoc} */ @@ -411,8 +392,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); return jsonWriter.writeEndObject(); } @@ -443,11 +424,11 @@ public static BareMetalMachineKeySetInner fromJson(JsonReader jsonReader) throws } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedBareMetalMachineKeySetInner.withTags(tags); - } else if ("extendedLocation".equals(fieldName)) { - deserializedBareMetalMachineKeySetInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedBareMetalMachineKeySetInner.innerProperties = BareMetalMachineKeySetProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedBareMetalMachineKeySetInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedBareMetalMachineKeySetInner.etag = reader.getString(); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineKeySetPatchProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineKeySetPatchProperties.java index 5b397c6c40cd..5b0572456160 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineKeySetPatchProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineKeySetPatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -108,17 +108,6 @@ public BareMetalMachineKeySetPatchProperties withUserList(List userL return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userList() != null) { - userList().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineKeySetProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineKeySetProperties.java index 659ab910e206..7a4a514528af 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineKeySetProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineKeySetProperties.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -32,16 +31,6 @@ public final class BareMetalMachineKeySetProperties implements JsonSerializable< */ private String azureGroupId; - /* - * The more detailed status of the key set. - */ - private BareMetalMachineKeySetDetailedStatus detailedStatus; - - /* - * The descriptive message about the current detailed status. - */ - private String detailedStatusMessage; - /* * The date and time after which the users in this key set will be removed from the bare metal machines. */ @@ -53,11 +42,6 @@ public final class BareMetalMachineKeySetProperties implements JsonSerializable< */ private List jumpHostsAllowed; - /* - * The last time this key set was validated. - */ - private OffsetDateTime lastValidation; - /* * The name of the group that users will be assigned to on the operating system of the machines. */ @@ -74,20 +58,35 @@ public final class BareMetalMachineKeySetProperties implements JsonSerializable< private String privilegeLevelName; /* - * The provisioning state of the bare metal machine key set. + * The unique list of permitted users. */ - private BareMetalMachineKeySetProvisioningState provisioningState; + private List userList; /* - * The unique list of permitted users. + * The more detailed status of the key set. */ - private List userList; + private BareMetalMachineKeySetDetailedStatus detailedStatus; + + /* + * The descriptive message about the current detailed status. + */ + private String detailedStatusMessage; + + /* + * The last time this key set was validated. + */ + private OffsetDateTime lastValidation; /* * The status evaluation of each user. */ private List userListStatus; + /* + * The provisioning state of the bare metal machine key set. + */ + private BareMetalMachineKeySetProvisioningState provisioningState; + /** * Creates an instance of BareMetalMachineKeySetProperties class. */ @@ -116,24 +115,6 @@ public BareMetalMachineKeySetProperties withAzureGroupId(String azureGroupId) { return this; } - /** - * Get the detailedStatus property: The more detailed status of the key set. - * - * @return the detailedStatus value. - */ - public BareMetalMachineKeySetDetailedStatus detailedStatus() { - return this.detailedStatus; - } - - /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.detailedStatusMessage; - } - /** * Get the expiration property: The date and time after which the users in this key set will be removed from the * bare metal machines. @@ -178,15 +159,6 @@ public BareMetalMachineKeySetProperties withJumpHostsAllowed(List jumpHo return this; } - /** - * Get the lastValidation property: The last time this key set was validated. - * - * @return the lastValidation value. - */ - public OffsetDateTime lastValidation() { - return this.lastValidation; - } - /** * Get the osGroupName property: The name of the group that users will be assigned to on the operating system of the * machines. @@ -251,15 +223,6 @@ public BareMetalMachineKeySetProperties withPrivilegeLevelName(String privilegeL return this; } - /** - * Get the provisioningState property: The provisioning state of the bare metal machine key set. - * - * @return the provisioningState value. - */ - public BareMetalMachineKeySetProvisioningState provisioningState() { - return this.provisioningState; - } - /** * Get the userList property: The unique list of permitted users. * @@ -280,6 +243,33 @@ public BareMetalMachineKeySetProperties withUserList(List userList) return this; } + /** + * Get the detailedStatus property: The more detailed status of the key set. + * + * @return the detailedStatus value. + */ + public BareMetalMachineKeySetDetailedStatus detailedStatus() { + return this.detailedStatus; + } + + /** + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.detailedStatusMessage; + } + + /** + * Get the lastValidation property: The last time this key set was validated. + * + * @return the lastValidation value. + */ + public OffsetDateTime lastValidation() { + return this.lastValidation; + } + /** * Get the userListStatus property: The status evaluation of each user. * @@ -290,45 +280,14 @@ public List userListStatus() { } /** - * Validates the instance. + * Get the provisioningState property: The provisioning state of the bare metal machine key set. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (azureGroupId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property azureGroupId in model BareMetalMachineKeySetProperties")); - } - if (expiration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property expiration in model BareMetalMachineKeySetProperties")); - } - if (jumpHostsAllowed() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property jumpHostsAllowed in model BareMetalMachineKeySetProperties")); - } - if (privilegeLevel() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property privilegeLevel in model BareMetalMachineKeySetProperties")); - } - if (userList() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property userList in model BareMetalMachineKeySetProperties")); - } else { - userList().forEach(e -> e.validate()); - } - if (userListStatus() != null) { - userListStatus().forEach(e -> e.validate()); - } + * @return the provisioningState value. + */ + public BareMetalMachineKeySetProvisioningState provisioningState() { + return this.provisioningState; } - private static final ClientLogger LOGGER = new ClientLogger(BareMetalMachineKeySetProperties.class); - /** * {@inheritDoc} */ @@ -379,6 +338,10 @@ public static BareMetalMachineKeySetProperties fromJson(JsonReader jsonReader) t } else if ("userList".equals(fieldName)) { List userList = reader.readArray(reader1 -> KeySetUser.fromJson(reader1)); deserializedBareMetalMachineKeySetProperties.userList = userList; + } else if ("osGroupName".equals(fieldName)) { + deserializedBareMetalMachineKeySetProperties.osGroupName = reader.getString(); + } else if ("privilegeLevelName".equals(fieldName)) { + deserializedBareMetalMachineKeySetProperties.privilegeLevelName = reader.getString(); } else if ("detailedStatus".equals(fieldName)) { deserializedBareMetalMachineKeySetProperties.detailedStatus = BareMetalMachineKeySetDetailedStatus.fromString(reader.getString()); @@ -387,17 +350,13 @@ public static BareMetalMachineKeySetProperties fromJson(JsonReader jsonReader) t } else if ("lastValidation".equals(fieldName)) { deserializedBareMetalMachineKeySetProperties.lastValidation = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("osGroupName".equals(fieldName)) { - deserializedBareMetalMachineKeySetProperties.osGroupName = reader.getString(); - } else if ("privilegeLevelName".equals(fieldName)) { - deserializedBareMetalMachineKeySetProperties.privilegeLevelName = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedBareMetalMachineKeySetProperties.provisioningState - = BareMetalMachineKeySetProvisioningState.fromString(reader.getString()); } else if ("userListStatus".equals(fieldName)) { List userListStatus = reader.readArray(reader1 -> KeySetUserStatus.fromJson(reader1)); deserializedBareMetalMachineKeySetProperties.userListStatus = userListStatus; + } else if ("provisioningState".equals(fieldName)) { + deserializedBareMetalMachineKeySetProperties.provisioningState + = BareMetalMachineKeySetProvisioningState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachinePatchProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachinePatchProperties.java index 512ab64310cb..30a05e027e92 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachinePatchProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachinePatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -50,14 +50,6 @@ public BareMetalMachinePatchProperties withMachineDetails(String machineDetails) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineProperties.java index 0420a22488e8..07afec09be30 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,6 +13,7 @@ import com.azure.resourcemanager.networkcloud.models.AdministrativeCredentials; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineCordonStatus; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineDetailedStatus; +import com.azure.resourcemanager.networkcloud.models.BareMetalMachineMonitoringConfigurationStatus; import com.azure.resourcemanager.networkcloud.models.BareMetalMachinePowerState; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineProvisioningState; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReadyState; @@ -30,17 +30,6 @@ */ @Fluent public final class BareMetalMachineProperties implements JsonSerializable { - /* - * The current state of any in progress or completed actions. The most recent known instance of each action type is - * shown. - */ - private List actionStates; - - /* - * The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. - */ - private List associatedResourceIds; - /* * The connection string for the baseboard management controller including IP address and protocol. */ @@ -61,6 +50,57 @@ public final class BareMetalMachineProperties implements JsonSerializable actionStates; + + /* + * The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. + */ + private List associatedResourceIds; + + /* + * The IPv4 address of the BMC interface for the bare metal machine. + */ + private String bmcIpv4Address; + + /* + * The IPv6 address of the BMC interface for the bare metal machine. + */ + private String bmcIpv6Address; + /* * The CA certificate information issued by the platform for connecting to TLS interfaces for the bare metal * machine. Callers add this certificate to the trusted CA store on the Kubernetes control plane nodes to allow @@ -120,25 +160,15 @@ public final class BareMetalMachineProperties implements JsonSerializable machineRoles; /* - * The unique internal identifier of the bare metal machine SKU. + * The monitoring configuration status of the bare metal machine. */ - private String machineSkuId; + private BareMetalMachineMonitoringConfigurationStatus monitoringConfigurationStatus; /* * The IPv4 address that is assigned to the bare metal machine during the cluster deployment. @@ -160,21 +190,6 @@ public final class BareMetalMachineProperties implements JsonSerializable secretRotationStatus; - /* - * The serial number of the bare metal machine. - */ - private String serialNumber; - /* * The discovered value of the machine's service tag. */ @@ -206,30 +216,15 @@ public final class BareMetalMachineProperties implements JsonSerializable virtualMachinesAssociatedIds; - /** - * Creates an instance of BareMetalMachineProperties class. - */ - public BareMetalMachineProperties() { - } - - /** - * Get the actionStates property: The current state of any in progress or completed actions. The most recent known - * instance of each action type is shown. - * - * @return the actionStates value. + /* + * The provisioning state of the bare metal machine. */ - public List actionStates() { - return this.actionStates; - } + private BareMetalMachineProvisioningState provisioningState; /** - * Get the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources - * that have attached this network. - * - * @return the associatedResourceIds value. + * Creates an instance of BareMetalMachineProperties class. */ - public List associatedResourceIds() { - return this.associatedResourceIds; + public BareMetalMachineProperties() { } /** @@ -316,6 +311,166 @@ public BareMetalMachineProperties withBootMacAddress(String bootMacAddress) { return this; } + /** + * Get the machineDetails property: The custom details provided by the customer. + * + * @return the machineDetails value. + */ + public String machineDetails() { + return this.machineDetails; + } + + /** + * Set the machineDetails property: The custom details provided by the customer. + * + * @param machineDetails the machineDetails value to set. + * @return the BareMetalMachineProperties object itself. + */ + public BareMetalMachineProperties withMachineDetails(String machineDetails) { + this.machineDetails = machineDetails; + return this; + } + + /** + * Get the machineName property: The OS-level hostname assigned to this machine. + * + * @return the machineName value. + */ + public String machineName() { + return this.machineName; + } + + /** + * Set the machineName property: The OS-level hostname assigned to this machine. + * + * @param machineName the machineName value to set. + * @return the BareMetalMachineProperties object itself. + */ + public BareMetalMachineProperties withMachineName(String machineName) { + this.machineName = machineName; + return this; + } + + /** + * Get the machineSkuId property: The unique internal identifier of the bare metal machine SKU. + * + * @return the machineSkuId value. + */ + public String machineSkuId() { + return this.machineSkuId; + } + + /** + * Set the machineSkuId property: The unique internal identifier of the bare metal machine SKU. + * + * @param machineSkuId the machineSkuId value to set. + * @return the BareMetalMachineProperties object itself. + */ + public BareMetalMachineProperties withMachineSkuId(String machineSkuId) { + this.machineSkuId = machineSkuId; + return this; + } + + /** + * Get the rackId property: The resource ID of the rack where this bare metal machine resides. + * + * @return the rackId value. + */ + public String rackId() { + return this.rackId; + } + + /** + * Set the rackId property: The resource ID of the rack where this bare metal machine resides. + * + * @param rackId the rackId value to set. + * @return the BareMetalMachineProperties object itself. + */ + public BareMetalMachineProperties withRackId(String rackId) { + this.rackId = rackId; + return this; + } + + /** + * Get the rackSlot property: The rack slot in which this bare metal machine is located, ordered from the bottom up + * i.e. the lowest slot is 1. + * + * @return the rackSlot value. + */ + public long rackSlot() { + return this.rackSlot; + } + + /** + * Set the rackSlot property: The rack slot in which this bare metal machine is located, ordered from the bottom up + * i.e. the lowest slot is 1. + * + * @param rackSlot the rackSlot value to set. + * @return the BareMetalMachineProperties object itself. + */ + public BareMetalMachineProperties withRackSlot(long rackSlot) { + this.rackSlot = rackSlot; + return this; + } + + /** + * Get the serialNumber property: The serial number of the bare metal machine. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Set the serialNumber property: The serial number of the bare metal machine. + * + * @param serialNumber the serialNumber value to set. + * @return the BareMetalMachineProperties object itself. + */ + public BareMetalMachineProperties withSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; + } + + /** + * Get the actionStates property: The current state of any in progress or completed actions. The most recent known + * instance of each action type is shown. + * + * @return the actionStates value. + */ + public List actionStates() { + return this.actionStates; + } + + /** + * Get the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources + * that have attached this network. + * + * @return the associatedResourceIds value. + */ + public List associatedResourceIds() { + return this.associatedResourceIds; + } + + /** + * Get the bmcIpv4Address property: The IPv4 address of the BMC interface for the bare metal machine. + * + * @return the bmcIpv4Address value. + */ + public String bmcIpv4Address() { + return this.bmcIpv4Address; + } + + /** + * Get the bmcIpv6Address property: The IPv6 address of the BMC interface for the bare metal machine. + * + * @return the bmcIpv6Address value. + */ + public String bmcIpv6Address() { + return this.bmcIpv6Address; + } + /** * Get the caCertificate property: The CA certificate information issued by the platform for connecting to TLS * interfaces for the bare metal machine. Callers add this certificate to the trusted CA store on the Kubernetes @@ -434,46 +589,6 @@ public BareMetalMachineProperties withMachineClusterVersion(String machineCluste return this; } - /** - * Get the machineDetails property: The custom details provided by the customer. - * - * @return the machineDetails value. - */ - public String machineDetails() { - return this.machineDetails; - } - - /** - * Set the machineDetails property: The custom details provided by the customer. - * - * @param machineDetails the machineDetails value to set. - * @return the BareMetalMachineProperties object itself. - */ - public BareMetalMachineProperties withMachineDetails(String machineDetails) { - this.machineDetails = machineDetails; - return this; - } - - /** - * Get the machineName property: The OS-level hostname assigned to this machine. - * - * @return the machineName value. - */ - public String machineName() { - return this.machineName; - } - - /** - * Set the machineName property: The OS-level hostname assigned to this machine. - * - * @param machineName the machineName value to set. - * @return the BareMetalMachineProperties object itself. - */ - public BareMetalMachineProperties withMachineName(String machineName) { - this.machineName = machineName; - return this; - } - /** * Get the machineRoles property: The list of roles that are assigned to the cluster node running on this machine. * @@ -484,23 +599,12 @@ public List machineRoles() { } /** - * Get the machineSkuId property: The unique internal identifier of the bare metal machine SKU. + * Get the monitoringConfigurationStatus property: The monitoring configuration status of the bare metal machine. * - * @return the machineSkuId value. - */ - public String machineSkuId() { - return this.machineSkuId; - } - - /** - * Set the machineSkuId property: The unique internal identifier of the bare metal machine SKU. - * - * @param machineSkuId the machineSkuId value to set. - * @return the BareMetalMachineProperties object itself. + * @return the monitoringConfigurationStatus value. */ - public BareMetalMachineProperties withMachineSkuId(String machineSkuId) { - this.machineSkuId = machineSkuId; - return this; + public BareMetalMachineMonitoringConfigurationStatus monitoringConfigurationStatus() { + return this.monitoringConfigurationStatus; } /** @@ -541,57 +645,6 @@ public BareMetalMachinePowerState powerState() { return this.powerState; } - /** - * Get the provisioningState property: The provisioning state of the bare metal machine. - * - * @return the provisioningState value. - */ - public BareMetalMachineProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the rackId property: The resource ID of the rack where this bare metal machine resides. - * - * @return the rackId value. - */ - public String rackId() { - return this.rackId; - } - - /** - * Set the rackId property: The resource ID of the rack where this bare metal machine resides. - * - * @param rackId the rackId value to set. - * @return the BareMetalMachineProperties object itself. - */ - public BareMetalMachineProperties withRackId(String rackId) { - this.rackId = rackId; - return this; - } - - /** - * Get the rackSlot property: The rack slot in which this bare metal machine is located, ordered from the bottom up - * i.e. the lowest slot is 1. - * - * @return the rackSlot value. - */ - public long rackSlot() { - return this.rackSlot; - } - - /** - * Set the rackSlot property: The rack slot in which this bare metal machine is located, ordered from the bottom up - * i.e. the lowest slot is 1. - * - * @param rackSlot the rackSlot value to set. - * @return the BareMetalMachineProperties object itself. - */ - public BareMetalMachineProperties withRackSlot(long rackSlot) { - this.rackSlot = rackSlot; - return this; - } - /** * Get the readyState property: The indicator of whether the bare metal machine is ready to receive workloads. * @@ -619,26 +672,6 @@ public List secretRotationStatus() { return this.secretRotationStatus; } - /** - * Get the serialNumber property: The serial number of the bare metal machine. - * - * @return the serialNumber value. - */ - public String serialNumber() { - return this.serialNumber; - } - - /** - * Set the serialNumber property: The serial number of the bare metal machine. - * - * @param serialNumber the serialNumber value to set. - * @return the BareMetalMachineProperties object itself. - */ - public BareMetalMachineProperties withSerialNumber(String serialNumber) { - this.serialNumber = serialNumber; - return this; - } - /** * Get the serviceTag property: The discovered value of the machine's service tag. * @@ -659,79 +692,13 @@ public List virtualMachinesAssociatedIds() { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (actionStates() != null) { - actionStates().forEach(e -> e.validate()); - } - if (bmcConnectionString() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property bmcConnectionString in model BareMetalMachineProperties")); - } - if (bmcCredentials() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property bmcCredentials in model BareMetalMachineProperties")); - } else { - bmcCredentials().validate(); - } - if (bmcMacAddress() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property bmcMacAddress in model BareMetalMachineProperties")); - } - if (bootMacAddress() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property bootMacAddress in model BareMetalMachineProperties")); - } - if (caCertificate() != null) { - caCertificate().validate(); - } - if (hardwareInventory() != null) { - hardwareInventory().validate(); - } - if (hardwareValidationStatus() != null) { - hardwareValidationStatus().validate(); - } - if (machineDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property machineDetails in model BareMetalMachineProperties")); - } - if (machineName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property machineName in model BareMetalMachineProperties")); - } - if (machineSkuId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property machineSkuId in model BareMetalMachineProperties")); - } - if (rackId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property rackId in model BareMetalMachineProperties")); - } - if (runtimeProtectionStatus() != null) { - runtimeProtectionStatus().validate(); - } - if (secretRotationStatus() != null) { - secretRotationStatus().forEach(e -> e.validate()); - } - if (serialNumber() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property serialNumber in model BareMetalMachineProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BareMetalMachineProperties.class); + * Get the provisioningState property: The provisioning state of the bare metal machine. + * + * @return the provisioningState value. + */ + public BareMetalMachineProvisioningState provisioningState() { + return this.provisioningState; + } /** * {@inheritDoc} @@ -795,6 +762,10 @@ public static BareMetalMachineProperties fromJson(JsonReader jsonReader) throws } else if ("associatedResourceIds".equals(fieldName)) { List associatedResourceIds = reader.readArray(reader1 -> reader1.getString()); deserializedBareMetalMachineProperties.associatedResourceIds = associatedResourceIds; + } else if ("bmcIpv4Address".equals(fieldName)) { + deserializedBareMetalMachineProperties.bmcIpv4Address = reader.getString(); + } else if ("bmcIpv6Address".equals(fieldName)) { + deserializedBareMetalMachineProperties.bmcIpv6Address = reader.getString(); } else if ("caCertificate".equals(fieldName)) { deserializedBareMetalMachineProperties.caCertificate = CertificateInfo.fromJson(reader); } else if ("clusterId".equals(fieldName)) { @@ -825,6 +796,9 @@ public static BareMetalMachineProperties fromJson(JsonReader jsonReader) throws } else if ("machineRoles".equals(fieldName)) { List machineRoles = reader.readArray(reader1 -> reader1.getString()); deserializedBareMetalMachineProperties.machineRoles = machineRoles; + } else if ("monitoringConfigurationStatus".equals(fieldName)) { + deserializedBareMetalMachineProperties.monitoringConfigurationStatus + = BareMetalMachineMonitoringConfigurationStatus.fromJson(reader); } else if ("oamIpv4Address".equals(fieldName)) { deserializedBareMetalMachineProperties.oamIpv4Address = reader.getString(); } else if ("oamIpv6Address".equals(fieldName)) { @@ -834,9 +808,6 @@ public static BareMetalMachineProperties fromJson(JsonReader jsonReader) throws } else if ("powerState".equals(fieldName)) { deserializedBareMetalMachineProperties.powerState = BareMetalMachinePowerState.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedBareMetalMachineProperties.provisioningState - = BareMetalMachineProvisioningState.fromString(reader.getString()); } else if ("readyState".equals(fieldName)) { deserializedBareMetalMachineProperties.readyState = BareMetalMachineReadyState.fromString(reader.getString()); @@ -852,6 +823,9 @@ public static BareMetalMachineProperties fromJson(JsonReader jsonReader) throws } else if ("virtualMachinesAssociatedIds".equals(fieldName)) { List virtualMachinesAssociatedIds = reader.readArray(reader1 -> reader1.getString()); deserializedBareMetalMachineProperties.virtualMachinesAssociatedIds = virtualMachinesAssociatedIds; + } else if ("provisioningState".equals(fieldName)) { + deserializedBareMetalMachineProperties.provisioningState + = BareMetalMachineProvisioningState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BmcKeySetInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BmcKeySetInner.java index f46a59f1bb41..739a39821163 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BmcKeySetInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BmcKeySetInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -28,19 +27,20 @@ @Fluent public final class BmcKeySetInner extends Resource { /* - * Resource ETag. + * The list of the resource properties. */ - private String etag; + private BmcKeySetProperties innerProperties = new BmcKeySetProperties(); /* - * The extended location of the cluster associated with the resource. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private ExtendedLocation extendedLocation; + private String etag; /* - * The list of the resource properties. + * The extended location of the resource. This property is required when creating the resource. */ - private BmcKeySetProperties innerProperties = new BmcKeySetProperties(); + private ExtendedLocation extendedLocation; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -69,7 +69,19 @@ public BmcKeySetInner() { } /** - * Get the etag property: Resource ETag. + * Get the innerProperties property: The list of the resource properties. + * + * @return the innerProperties value. + */ + private BmcKeySetProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ @@ -78,7 +90,8 @@ public String etag() { } /** - * Get the extendedLocation property: The extended location of the cluster associated with the resource. + * Get the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @return the extendedLocation value. */ @@ -87,7 +100,8 @@ public ExtendedLocation extendedLocation() { } /** - * Set the extendedLocation property: The extended location of the cluster associated with the resource. + * Set the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @param extendedLocation the extendedLocation value to set. * @return the BmcKeySetInner object itself. @@ -97,15 +111,6 @@ public BmcKeySetInner withExtendedLocation(ExtendedLocation extendedLocation) { return this; } - /** - * Get the innerProperties property: The list of the resource properties. - * - * @return the innerProperties value. - */ - private BmcKeySetProperties innerProperties() { - return this.innerProperties; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -188,24 +193,6 @@ public BmcKeySetInner withAzureGroupId(String azureGroupId) { return this; } - /** - * Get the detailedStatus property: The more detailed status of the key set. - * - * @return the detailedStatus value. - */ - public BmcKeySetDetailedStatus detailedStatus() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); - } - - /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); - } - /** * Get the expiration property: The date and time after which the users in this key set will be removed from the * baseboard management controllers. @@ -231,15 +218,6 @@ public BmcKeySetInner withExpiration(OffsetDateTime expiration) { return this; } - /** - * Get the lastValidation property: The last time this key set was validated. - * - * @return the lastValidation value. - */ - public OffsetDateTime lastValidation() { - return this.innerProperties() == null ? null : this.innerProperties().lastValidation(); - } - /** * Get the privilegeLevel property: The access level allowed for the users in this key set. * @@ -263,15 +241,6 @@ public BmcKeySetInner withPrivilegeLevel(BmcKeySetPrivilegeLevel privilegeLevel) return this; } - /** - * Get the provisioningState property: The provisioning state of the baseboard management controller key set. - * - * @return the provisioningState value. - */ - public BmcKeySetProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - /** * Get the userList property: The unique list of permitted users. * @@ -295,6 +264,33 @@ public BmcKeySetInner withUserList(List userList) { return this; } + /** + * Get the detailedStatus property: The more detailed status of the key set. + * + * @return the detailedStatus value. + */ + public BmcKeySetDetailedStatus detailedStatus() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); + } + + /** + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); + } + + /** + * Get the lastValidation property: The last time this key set was validated. + * + * @return the lastValidation value. + */ + public OffsetDateTime lastValidation() { + return this.innerProperties() == null ? null : this.innerProperties().lastValidation(); + } + /** * Get the userListStatus property: The status evaluation of each user. * @@ -305,28 +301,14 @@ public List userListStatus() { } /** - * Validates the instance. + * Get the provisioningState property: The provisioning state of the baseboard management controller key set. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (extendedLocation() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property extendedLocation in model BmcKeySetInner")); - } else { - extendedLocation().validate(); - } - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property innerProperties in model BmcKeySetInner")); - } else { - innerProperties().validate(); - } + * @return the provisioningState value. + */ + public BmcKeySetProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - private static final ClientLogger LOGGER = new ClientLogger(BmcKeySetInner.class); - /** * {@inheritDoc} */ @@ -335,8 +317,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); return jsonWriter.writeEndObject(); } @@ -367,10 +349,10 @@ public static BmcKeySetInner fromJson(JsonReader jsonReader) throws IOException } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedBmcKeySetInner.withTags(tags); - } else if ("extendedLocation".equals(fieldName)) { - deserializedBmcKeySetInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedBmcKeySetInner.innerProperties = BmcKeySetProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedBmcKeySetInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedBmcKeySetInner.etag = reader.getString(); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BmcKeySetPatchProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BmcKeySetPatchProperties.java index 69b7afc6c711..bef2ae3ee170 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BmcKeySetPatchProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BmcKeySetPatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -80,17 +80,6 @@ public BmcKeySetPatchProperties withUserList(List userList) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userList() != null) { - userList().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BmcKeySetProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BmcKeySetProperties.java index 3229d85589af..a9088ef2a5ed 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BmcKeySetProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BmcKeySetProperties.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -33,45 +32,45 @@ public final class BmcKeySetProperties implements JsonSerializable userList; /* - * The last time this key set was validated. + * The more detailed status of the key set. */ - private OffsetDateTime lastValidation; + private BmcKeySetDetailedStatus detailedStatus; /* - * The access level allowed for the users in this key set. + * The descriptive message about the current detailed status. */ - private BmcKeySetPrivilegeLevel privilegeLevel; + private String detailedStatusMessage; /* - * The provisioning state of the baseboard management controller key set. + * The last time this key set was validated. */ - private BmcKeySetProvisioningState provisioningState; + private OffsetDateTime lastValidation; /* - * The unique list of permitted users. + * The status evaluation of each user. */ - private List userList; + private List userListStatus; /* - * The status evaluation of each user. + * The provisioning state of the baseboard management controller key set. */ - private List userListStatus; + private BmcKeySetProvisioningState provisioningState; /** * Creates an instance of BmcKeySetProperties class. @@ -101,24 +100,6 @@ public BmcKeySetProperties withAzureGroupId(String azureGroupId) { return this; } - /** - * Get the detailedStatus property: The more detailed status of the key set. - * - * @return the detailedStatus value. - */ - public BmcKeySetDetailedStatus detailedStatus() { - return this.detailedStatus; - } - - /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.detailedStatusMessage; - } - /** * Get the expiration property: The date and time after which the users in this key set will be removed from the * baseboard management controllers. @@ -141,15 +122,6 @@ public BmcKeySetProperties withExpiration(OffsetDateTime expiration) { return this; } - /** - * Get the lastValidation property: The last time this key set was validated. - * - * @return the lastValidation value. - */ - public OffsetDateTime lastValidation() { - return this.lastValidation; - } - /** * Get the privilegeLevel property: The access level allowed for the users in this key set. * @@ -170,15 +142,6 @@ public BmcKeySetProperties withPrivilegeLevel(BmcKeySetPrivilegeLevel privilegeL return this; } - /** - * Get the provisioningState property: The provisioning state of the baseboard management controller key set. - * - * @return the provisioningState value. - */ - public BmcKeySetProvisioningState provisioningState() { - return this.provisioningState; - } - /** * Get the userList property: The unique list of permitted users. * @@ -199,6 +162,33 @@ public BmcKeySetProperties withUserList(List userList) { return this; } + /** + * Get the detailedStatus property: The more detailed status of the key set. + * + * @return the detailedStatus value. + */ + public BmcKeySetDetailedStatus detailedStatus() { + return this.detailedStatus; + } + + /** + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.detailedStatusMessage; + } + + /** + * Get the lastValidation property: The last time this key set was validated. + * + * @return the lastValidation value. + */ + public OffsetDateTime lastValidation() { + return this.lastValidation; + } + /** * Get the userListStatus property: The status evaluation of each user. * @@ -209,38 +199,14 @@ public List userListStatus() { } /** - * Validates the instance. + * Get the provisioningState property: The provisioning state of the baseboard management controller key set. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - public void validate() { - if (azureGroupId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property azureGroupId in model BmcKeySetProperties")); - } - if (expiration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property expiration in model BmcKeySetProperties")); - } - if (privilegeLevel() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property privilegeLevel in model BmcKeySetProperties")); - } - if (userList() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property userList in model BmcKeySetProperties")); - } else { - userList().forEach(e -> e.validate()); - } - if (userListStatus() != null) { - userListStatus().forEach(e -> e.validate()); - } + public BmcKeySetProvisioningState provisioningState() { + return this.provisioningState; } - private static final ClientLogger LOGGER = new ClientLogger(BmcKeySetProperties.class); - /** * {@inheritDoc} */ @@ -291,13 +257,13 @@ public static BmcKeySetProperties fromJson(JsonReader jsonReader) throws IOExcep } else if ("lastValidation".equals(fieldName)) { deserializedBmcKeySetProperties.lastValidation = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedBmcKeySetProperties.provisioningState - = BmcKeySetProvisioningState.fromString(reader.getString()); } else if ("userListStatus".equals(fieldName)) { List userListStatus = reader.readArray(reader1 -> KeySetUserStatus.fromJson(reader1)); deserializedBmcKeySetProperties.userListStatus = userListStatus; + } else if ("provisioningState".equals(fieldName)) { + deserializedBmcKeySetProperties.provisioningState + = BmcKeySetProvisioningState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkInner.java index 4c96f2b1e82e..3ba33fc0767f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -23,9 +22,6 @@ import java.util.Map; /** - * CloudServicesNetwork represents additional egress information that will be used by associated virtual machines or - * hybrid AKS clusters. - * * Upon creation, the additional services that are provided by the platform will be allocated and represented in the * status of this resource. All resources associated with this cloud services network will be part of the same layer 2 * (L2) isolation domain. At least one service network must be created but may be reused across many virtual machines @@ -34,19 +30,20 @@ @Fluent public final class CloudServicesNetworkInner extends Resource { /* - * Resource ETag. + * The list of the resource properties. */ - private String etag; + private CloudServicesNetworkProperties innerProperties; /* - * The extended location of the cluster associated with the resource. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private ExtendedLocation extendedLocation; + private String etag; /* - * The list of the resource properties. + * The extended location of the resource. This property is required when creating the resource. */ - private CloudServicesNetworkProperties innerProperties; + private ExtendedLocation extendedLocation; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -75,7 +72,19 @@ public CloudServicesNetworkInner() { } /** - * Get the etag property: Resource ETag. + * Get the innerProperties property: The list of the resource properties. + * + * @return the innerProperties value. + */ + private CloudServicesNetworkProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ @@ -84,7 +93,8 @@ public String etag() { } /** - * Get the extendedLocation property: The extended location of the cluster associated with the resource. + * Get the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @return the extendedLocation value. */ @@ -93,7 +103,8 @@ public ExtendedLocation extendedLocation() { } /** - * Set the extendedLocation property: The extended location of the cluster associated with the resource. + * Set the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @param extendedLocation the extendedLocation value to set. * @return the CloudServicesNetworkInner object itself. @@ -103,15 +114,6 @@ public CloudServicesNetworkInner withExtendedLocation(ExtendedLocation extendedL return this; } - /** - * Get the innerProperties property: The list of the resource properties. - * - * @return the innerProperties value. - */ - private CloudServicesNetworkProperties innerProperties() { - return this.innerProperties; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -194,6 +196,55 @@ public CloudServicesNetworkInner withAdditionalEgressEndpoints(List virtualMachinesAssociatedIds() { } /** - * Validates the instance. + * Get the provisioningState property: The provisioning state of the cloud services network. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (extendedLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property extendedLocation in model CloudServicesNetworkInner")); - } else { - extendedLocation().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } + * @return the provisioningState value. + */ + public CloudServicesNetworkProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - private static final ClientLogger LOGGER = new ClientLogger(CloudServicesNetworkInner.class); - /** * {@inheritDoc} */ @@ -402,11 +384,11 @@ public static CloudServicesNetworkInner fromJson(JsonReader jsonReader) throws I deserializedCloudServicesNetworkInner.withTags(tags); } else if ("extendedLocation".equals(fieldName)) { deserializedCloudServicesNetworkInner.extendedLocation = ExtendedLocation.fromJson(reader); - } else if ("etag".equals(fieldName)) { - deserializedCloudServicesNetworkInner.etag = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedCloudServicesNetworkInner.innerProperties = CloudServicesNetworkProperties.fromJson(reader); + } else if ("etag".equals(fieldName)) { + deserializedCloudServicesNetworkInner.etag = reader.getString(); } else if ("systemData".equals(fieldName)) { deserializedCloudServicesNetworkInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkPatchProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkPatchProperties.java index 16faa9c135dc..60d2d6c1e98d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkPatchProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkPatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -110,20 +110,6 @@ public CloudServicesNetworkStorageOptionsPatch storageOptions() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (additionalEgressEndpoints() != null) { - additionalEgressEndpoints().forEach(e -> e.validate()); - } - if (storageOptions() != null) { - storageOptions().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkProperties.java index 222c80ef50dd..7e4c75bc5ef1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -28,6 +28,16 @@ public final class CloudServicesNetworkProperties implements JsonSerializable additionalEgressEndpoints; + /* + * The indicator of whether the platform default endpoints are allowed for the egress traffic. + */ + private CloudServicesNetworkEnableDefaultEgressEndpoints enableDefaultEgressEndpoints; + + /* + * The storage options for the cloud services network. + */ + private CloudServicesNetworkStorageOptions storageOptions; + /* * The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. */ @@ -48,11 +58,6 @@ public final class CloudServicesNetworkProperties implements JsonSerializable virtualMachinesAssociatedIds; + /* + * The provisioning state of the cloud services network. + */ + private CloudServicesNetworkProvisioningState provisioningState; + /** * Creates an instance of CloudServicesNetworkProperties class. */ @@ -119,6 +119,49 @@ public List additionalEgressEndpoints() { return this; } + /** + * Get the enableDefaultEgressEndpoints property: The indicator of whether the platform default endpoints are + * allowed for the egress traffic. + * + * @return the enableDefaultEgressEndpoints value. + */ + public CloudServicesNetworkEnableDefaultEgressEndpoints enableDefaultEgressEndpoints() { + return this.enableDefaultEgressEndpoints; + } + + /** + * Set the enableDefaultEgressEndpoints property: The indicator of whether the platform default endpoints are + * allowed for the egress traffic. + * + * @param enableDefaultEgressEndpoints the enableDefaultEgressEndpoints value to set. + * @return the CloudServicesNetworkProperties object itself. + */ + public CloudServicesNetworkProperties withEnableDefaultEgressEndpoints( + CloudServicesNetworkEnableDefaultEgressEndpoints enableDefaultEgressEndpoints) { + this.enableDefaultEgressEndpoints = enableDefaultEgressEndpoints; + return this; + } + + /** + * Get the storageOptions property: The storage options for the cloud services network. + * + * @return the storageOptions value. + */ + public CloudServicesNetworkStorageOptions storageOptions() { + return this.storageOptions; + } + + /** + * Set the storageOptions property: The storage options for the cloud services network. + * + * @param storageOptions the storageOptions value to set. + * @return the CloudServicesNetworkProperties object itself. + */ + public CloudServicesNetworkProperties withStorageOptions(CloudServicesNetworkStorageOptions storageOptions) { + this.storageOptions = storageOptions; + return this; + } + /** * Get the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources * that have attached this network. @@ -157,29 +200,6 @@ public String detailedStatusMessage() { return this.detailedStatusMessage; } - /** - * Get the enableDefaultEgressEndpoints property: The indicator of whether the platform default endpoints are - * allowed for the egress traffic. - * - * @return the enableDefaultEgressEndpoints value. - */ - public CloudServicesNetworkEnableDefaultEgressEndpoints enableDefaultEgressEndpoints() { - return this.enableDefaultEgressEndpoints; - } - - /** - * Set the enableDefaultEgressEndpoints property: The indicator of whether the platform default endpoints are - * allowed for the egress traffic. - * - * @param enableDefaultEgressEndpoints the enableDefaultEgressEndpoints value to set. - * @return the CloudServicesNetworkProperties object itself. - */ - public CloudServicesNetworkProperties withEnableDefaultEgressEndpoints( - CloudServicesNetworkEnableDefaultEgressEndpoints enableDefaultEgressEndpoints) { - this.enableDefaultEgressEndpoints = enableDefaultEgressEndpoints; - return this; - } - /** * Get the enabledEgressEndpoints property: The full list of additional and default egress endpoints that are * currently enabled. @@ -210,35 +230,6 @@ public String interfaceName() { return this.interfaceName; } - /** - * Get the provisioningState property: The provisioning state of the cloud services network. - * - * @return the provisioningState value. - */ - public CloudServicesNetworkProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the storageOptions property: The storage options for the cloud services network. - * - * @return the storageOptions value. - */ - public CloudServicesNetworkStorageOptions storageOptions() { - return this.storageOptions; - } - - /** - * Set the storageOptions property: The storage options for the cloud services network. - * - * @param storageOptions the storageOptions value to set. - * @return the CloudServicesNetworkProperties object itself. - */ - public CloudServicesNetworkProperties withStorageOptions(CloudServicesNetworkStorageOptions storageOptions) { - this.storageOptions = storageOptions; - return this; - } - /** * Get the storageStatus property: The storage status for the cloud services network. * @@ -260,23 +251,12 @@ public List virtualMachinesAssociatedIds() { } /** - * Validates the instance. + * Get the provisioningState property: The provisioning state of the cloud services network. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (additionalEgressEndpoints() != null) { - additionalEgressEndpoints().forEach(e -> e.validate()); - } - if (enabledEgressEndpoints() != null) { - enabledEgressEndpoints().forEach(e -> e.validate()); - } - if (storageOptions() != null) { - storageOptions().validate(); - } - if (storageStatus() != null) { - storageStatus().validate(); - } + * @return the provisioningState value. + */ + public CloudServicesNetworkProvisioningState provisioningState() { + return this.provisioningState; } /** @@ -313,6 +293,12 @@ public static CloudServicesNetworkProperties fromJson(JsonReader jsonReader) thr List additionalEgressEndpoints = reader.readArray(reader1 -> EgressEndpoint.fromJson(reader1)); deserializedCloudServicesNetworkProperties.additionalEgressEndpoints = additionalEgressEndpoints; + } else if ("enableDefaultEgressEndpoints".equals(fieldName)) { + deserializedCloudServicesNetworkProperties.enableDefaultEgressEndpoints + = CloudServicesNetworkEnableDefaultEgressEndpoints.fromString(reader.getString()); + } else if ("storageOptions".equals(fieldName)) { + deserializedCloudServicesNetworkProperties.storageOptions + = CloudServicesNetworkStorageOptions.fromJson(reader); } else if ("associatedResourceIds".equals(fieldName)) { List associatedResourceIds = reader.readArray(reader1 -> reader1.getString()); deserializedCloudServicesNetworkProperties.associatedResourceIds = associatedResourceIds; @@ -323,9 +309,6 @@ public static CloudServicesNetworkProperties fromJson(JsonReader jsonReader) thr = CloudServicesNetworkDetailedStatus.fromString(reader.getString()); } else if ("detailedStatusMessage".equals(fieldName)) { deserializedCloudServicesNetworkProperties.detailedStatusMessage = reader.getString(); - } else if ("enableDefaultEgressEndpoints".equals(fieldName)) { - deserializedCloudServicesNetworkProperties.enableDefaultEgressEndpoints - = CloudServicesNetworkEnableDefaultEgressEndpoints.fromString(reader.getString()); } else if ("enabledEgressEndpoints".equals(fieldName)) { List enabledEgressEndpoints = reader.readArray(reader1 -> EgressEndpoint.fromJson(reader1)); @@ -336,12 +319,6 @@ public static CloudServicesNetworkProperties fromJson(JsonReader jsonReader) thr = hybridAksClustersAssociatedIds; } else if ("interfaceName".equals(fieldName)) { deserializedCloudServicesNetworkProperties.interfaceName = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedCloudServicesNetworkProperties.provisioningState - = CloudServicesNetworkProvisioningState.fromString(reader.getString()); - } else if ("storageOptions".equals(fieldName)) { - deserializedCloudServicesNetworkProperties.storageOptions - = CloudServicesNetworkStorageOptions.fromJson(reader); } else if ("storageStatus".equals(fieldName)) { deserializedCloudServicesNetworkProperties.storageStatus = CloudServicesNetworkStorageStatus.fromJson(reader); @@ -349,6 +326,9 @@ public static CloudServicesNetworkProperties fromJson(JsonReader jsonReader) thr List virtualMachinesAssociatedIds = reader.readArray(reader1 -> reader1.getString()); deserializedCloudServicesNetworkProperties.virtualMachinesAssociatedIds = virtualMachinesAssociatedIds; + } else if ("provisioningState".equals(fieldName)) { + deserializedCloudServicesNetworkProperties.provisioningState + = CloudServicesNetworkProvisioningState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterInner.java index 47bd22131f87..85dd9742eb1a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -23,6 +22,7 @@ import com.azure.resourcemanager.networkcloud.models.ClusterType; import com.azure.resourcemanager.networkcloud.models.ClusterUpdateStrategy; import com.azure.resourcemanager.networkcloud.models.CommandOutputSettings; +import com.azure.resourcemanager.networkcloud.models.DeploymentType; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; import com.azure.resourcemanager.networkcloud.models.ManagedResourceGroupConfiguration; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentity; @@ -33,6 +33,7 @@ import com.azure.resourcemanager.networkcloud.models.ValidationThreshold; import com.azure.resourcemanager.networkcloud.models.VulnerabilityScanningSettings; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.List; import java.util.Map; @@ -42,24 +43,32 @@ @Fluent public final class ClusterInner extends Resource { /* - * Resource ETag. + * The list of the resource properties. + */ + private ClusterProperties innerProperties = new ClusterProperties(); + + /* + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ private String etag; /* - * The extended location of the cluster manager associated with the cluster. + * The extended location of the resource. This property is required when creating the resource. */ private ExtendedLocation extendedLocation; /* - * The identity for the resource. + * The managed service identities assigned to this resource. */ private ManagedServiceIdentity identity; /* - * The list of the resource properties. + * The type (kind) of the cluster. When specified, the value must exactly match the kind configured on the cluster + * manager that manages the cluster. If omitted, the service will default the value to the kind value of the cluster + * manager. */ - private ClusterProperties innerProperties = new ClusterProperties(); + private DeploymentType kind; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -88,7 +97,19 @@ public ClusterInner() { } /** - * Get the etag property: Resource ETag. + * Get the innerProperties property: The list of the resource properties. + * + * @return the innerProperties value. + */ + private ClusterProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ @@ -97,7 +118,8 @@ public String etag() { } /** - * Get the extendedLocation property: The extended location of the cluster manager associated with the cluster. + * Get the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @return the extendedLocation value. */ @@ -106,7 +128,8 @@ public ExtendedLocation extendedLocation() { } /** - * Set the extendedLocation property: The extended location of the cluster manager associated with the cluster. + * Set the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @param extendedLocation the extendedLocation value to set. * @return the ClusterInner object itself. @@ -117,7 +140,7 @@ public ClusterInner withExtendedLocation(ExtendedLocation extendedLocation) { } /** - * Get the identity property: The identity for the resource. + * Get the identity property: The managed service identities assigned to this resource. * * @return the identity value. */ @@ -126,7 +149,7 @@ public ManagedServiceIdentity identity() { } /** - * Set the identity property: The identity for the resource. + * Set the identity property: The managed service identities assigned to this resource. * * @param identity the identity value to set. * @return the ClusterInner object itself. @@ -137,12 +160,27 @@ public ClusterInner withIdentity(ManagedServiceIdentity identity) { } /** - * Get the innerProperties property: The list of the resource properties. + * Get the kind property: The type (kind) of the cluster. When specified, the value must exactly match the kind + * configured on the cluster manager that manages the cluster. If omitted, the service will default the value to the + * kind value of the cluster manager. * - * @return the innerProperties value. + * @return the kind value. */ - private ClusterProperties innerProperties() { - return this.innerProperties; + public DeploymentType kind() { + return this.kind; + } + + /** + * Set the kind property: The type (kind) of the cluster. When specified, the value must exactly match the kind + * configured on the cluster manager that manages the cluster. If omitted, the service will default the value to the + * kind value of the cluster manager. + * + * @param kind the kind value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withKind(DeploymentType kind) { + this.kind = kind; + return this; } /** @@ -202,16 +240,6 @@ public ClusterInner withTags(Map tags) { return this; } - /** - * Get the actionStates property: The current state of any in progress or completed actions. The most recent known - * instance of each action type is shown. - * - * @return the actionStates value. - */ - public List actionStates() { - return this.innerProperties() == null ? null : this.innerProperties().actionStates(); - } - /** * Get the aggregatorOrSingleRackDefinition property: The rack definition that is intended to reflect only a single * rack in a single rack cluster, or an aggregator rack in a multi-rack cluster. @@ -287,46 +315,6 @@ public ClusterInner withAnalyticsWorkspaceId(String analyticsWorkspaceId) { return this; } - /** - * Get the availableUpgradeVersions property: The list of cluster runtime version upgrades available for this - * cluster. - * - * @return the availableUpgradeVersions value. - */ - public List availableUpgradeVersions() { - return this.innerProperties() == null ? null : this.innerProperties().availableUpgradeVersions(); - } - - /** - * Get the clusterCapacity property: The capacity supported by this cluster. - * - * @return the clusterCapacity value. - */ - public ClusterCapacity clusterCapacity() { - return this.innerProperties() == null ? null : this.innerProperties().clusterCapacity(); - } - - /** - * Get the clusterConnectionStatus property: The latest heartbeat status between the cluster manager and the - * cluster. - * - * @return the clusterConnectionStatus value. - */ - public ClusterConnectionStatus clusterConnectionStatus() { - return this.innerProperties() == null ? null : this.innerProperties().clusterConnectionStatus(); - } - - /** - * Get the clusterExtendedLocation property: The extended location (custom location) that represents the cluster's - * control plane location. This extended location is used to route the requests of child objects of the cluster that - * are handled by the platform operator. - * - * @return the clusterExtendedLocation value. - */ - public ExtendedLocation clusterExtendedLocation() { - return this.innerProperties() == null ? null : this.innerProperties().clusterExtendedLocation(); - } - /** * Get the clusterLocation property: The customer-provided location information to identify where the cluster * resides. @@ -352,26 +340,6 @@ public ClusterInner withClusterLocation(String clusterLocation) { return this; } - /** - * Get the clusterManagerConnectionStatus property: The latest connectivity status between cluster manager and the - * cluster. - * - * @return the clusterManagerConnectionStatus value. - */ - public ClusterManagerConnectionStatus clusterManagerConnectionStatus() { - return this.innerProperties() == null ? null : this.innerProperties().clusterManagerConnectionStatus(); - } - - /** - * Get the clusterManagerId property: The resource ID of the cluster manager that manages this cluster. This is set - * by the Cluster Manager when the cluster is created. - * - * @return the clusterManagerId value. - */ - public String clusterManagerId() { - return this.innerProperties() == null ? null : this.innerProperties().clusterManagerId(); - } - /** * Get the clusterServicePrincipal property: Field Deprecated: Use managed identity to provide cluster privileges. * The service principal to be used by the cluster during Arc Appliance installation. @@ -518,35 +486,6 @@ public ClusterInner withComputeRackDefinitions(List computeRackD return this; } - /** - * Get the detailedStatus property: The current detailed status of the cluster. - * - * @return the detailedStatus value. - */ - public ClusterDetailedStatus detailedStatus() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); - } - - /** - * Get the detailedStatusMessage property: The descriptive message about the detailed status. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); - } - - /** - * Get the hybridAksExtendedLocation property: Field Deprecated. This field will not be populated in an upcoming - * version. The extended location (custom location) that represents the Hybrid AKS control plane location. This - * extended location is used when creating provisioned clusters (Hybrid AKS clusters). - * - * @return the hybridAksExtendedLocation value. - */ - public ExtendedLocation hybridAksExtendedLocation() { - return this.innerProperties() == null ? null : this.innerProperties().hybridAksExtendedLocation(); - } - /** * Get the managedResourceGroupConfiguration property: The configuration of the managed resource group associated * with the resource. @@ -573,15 +512,6 @@ public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { return this; } - /** - * Get the manualActionCount property: The count of Manual Action Taken (MAT) events that have not been validated. - * - * @return the manualActionCount value. - */ - public Long manualActionCount() { - return this.innerProperties() == null ? null : this.innerProperties().manualActionCount(); - } - /** * Get the networkFabricId property: The resource ID of the Network Fabric associated with the cluster. * @@ -605,15 +535,6 @@ public ClusterInner withNetworkFabricId(String networkFabricId) { return this; } - /** - * Get the provisioningState property: The provisioning state of the cluster. - * - * @return the provisioningState value. - */ - public ClusterProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - /** * Get the runtimeProtectionConfiguration property: The settings for cluster runtime protection. * @@ -688,15 +609,6 @@ public ClusterInner withSecretArchiveSettings(SecretArchiveSettings secretArchiv return this; } - /** - * Get the supportExpiryDate property: The support end date of the runtime version of the cluster. - * - * @return the supportExpiryDate value. - */ - public String supportExpiryDate() { - return this.innerProperties() == null ? null : this.innerProperties().supportExpiryDate(); - } - /** * Get the updateStrategy property: The strategy for updating the cluster. * @@ -745,6 +657,143 @@ public ClusterInner withVulnerabilityScanningSettings(VulnerabilityScanningSetti return this; } + /** + * Get the actionStates property: The current state of any in progress or completed actions. The most recent known + * instance of each action type is shown. + * + * @return the actionStates value. + */ + public List actionStates() { + return this.innerProperties() == null ? null : this.innerProperties().actionStates(); + } + + /** + * Get the availableUpgradeVersions property: The list of cluster runtime version upgrades available for this + * cluster. + * + * @return the availableUpgradeVersions value. + */ + public List availableUpgradeVersions() { + return this.innerProperties() == null ? null : this.innerProperties().availableUpgradeVersions(); + } + + /** + * Get the clusterCapacity property: The capacity supported by this cluster. + * + * @return the clusterCapacity value. + */ + public ClusterCapacity clusterCapacity() { + return this.innerProperties() == null ? null : this.innerProperties().clusterCapacity(); + } + + /** + * Get the clusterConnectionStatus property: The latest heartbeat status between the cluster manager and the + * cluster. + * + * @return the clusterConnectionStatus value. + */ + public ClusterConnectionStatus clusterConnectionStatus() { + return this.innerProperties() == null ? null : this.innerProperties().clusterConnectionStatus(); + } + + /** + * Get the clusterExtendedLocation property: The extended location (custom location) that represents the cluster's + * control plane location. This extended location is used to route the requests of child objects of the cluster that + * are handled by the platform operator. + * + * @return the clusterExtendedLocation value. + */ + public ExtendedLocation clusterExtendedLocation() { + return this.innerProperties() == null ? null : this.innerProperties().clusterExtendedLocation(); + } + + /** + * Get the clusterManagerConnectionStatus property: The latest connectivity status between cluster manager and the + * cluster. + * + * @return the clusterManagerConnectionStatus value. + */ + public ClusterManagerConnectionStatus clusterManagerConnectionStatus() { + return this.innerProperties() == null ? null : this.innerProperties().clusterManagerConnectionStatus(); + } + + /** + * Get the clusterManagerId property: The resource ID of the cluster manager that manages this cluster. This is set + * by the Cluster Manager when the cluster is created. + * + * @return the clusterManagerId value. + */ + public String clusterManagerId() { + return this.innerProperties() == null ? null : this.innerProperties().clusterManagerId(); + } + + /** + * Get the detailedStatus property: The current detailed status of the cluster. + * + * @return the detailedStatus value. + */ + public ClusterDetailedStatus detailedStatus() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); + } + + /** + * Get the detailedStatusMessage property: The descriptive message about the detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); + } + + /** + * Get the hybridAksExtendedLocation property: Field Deprecated. This field will not be populated in an upcoming + * version. The extended location (custom location) that represents the Hybrid AKS control plane location. This + * extended location is used when creating provisioned clusters (Hybrid AKS clusters). + * + * @return the hybridAksExtendedLocation value. + */ + public ExtendedLocation hybridAksExtendedLocation() { + return this.innerProperties() == null ? null : this.innerProperties().hybridAksExtendedLocation(); + } + + /** + * Get the lastSuccessfulVersionUpdateTime property: The date and time of the end of the last successful version + * update for the cluster. + * + * @return the lastSuccessfulVersionUpdateTime value. + */ + public OffsetDateTime lastSuccessfulVersionUpdateTime() { + return this.innerProperties() == null ? null : this.innerProperties().lastSuccessfulVersionUpdateTime(); + } + + /** + * Get the managedCredentials property: The list of credentials that are managed for the cluster and can be rotated + * on-demand. + * + * @return the managedCredentials value. + */ + public List managedCredentials() { + return this.innerProperties() == null ? null : this.innerProperties().managedCredentials(); + } + + /** + * Get the manualActionCount property: The count of Manual Action Taken (MAT) events that have not been validated. + * + * @return the manualActionCount value. + */ + public Long manualActionCount() { + return this.innerProperties() == null ? null : this.innerProperties().manualActionCount(); + } + + /** + * Get the supportExpiryDate property: The support end date of the runtime version of the cluster. + * + * @return the supportExpiryDate value. + */ + public String supportExpiryDate() { + return this.innerProperties() == null ? null : this.innerProperties().supportExpiryDate(); + } + /** * Get the workloadResourceIds property: The list of workload resource IDs that are hosted within this cluster. * @@ -755,30 +804,14 @@ public List workloadResourceIds() { } /** - * Validates the instance. + * Get the provisioningState property: The provisioning state of the cluster. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - public void validate() { - if (extendedLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property extendedLocation in model ClusterInner")); - } else { - extendedLocation().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property innerProperties in model ClusterInner")); - } else { - innerProperties().validate(); - } + public ClusterProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - private static final ClientLogger LOGGER = new ClientLogger(ClusterInner.class); - /** * {@inheritDoc} */ @@ -787,9 +820,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); return jsonWriter.writeEndObject(); } @@ -820,14 +854,16 @@ public static ClusterInner fromJson(JsonReader jsonReader) throws IOException { } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedClusterInner.withTags(tags); - } else if ("extendedLocation".equals(fieldName)) { - deserializedClusterInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedClusterInner.innerProperties = ClusterProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedClusterInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedClusterInner.etag = reader.getString(); } else if ("identity".equals(fieldName)) { deserializedClusterInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedClusterInner.kind = DeploymentType.fromString(reader.getString()); } else if ("systemData".equals(fieldName)) { deserializedClusterInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterManagerInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterManagerInner.java index b22b597db405..783b8a6036ef 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterManagerInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterManagerInner.java @@ -1,19 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.networkcloud.models.ClusterAvailableVersion; import com.azure.resourcemanager.networkcloud.models.ClusterManagerDetailedStatus; import com.azure.resourcemanager.networkcloud.models.ClusterManagerProvisioningState; +import com.azure.resourcemanager.networkcloud.models.ClusterManagerRelayConfiguration; +import com.azure.resourcemanager.networkcloud.models.DeploymentType; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; import com.azure.resourcemanager.networkcloud.models.ManagedResourceGroupConfiguration; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentity; @@ -27,19 +28,25 @@ @Fluent public final class ClusterManagerInner extends Resource { /* - * Resource ETag. + * The list of the resource properties. + */ + private ClusterManagerProperties innerProperties = new ClusterManagerProperties(); + + /* + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ private String etag; /* - * The identity of the cluster manager. + * The managed service identities assigned to this resource. */ private ManagedServiceIdentity identity; /* - * The list of the resource properties. + * The kind of the cluster manager. */ - private ClusterManagerProperties innerProperties = new ClusterManagerProperties(); + private DeploymentType kind; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -68,7 +75,19 @@ public ClusterManagerInner() { } /** - * Get the etag property: Resource ETag. + * Get the innerProperties property: The list of the resource properties. + * + * @return the innerProperties value. + */ + private ClusterManagerProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ @@ -77,7 +96,7 @@ public String etag() { } /** - * Get the identity property: The identity of the cluster manager. + * Get the identity property: The managed service identities assigned to this resource. * * @return the identity value. */ @@ -86,7 +105,7 @@ public ManagedServiceIdentity identity() { } /** - * Set the identity property: The identity of the cluster manager. + * Set the identity property: The managed service identities assigned to this resource. * * @param identity the identity value to set. * @return the ClusterManagerInner object itself. @@ -97,12 +116,23 @@ public ClusterManagerInner withIdentity(ManagedServiceIdentity identity) { } /** - * Get the innerProperties property: The list of the resource properties. + * Get the kind property: The kind of the cluster manager. * - * @return the innerProperties value. + * @return the kind value. */ - private ClusterManagerProperties innerProperties() { - return this.innerProperties; + public DeploymentType kind() { + return this.kind; + } + + /** + * Set the kind property: The kind of the cluster manager. + * + * @param kind the kind value to set. + * @return the ClusterManagerInner object itself. + */ + public ClusterManagerInner withKind(DeploymentType kind) { + this.kind = kind; + return this; } /** @@ -312,6 +342,15 @@ public ClusterManagerProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } + /** + * Get the relayConfiguration property: The relay configuration for the cluster manager. + * + * @return the relayConfiguration value. + */ + public ClusterManagerRelayConfiguration relayConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().relayConfiguration(); + } + /** * Get the vmSize property: The size of the Azure virtual machines to use for hosting the cluster manager resource. * @@ -335,26 +374,6 @@ public ClusterManagerInner withVmSize(String vmSize) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model ClusterManagerInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ClusterManagerInner.class); - /** * {@inheritDoc} */ @@ -365,6 +384,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); return jsonWriter.writeEndObject(); } @@ -401,6 +421,8 @@ public static ClusterManagerInner fromJson(JsonReader jsonReader) throws IOExcep deserializedClusterManagerInner.etag = reader.getString(); } else if ("identity".equals(fieldName)) { deserializedClusterManagerInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedClusterManagerInner.kind = DeploymentType.fromString(reader.getString()); } else if ("systemData".equals(fieldName)) { deserializedClusterManagerInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterManagerProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterManagerProperties.java index c2873d9e0846..cc19f8ded54d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterManagerProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterManagerProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -13,6 +12,7 @@ import com.azure.resourcemanager.networkcloud.models.ClusterAvailableVersion; import com.azure.resourcemanager.networkcloud.models.ClusterManagerDetailedStatus; import com.azure.resourcemanager.networkcloud.models.ClusterManagerProvisioningState; +import com.azure.resourcemanager.networkcloud.models.ClusterManagerRelayConfiguration; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; import com.azure.resourcemanager.networkcloud.models.ManagedResourceGroupConfiguration; import java.io.IOException; @@ -70,6 +70,11 @@ public final class ClusterManagerProperties implements JsonSerializable e.validate()); - } - if (fabricControllerId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property fabricControllerId in model ClusterManagerProperties")); - } - if (managedResourceGroupConfiguration() != null) { - managedResourceGroupConfiguration().validate(); - } - if (managerExtendedLocation() != null) { - managerExtendedLocation().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ClusterManagerProperties.class); - /** * {@inheritDoc} */ @@ -318,6 +308,9 @@ public static ClusterManagerProperties fromJson(JsonReader jsonReader) throws IO } else if ("provisioningState".equals(fieldName)) { deserializedClusterManagerProperties.provisioningState = ClusterManagerProvisioningState.fromString(reader.getString()); + } else if ("relayConfiguration".equals(fieldName)) { + deserializedClusterManagerProperties.relayConfiguration + = ClusterManagerRelayConfiguration.fromJson(reader); } else if ("vmSize".equals(fieldName)) { deserializedClusterManagerProperties.vmSize = reader.getString(); } else { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterMetricsConfigurationInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterMetricsConfigurationInner.java index fe6a2614b033..246596bf5a5c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterMetricsConfigurationInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterMetricsConfigurationInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -24,19 +23,20 @@ @Fluent public final class ClusterMetricsConfigurationInner extends Resource { /* - * Resource ETag. + * The list of the resource properties. */ - private String etag; + private ClusterMetricsConfigurationProperties innerProperties = new ClusterMetricsConfigurationProperties(); /* - * The extended location of the cluster associated with the resource. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private ExtendedLocation extendedLocation; + private String etag; /* - * The list of the resource properties. + * The extended location of the resource. This property is required when creating the resource. */ - private ClusterMetricsConfigurationProperties innerProperties = new ClusterMetricsConfigurationProperties(); + private ExtendedLocation extendedLocation; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -65,7 +65,19 @@ public ClusterMetricsConfigurationInner() { } /** - * Get the etag property: Resource ETag. + * Get the innerProperties property: The list of the resource properties. + * + * @return the innerProperties value. + */ + private ClusterMetricsConfigurationProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ @@ -74,7 +86,8 @@ public String etag() { } /** - * Get the extendedLocation property: The extended location of the cluster associated with the resource. + * Get the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @return the extendedLocation value. */ @@ -83,7 +96,8 @@ public ExtendedLocation extendedLocation() { } /** - * Set the extendedLocation property: The extended location of the cluster associated with the resource. + * Set the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @param extendedLocation the extendedLocation value to set. * @return the ClusterMetricsConfigurationInner object itself. @@ -93,15 +107,6 @@ public ClusterMetricsConfigurationInner withExtendedLocation(ExtendedLocation ex return this; } - /** - * Get the innerProperties property: The list of the resource properties. - * - * @return the innerProperties value. - */ - private ClusterMetricsConfigurationProperties innerProperties() { - return this.innerProperties; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -159,6 +164,31 @@ public ClusterMetricsConfigurationInner withTags(Map tags) { return this; } + /** + * Get the enabledMetrics property: The list of metric names that have been chosen to be enabled in addition to the + * core set of enabled metrics. + * + * @return the enabledMetrics value. + */ + public List enabledMetrics() { + return this.innerProperties() == null ? null : this.innerProperties().enabledMetrics(); + } + + /** + * Set the enabledMetrics property: The list of metric names that have been chosen to be enabled in addition to the + * core set of enabled metrics. + * + * @param enabledMetrics the enabledMetrics value to set. + * @return the ClusterMetricsConfigurationInner object itself. + */ + public ClusterMetricsConfigurationInner withEnabledMetrics(List enabledMetrics) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterMetricsConfigurationProperties(); + } + this.innerProperties().withEnabledMetrics(enabledMetrics); + return this; + } + /** * Get the collectionInterval property: The interval in minutes by which metrics will be collected. * @@ -210,31 +240,6 @@ public List disabledMetrics() { return this.innerProperties() == null ? null : this.innerProperties().disabledMetrics(); } - /** - * Get the enabledMetrics property: The list of metric names that have been chosen to be enabled in addition to the - * core set of enabled metrics. - * - * @return the enabledMetrics value. - */ - public List enabledMetrics() { - return this.innerProperties() == null ? null : this.innerProperties().enabledMetrics(); - } - - /** - * Set the enabledMetrics property: The list of metric names that have been chosen to be enabled in addition to the - * core set of enabled metrics. - * - * @param enabledMetrics the enabledMetrics value to set. - * @return the ClusterMetricsConfigurationInner object itself. - */ - public ClusterMetricsConfigurationInner withEnabledMetrics(List enabledMetrics) { - if (this.innerProperties() == null) { - this.innerProperties = new ClusterMetricsConfigurationProperties(); - } - this.innerProperties().withEnabledMetrics(enabledMetrics); - return this; - } - /** * Get the provisioningState property: The provisioning state of the metrics configuration. * @@ -244,30 +249,6 @@ public ClusterMetricsConfigurationProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (extendedLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property extendedLocation in model ClusterMetricsConfigurationInner")); - } else { - extendedLocation().validate(); - } - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model ClusterMetricsConfigurationInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ClusterMetricsConfigurationInner.class); - /** * {@inheritDoc} */ @@ -276,8 +257,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); return jsonWriter.writeEndObject(); } @@ -309,11 +290,11 @@ public static ClusterMetricsConfigurationInner fromJson(JsonReader jsonReader) t } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedClusterMetricsConfigurationInner.withTags(tags); - } else if ("extendedLocation".equals(fieldName)) { - deserializedClusterMetricsConfigurationInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedClusterMetricsConfigurationInner.innerProperties = ClusterMetricsConfigurationProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedClusterMetricsConfigurationInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedClusterMetricsConfigurationInner.etag = reader.getString(); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterMetricsConfigurationPatchProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterMetricsConfigurationPatchProperties.java index c689e834a672..735a9ec1c8ef 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterMetricsConfigurationPatchProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterMetricsConfigurationPatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -77,14 +77,6 @@ public ClusterMetricsConfigurationPatchProperties withEnabledMetrics(List { + /* + * The list of metric names that have been chosen to be enabled in addition to the core set of enabled metrics. + */ + private List enabledMetrics; + /* * The interval in minutes by which metrics will be collected. */ @@ -40,11 +45,6 @@ public final class ClusterMetricsConfigurationProperties */ private List disabledMetrics; - /* - * The list of metric names that have been chosen to be enabled in addition to the core set of enabled metrics. - */ - private List enabledMetrics; - /* * The provisioning state of the metrics configuration. */ @@ -56,6 +56,28 @@ public final class ClusterMetricsConfigurationProperties public ClusterMetricsConfigurationProperties() { } + /** + * Get the enabledMetrics property: The list of metric names that have been chosen to be enabled in addition to the + * core set of enabled metrics. + * + * @return the enabledMetrics value. + */ + public List enabledMetrics() { + return this.enabledMetrics; + } + + /** + * Set the enabledMetrics property: The list of metric names that have been chosen to be enabled in addition to the + * core set of enabled metrics. + * + * @param enabledMetrics the enabledMetrics value to set. + * @return the ClusterMetricsConfigurationProperties object itself. + */ + public ClusterMetricsConfigurationProperties withEnabledMetrics(List enabledMetrics) { + this.enabledMetrics = enabledMetrics; + return this; + } + /** * Get the collectionInterval property: The interval in minutes by which metrics will be collected. * @@ -104,28 +126,6 @@ public List disabledMetrics() { return this.disabledMetrics; } - /** - * Get the enabledMetrics property: The list of metric names that have been chosen to be enabled in addition to the - * core set of enabled metrics. - * - * @return the enabledMetrics value. - */ - public List enabledMetrics() { - return this.enabledMetrics; - } - - /** - * Set the enabledMetrics property: The list of metric names that have been chosen to be enabled in addition to the - * core set of enabled metrics. - * - * @param enabledMetrics the enabledMetrics value to set. - * @return the ClusterMetricsConfigurationProperties object itself. - */ - public ClusterMetricsConfigurationProperties withEnabledMetrics(List enabledMetrics) { - this.enabledMetrics = enabledMetrics; - return this; - } - /** * Get the provisioningState property: The provisioning state of the metrics configuration. * @@ -135,14 +135,6 @@ public ClusterMetricsConfigurationProvisioningState provisioningState() { return this.provisioningState; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -174,6 +166,9 @@ public static ClusterMetricsConfigurationProperties fromJson(JsonReader jsonRead if ("collectionInterval".equals(fieldName)) { deserializedClusterMetricsConfigurationProperties.collectionInterval = reader.getLong(); + } else if ("enabledMetrics".equals(fieldName)) { + List enabledMetrics = reader.readArray(reader1 -> reader1.getString()); + deserializedClusterMetricsConfigurationProperties.enabledMetrics = enabledMetrics; } else if ("detailedStatus".equals(fieldName)) { deserializedClusterMetricsConfigurationProperties.detailedStatus = ClusterMetricsConfigurationDetailedStatus.fromString(reader.getString()); @@ -182,9 +177,6 @@ public static ClusterMetricsConfigurationProperties fromJson(JsonReader jsonRead } else if ("disabledMetrics".equals(fieldName)) { List disabledMetrics = reader.readArray(reader1 -> reader1.getString()); deserializedClusterMetricsConfigurationProperties.disabledMetrics = disabledMetrics; - } else if ("enabledMetrics".equals(fieldName)) { - List enabledMetrics = reader.readArray(reader1 -> reader1.getString()); - deserializedClusterMetricsConfigurationProperties.enabledMetrics = enabledMetrics; } else if ("provisioningState".equals(fieldName)) { deserializedClusterMetricsConfigurationProperties.provisioningState = ClusterMetricsConfigurationProvisioningState.fromString(reader.getString()); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterPatchProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterPatchProperties.java index f4c531eaff42..671a399d7d17 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterPatchProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterPatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -361,47 +361,6 @@ public VulnerabilityScanningSettingsPatch vulnerabilityScanningSettings() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (aggregatorOrSingleRackDefinition() != null) { - aggregatorOrSingleRackDefinition().validate(); - } - if (analyticsOutputSettings() != null) { - analyticsOutputSettings().validate(); - } - if (clusterServicePrincipal() != null) { - clusterServicePrincipal().validate(); - } - if (commandOutputSettings() != null) { - commandOutputSettings().validate(); - } - if (computeDeploymentThreshold() != null) { - computeDeploymentThreshold().validate(); - } - if (computeRackDefinitions() != null) { - computeRackDefinitions().forEach(e -> e.validate()); - } - if (runtimeProtectionConfiguration() != null) { - runtimeProtectionConfiguration().validate(); - } - if (secretArchive() != null) { - secretArchive().validate(); - } - if (secretArchiveSettings() != null) { - secretArchiveSettings().validate(); - } - if (updateStrategy() != null) { - updateStrategy().validate(); - } - if (vulnerabilityScanningSettings() != null) { - vulnerabilityScanningSettings().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterProperties.java index 1a5783ec6dce..44067a7126ab 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterProperties.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -31,6 +31,7 @@ import com.azure.resourcemanager.networkcloud.models.ValidationThreshold; import com.azure.resourcemanager.networkcloud.models.VulnerabilityScanningSettings; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.List; /** @@ -38,12 +39,6 @@ */ @Fluent public final class ClusterProperties implements JsonSerializable { - /* - * The current state of any in progress or completed actions. The most recent known instance of each action type is - * shown. - */ - private List actionStates; - /* * The rack definition that is intended to reflect only a single rack in a single rack cluster, or an aggregator * rack in a multi-rack cluster. @@ -60,43 +55,11 @@ public final class ClusterProperties implements JsonSerializable availableUpgradeVersions; - - /* - * The capacity supported by this cluster. - */ - private ClusterCapacity clusterCapacity; - - /* - * The latest heartbeat status between the cluster manager and the cluster. - */ - private ClusterConnectionStatus clusterConnectionStatus; - - /* - * The extended location (custom location) that represents the cluster's control plane location. This extended - * location is used to route the requests of child objects of the cluster that are handled by the platform operator. - */ - private ExtendedLocation clusterExtendedLocation; - /* * The customer-provided location information to identify where the cluster resides. */ private String clusterLocation; - /* - * The latest connectivity status between cluster manager and the cluster. - */ - private ClusterManagerConnectionStatus clusterManagerConnectionStatus; - - /* - * The resource ID of the cluster manager that manages this cluster. This is set by the Cluster Manager when the - * cluster is created. - */ - private String clusterManagerId; - /* * Field Deprecated: Use managed identity to provide cluster privileges. The service principal to be used by the * cluster during Arc Appliance installation. @@ -132,91 +95,129 @@ public final class ClusterProperties implements JsonSerializable computeRackDefinitions; /* - * The current detailed status of the cluster. + * The configuration of the managed resource group associated with the resource. */ - private ClusterDetailedStatus detailedStatus; + private ManagedResourceGroupConfiguration managedResourceGroupConfiguration; /* - * The descriptive message about the detailed status. + * The resource ID of the Network Fabric associated with the cluster. */ - private String detailedStatusMessage; + private String networkFabricId; /* - * Field Deprecated. This field will not be populated in an upcoming version. The extended location (custom - * location) that represents the Hybrid AKS control plane location. This extended location is used when creating - * provisioned clusters (Hybrid AKS clusters). + * The settings for cluster runtime protection. */ - private ExtendedLocation hybridAksExtendedLocation; + private RuntimeProtectionConfiguration runtimeProtectionConfiguration; /* - * The configuration of the managed resource group associated with the resource. + * The configuration for use of a key vault to store secrets for later retrieval by the operator. */ - private ManagedResourceGroupConfiguration managedResourceGroupConfiguration; + private ClusterSecretArchive secretArchive; /* - * The count of Manual Action Taken (MAT) events that have not been validated. + * The settings for the secret archive used to hold credentials for the cluster. */ - private Long manualActionCount; + private SecretArchiveSettings secretArchiveSettings; /* - * The resource ID of the Network Fabric associated with the cluster. + * The strategy for updating the cluster. */ - private String networkFabricId; + private ClusterUpdateStrategy updateStrategy; /* - * The provisioning state of the cluster. + * The settings for how security vulnerability scanning is applied to the cluster. */ - private ClusterProvisioningState provisioningState; + private VulnerabilityScanningSettings vulnerabilityScanningSettings; /* - * The settings for cluster runtime protection. + * The current state of any in progress or completed actions. The most recent known instance of each action type is + * shown. */ - private RuntimeProtectionConfiguration runtimeProtectionConfiguration; + private List actionStates; /* - * The configuration for use of a key vault to store secrets for later retrieval by the operator. + * The list of cluster runtime version upgrades available for this cluster. */ - private ClusterSecretArchive secretArchive; + private List availableUpgradeVersions; /* - * The settings for the secret archive used to hold credentials for the cluster. + * The capacity supported by this cluster. */ - private SecretArchiveSettings secretArchiveSettings; + private ClusterCapacity clusterCapacity; /* - * The support end date of the runtime version of the cluster. + * The latest heartbeat status between the cluster manager and the cluster. */ - private String supportExpiryDate; + private ClusterConnectionStatus clusterConnectionStatus; /* - * The strategy for updating the cluster. + * The extended location (custom location) that represents the cluster's control plane location. This extended + * location is used to route the requests of child objects of the cluster that are handled by the platform operator. */ - private ClusterUpdateStrategy updateStrategy; + private ExtendedLocation clusterExtendedLocation; /* - * The settings for how security vulnerability scanning is applied to the cluster. + * The latest connectivity status between cluster manager and the cluster. */ - private VulnerabilityScanningSettings vulnerabilityScanningSettings; + private ClusterManagerConnectionStatus clusterManagerConnectionStatus; + + /* + * The resource ID of the cluster manager that manages this cluster. This is set by the Cluster Manager when the + * cluster is created. + */ + private String clusterManagerId; + + /* + * The current detailed status of the cluster. + */ + private ClusterDetailedStatus detailedStatus; + + /* + * The descriptive message about the detailed status. + */ + private String detailedStatusMessage; + + /* + * Field Deprecated. This field will not be populated in an upcoming version. The extended location (custom + * location) that represents the Hybrid AKS control plane location. This extended location is used when creating + * provisioned clusters (Hybrid AKS clusters). + */ + private ExtendedLocation hybridAksExtendedLocation; + + /* + * The date and time of the end of the last successful version update for the cluster. + */ + private OffsetDateTime lastSuccessfulVersionUpdateTime; + + /* + * The list of credentials that are managed for the cluster and can be rotated on-demand. + */ + private List managedCredentials; + + /* + * The count of Manual Action Taken (MAT) events that have not been validated. + */ + private Long manualActionCount; + + /* + * The support end date of the runtime version of the cluster. + */ + private String supportExpiryDate; /* * The list of workload resource IDs that are hosted within this cluster. */ private List workloadResourceIds; - /** - * Creates an instance of ClusterProperties class. + /* + * The provisioning state of the cluster. */ - public ClusterProperties() { - } + private ClusterProvisioningState provisioningState; /** - * Get the actionStates property: The current state of any in progress or completed actions. The most recent known - * instance of each action type is shown. - * - * @return the actionStates value. + * Creates an instance of ClusterProperties class. */ - public List actionStates() { - return this.actionStates; + public ClusterProperties() { } /** @@ -285,46 +286,6 @@ public ClusterProperties withAnalyticsWorkspaceId(String analyticsWorkspaceId) { return this; } - /** - * Get the availableUpgradeVersions property: The list of cluster runtime version upgrades available for this - * cluster. - * - * @return the availableUpgradeVersions value. - */ - public List availableUpgradeVersions() { - return this.availableUpgradeVersions; - } - - /** - * Get the clusterCapacity property: The capacity supported by this cluster. - * - * @return the clusterCapacity value. - */ - public ClusterCapacity clusterCapacity() { - return this.clusterCapacity; - } - - /** - * Get the clusterConnectionStatus property: The latest heartbeat status between the cluster manager and the - * cluster. - * - * @return the clusterConnectionStatus value. - */ - public ClusterConnectionStatus clusterConnectionStatus() { - return this.clusterConnectionStatus; - } - - /** - * Get the clusterExtendedLocation property: The extended location (custom location) that represents the cluster's - * control plane location. This extended location is used to route the requests of child objects of the cluster that - * are handled by the platform operator. - * - * @return the clusterExtendedLocation value. - */ - public ExtendedLocation clusterExtendedLocation() { - return this.clusterExtendedLocation; - } - /** * Get the clusterLocation property: The customer-provided location information to identify where the cluster * resides. @@ -347,26 +308,6 @@ public ClusterProperties withClusterLocation(String clusterLocation) { return this; } - /** - * Get the clusterManagerConnectionStatus property: The latest connectivity status between cluster manager and the - * cluster. - * - * @return the clusterManagerConnectionStatus value. - */ - public ClusterManagerConnectionStatus clusterManagerConnectionStatus() { - return this.clusterManagerConnectionStatus; - } - - /** - * Get the clusterManagerId property: The resource ID of the cluster manager that manages this cluster. This is set - * by the Cluster Manager when the cluster is created. - * - * @return the clusterManagerId value. - */ - public String clusterManagerId() { - return this.clusterManagerId; - } - /** * Get the clusterServicePrincipal property: Field Deprecated: Use managed identity to provide cluster privileges. * The service principal to be used by the cluster during Arc Appliance installation. @@ -495,35 +436,6 @@ public ClusterProperties withComputeRackDefinitions(List compute return this; } - /** - * Get the detailedStatus property: The current detailed status of the cluster. - * - * @return the detailedStatus value. - */ - public ClusterDetailedStatus detailedStatus() { - return this.detailedStatus; - } - - /** - * Get the detailedStatusMessage property: The descriptive message about the detailed status. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.detailedStatusMessage; - } - - /** - * Get the hybridAksExtendedLocation property: Field Deprecated. This field will not be populated in an upcoming - * version. The extended location (custom location) that represents the Hybrid AKS control plane location. This - * extended location is used when creating provisioned clusters (Hybrid AKS clusters). - * - * @return the hybridAksExtendedLocation value. - */ - public ExtendedLocation hybridAksExtendedLocation() { - return this.hybridAksExtendedLocation; - } - /** * Get the managedResourceGroupConfiguration property: The configuration of the managed resource group associated * with the resource. @@ -547,15 +459,6 @@ public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { return this; } - /** - * Get the manualActionCount property: The count of Manual Action Taken (MAT) events that have not been validated. - * - * @return the manualActionCount value. - */ - public Long manualActionCount() { - return this.manualActionCount; - } - /** * Get the networkFabricId property: The resource ID of the Network Fabric associated with the cluster. * @@ -576,15 +479,6 @@ public ClusterProperties withNetworkFabricId(String networkFabricId) { return this; } - /** - * Get the provisioningState property: The provisioning state of the cluster. - * - * @return the provisioningState value. - */ - public ClusterProvisioningState provisioningState() { - return this.provisioningState; - } - /** * Get the runtimeProtectionConfiguration property: The settings for cluster runtime protection. * @@ -650,15 +544,6 @@ public ClusterProperties withSecretArchiveSettings(SecretArchiveSettings secretA return this; } - /** - * Get the supportExpiryDate property: The support end date of the runtime version of the cluster. - * - * @return the supportExpiryDate value. - */ - public String supportExpiryDate() { - return this.supportExpiryDate; - } - /** * Get the updateStrategy property: The strategy for updating the cluster. * @@ -702,6 +587,143 @@ public VulnerabilityScanningSettings vulnerabilityScanningSettings() { return this; } + /** + * Get the actionStates property: The current state of any in progress or completed actions. The most recent known + * instance of each action type is shown. + * + * @return the actionStates value. + */ + public List actionStates() { + return this.actionStates; + } + + /** + * Get the availableUpgradeVersions property: The list of cluster runtime version upgrades available for this + * cluster. + * + * @return the availableUpgradeVersions value. + */ + public List availableUpgradeVersions() { + return this.availableUpgradeVersions; + } + + /** + * Get the clusterCapacity property: The capacity supported by this cluster. + * + * @return the clusterCapacity value. + */ + public ClusterCapacity clusterCapacity() { + return this.clusterCapacity; + } + + /** + * Get the clusterConnectionStatus property: The latest heartbeat status between the cluster manager and the + * cluster. + * + * @return the clusterConnectionStatus value. + */ + public ClusterConnectionStatus clusterConnectionStatus() { + return this.clusterConnectionStatus; + } + + /** + * Get the clusterExtendedLocation property: The extended location (custom location) that represents the cluster's + * control plane location. This extended location is used to route the requests of child objects of the cluster that + * are handled by the platform operator. + * + * @return the clusterExtendedLocation value. + */ + public ExtendedLocation clusterExtendedLocation() { + return this.clusterExtendedLocation; + } + + /** + * Get the clusterManagerConnectionStatus property: The latest connectivity status between cluster manager and the + * cluster. + * + * @return the clusterManagerConnectionStatus value. + */ + public ClusterManagerConnectionStatus clusterManagerConnectionStatus() { + return this.clusterManagerConnectionStatus; + } + + /** + * Get the clusterManagerId property: The resource ID of the cluster manager that manages this cluster. This is set + * by the Cluster Manager when the cluster is created. + * + * @return the clusterManagerId value. + */ + public String clusterManagerId() { + return this.clusterManagerId; + } + + /** + * Get the detailedStatus property: The current detailed status of the cluster. + * + * @return the detailedStatus value. + */ + public ClusterDetailedStatus detailedStatus() { + return this.detailedStatus; + } + + /** + * Get the detailedStatusMessage property: The descriptive message about the detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.detailedStatusMessage; + } + + /** + * Get the hybridAksExtendedLocation property: Field Deprecated. This field will not be populated in an upcoming + * version. The extended location (custom location) that represents the Hybrid AKS control plane location. This + * extended location is used when creating provisioned clusters (Hybrid AKS clusters). + * + * @return the hybridAksExtendedLocation value. + */ + public ExtendedLocation hybridAksExtendedLocation() { + return this.hybridAksExtendedLocation; + } + + /** + * Get the lastSuccessfulVersionUpdateTime property: The date and time of the end of the last successful version + * update for the cluster. + * + * @return the lastSuccessfulVersionUpdateTime value. + */ + public OffsetDateTime lastSuccessfulVersionUpdateTime() { + return this.lastSuccessfulVersionUpdateTime; + } + + /** + * Get the managedCredentials property: The list of credentials that are managed for the cluster and can be rotated + * on-demand. + * + * @return the managedCredentials value. + */ + public List managedCredentials() { + return this.managedCredentials; + } + + /** + * Get the manualActionCount property: The count of Manual Action Taken (MAT) events that have not been validated. + * + * @return the manualActionCount value. + */ + public Long manualActionCount() { + return this.manualActionCount; + } + + /** + * Get the supportExpiryDate property: The support end date of the runtime version of the cluster. + * + * @return the supportExpiryDate value. + */ + public String supportExpiryDate() { + return this.supportExpiryDate; + } + /** * Get the workloadResourceIds property: The list of workload resource IDs that are hosted within this cluster. * @@ -712,83 +734,13 @@ public List workloadResourceIds() { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (actionStates() != null) { - actionStates().forEach(e -> e.validate()); - } - if (aggregatorOrSingleRackDefinition() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property aggregatorOrSingleRackDefinition in model ClusterProperties")); - } else { - aggregatorOrSingleRackDefinition().validate(); - } - if (analyticsOutputSettings() != null) { - analyticsOutputSettings().validate(); - } - if (availableUpgradeVersions() != null) { - availableUpgradeVersions().forEach(e -> e.validate()); - } - if (clusterCapacity() != null) { - clusterCapacity().validate(); - } - if (clusterExtendedLocation() != null) { - clusterExtendedLocation().validate(); - } - if (clusterServicePrincipal() != null) { - clusterServicePrincipal().validate(); - } - if (clusterType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property clusterType in model ClusterProperties")); - } - if (clusterVersion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property clusterVersion in model ClusterProperties")); - } - if (commandOutputSettings() != null) { - commandOutputSettings().validate(); - } - if (computeDeploymentThreshold() != null) { - computeDeploymentThreshold().validate(); - } - if (computeRackDefinitions() != null) { - computeRackDefinitions().forEach(e -> e.validate()); - } - if (hybridAksExtendedLocation() != null) { - hybridAksExtendedLocation().validate(); - } - if (managedResourceGroupConfiguration() != null) { - managedResourceGroupConfiguration().validate(); - } - if (networkFabricId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkFabricId in model ClusterProperties")); - } - if (runtimeProtectionConfiguration() != null) { - runtimeProtectionConfiguration().validate(); - } - if (secretArchive() != null) { - secretArchive().validate(); - } - if (secretArchiveSettings() != null) { - secretArchiveSettings().validate(); - } - if (updateStrategy() != null) { - updateStrategy().validate(); - } - if (vulnerabilityScanningSettings() != null) { - vulnerabilityScanningSettings().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ClusterProperties.class); + * Get the provisioningState property: The provisioning state of the cluster. + * + * @return the provisioningState value. + */ + public ClusterProvisioningState provisioningState() { + return this.provisioningState; + } /** * {@inheritDoc} @@ -841,31 +793,12 @@ public static ClusterProperties fromJson(JsonReader jsonReader) throws IOExcepti deserializedClusterProperties.clusterVersion = reader.getString(); } else if ("networkFabricId".equals(fieldName)) { deserializedClusterProperties.networkFabricId = reader.getString(); - } else if ("actionStates".equals(fieldName)) { - List actionStates = reader.readArray(reader1 -> ActionState.fromJson(reader1)); - deserializedClusterProperties.actionStates = actionStates; } else if ("analyticsOutputSettings".equals(fieldName)) { deserializedClusterProperties.analyticsOutputSettings = AnalyticsOutputSettings.fromJson(reader); } else if ("analyticsWorkspaceId".equals(fieldName)) { deserializedClusterProperties.analyticsWorkspaceId = reader.getString(); - } else if ("availableUpgradeVersions".equals(fieldName)) { - List availableUpgradeVersions - = reader.readArray(reader1 -> ClusterAvailableUpgradeVersion.fromJson(reader1)); - deserializedClusterProperties.availableUpgradeVersions = availableUpgradeVersions; - } else if ("clusterCapacity".equals(fieldName)) { - deserializedClusterProperties.clusterCapacity = ClusterCapacity.fromJson(reader); - } else if ("clusterConnectionStatus".equals(fieldName)) { - deserializedClusterProperties.clusterConnectionStatus - = ClusterConnectionStatus.fromString(reader.getString()); - } else if ("clusterExtendedLocation".equals(fieldName)) { - deserializedClusterProperties.clusterExtendedLocation = ExtendedLocation.fromJson(reader); } else if ("clusterLocation".equals(fieldName)) { deserializedClusterProperties.clusterLocation = reader.getString(); - } else if ("clusterManagerConnectionStatus".equals(fieldName)) { - deserializedClusterProperties.clusterManagerConnectionStatus - = ClusterManagerConnectionStatus.fromString(reader.getString()); - } else if ("clusterManagerId".equals(fieldName)) { - deserializedClusterProperties.clusterManagerId = reader.getString(); } else if ("clusterServicePrincipal".equals(fieldName)) { deserializedClusterProperties.clusterServicePrincipal = ServicePrincipalInformation.fromJson(reader); @@ -877,20 +810,9 @@ public static ClusterProperties fromJson(JsonReader jsonReader) throws IOExcepti List computeRackDefinitions = reader.readArray(reader1 -> RackDefinition.fromJson(reader1)); deserializedClusterProperties.computeRackDefinitions = computeRackDefinitions; - } else if ("detailedStatus".equals(fieldName)) { - deserializedClusterProperties.detailedStatus = ClusterDetailedStatus.fromString(reader.getString()); - } else if ("detailedStatusMessage".equals(fieldName)) { - deserializedClusterProperties.detailedStatusMessage = reader.getString(); - } else if ("hybridAksExtendedLocation".equals(fieldName)) { - deserializedClusterProperties.hybridAksExtendedLocation = ExtendedLocation.fromJson(reader); } else if ("managedResourceGroupConfiguration".equals(fieldName)) { deserializedClusterProperties.managedResourceGroupConfiguration = ManagedResourceGroupConfiguration.fromJson(reader); - } else if ("manualActionCount".equals(fieldName)) { - deserializedClusterProperties.manualActionCount = reader.getNullable(JsonReader::getLong); - } else if ("provisioningState".equals(fieldName)) { - deserializedClusterProperties.provisioningState - = ClusterProvisioningState.fromString(reader.getString()); } else if ("runtimeProtectionConfiguration".equals(fieldName)) { deserializedClusterProperties.runtimeProtectionConfiguration = RuntimeProtectionConfiguration.fromJson(reader); @@ -898,16 +820,52 @@ public static ClusterProperties fromJson(JsonReader jsonReader) throws IOExcepti deserializedClusterProperties.secretArchive = ClusterSecretArchive.fromJson(reader); } else if ("secretArchiveSettings".equals(fieldName)) { deserializedClusterProperties.secretArchiveSettings = SecretArchiveSettings.fromJson(reader); - } else if ("supportExpiryDate".equals(fieldName)) { - deserializedClusterProperties.supportExpiryDate = reader.getString(); } else if ("updateStrategy".equals(fieldName)) { deserializedClusterProperties.updateStrategy = ClusterUpdateStrategy.fromJson(reader); } else if ("vulnerabilityScanningSettings".equals(fieldName)) { deserializedClusterProperties.vulnerabilityScanningSettings = VulnerabilityScanningSettings.fromJson(reader); + } else if ("actionStates".equals(fieldName)) { + List actionStates = reader.readArray(reader1 -> ActionState.fromJson(reader1)); + deserializedClusterProperties.actionStates = actionStates; + } else if ("availableUpgradeVersions".equals(fieldName)) { + List availableUpgradeVersions + = reader.readArray(reader1 -> ClusterAvailableUpgradeVersion.fromJson(reader1)); + deserializedClusterProperties.availableUpgradeVersions = availableUpgradeVersions; + } else if ("clusterCapacity".equals(fieldName)) { + deserializedClusterProperties.clusterCapacity = ClusterCapacity.fromJson(reader); + } else if ("clusterConnectionStatus".equals(fieldName)) { + deserializedClusterProperties.clusterConnectionStatus + = ClusterConnectionStatus.fromString(reader.getString()); + } else if ("clusterExtendedLocation".equals(fieldName)) { + deserializedClusterProperties.clusterExtendedLocation = ExtendedLocation.fromJson(reader); + } else if ("clusterManagerConnectionStatus".equals(fieldName)) { + deserializedClusterProperties.clusterManagerConnectionStatus + = ClusterManagerConnectionStatus.fromString(reader.getString()); + } else if ("clusterManagerId".equals(fieldName)) { + deserializedClusterProperties.clusterManagerId = reader.getString(); + } else if ("detailedStatus".equals(fieldName)) { + deserializedClusterProperties.detailedStatus = ClusterDetailedStatus.fromString(reader.getString()); + } else if ("detailedStatusMessage".equals(fieldName)) { + deserializedClusterProperties.detailedStatusMessage = reader.getString(); + } else if ("hybridAksExtendedLocation".equals(fieldName)) { + deserializedClusterProperties.hybridAksExtendedLocation = ExtendedLocation.fromJson(reader); + } else if ("lastSuccessfulVersionUpdateTime".equals(fieldName)) { + deserializedClusterProperties.lastSuccessfulVersionUpdateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("managedCredentials".equals(fieldName)) { + List managedCredentials = reader.readArray(reader1 -> reader1.getString()); + deserializedClusterProperties.managedCredentials = managedCredentials; + } else if ("manualActionCount".equals(fieldName)) { + deserializedClusterProperties.manualActionCount = reader.getNullable(JsonReader::getLong); + } else if ("supportExpiryDate".equals(fieldName)) { + deserializedClusterProperties.supportExpiryDate = reader.getString(); } else if ("workloadResourceIds".equals(fieldName)) { List workloadResourceIds = reader.readArray(reader1 -> reader1.getString()); deserializedClusterProperties.workloadResourceIds = workloadResourceIds; + } else if ("provisioningState".equals(fieldName)) { + deserializedClusterProperties.provisioningState + = ClusterProvisioningState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ConsoleInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ConsoleInner.java index fa82be386a21..b31a10eb3822 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ConsoleInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ConsoleInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -26,19 +25,20 @@ @Fluent public final class ConsoleInner extends Resource { /* - * Resource ETag. + * The list of the resource properties. */ - private String etag; + private ConsoleProperties innerProperties = new ConsoleProperties(); /* - * The extended location of the cluster manager associated with the cluster this virtual machine is created on. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private ExtendedLocation extendedLocation; + private String etag; /* - * The list of the resource properties. + * The extended location of the resource. This property is required when creating the resource. */ - private ConsoleProperties innerProperties = new ConsoleProperties(); + private ExtendedLocation extendedLocation; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -67,7 +67,19 @@ public ConsoleInner() { } /** - * Get the etag property: Resource ETag. + * Get the innerProperties property: The list of the resource properties. + * + * @return the innerProperties value. + */ + private ConsoleProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ @@ -76,8 +88,8 @@ public String etag() { } /** - * Get the extendedLocation property: The extended location of the cluster manager associated with the cluster this - * virtual machine is created on. + * Get the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @return the extendedLocation value. */ @@ -86,8 +98,8 @@ public ExtendedLocation extendedLocation() { } /** - * Set the extendedLocation property: The extended location of the cluster manager associated with the cluster this - * virtual machine is created on. + * Set the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @param extendedLocation the extendedLocation value to set. * @return the ConsoleInner object itself. @@ -97,15 +109,6 @@ public ConsoleInner withExtendedLocation(ExtendedLocation extendedLocation) { return this; } - /** - * Get the innerProperties property: The list of the resource properties. - * - * @return the innerProperties value. - */ - private ConsoleProperties innerProperties() { - return this.innerProperties; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -163,24 +166,6 @@ public ConsoleInner withTags(Map tags) { return this; } - /** - * Get the detailedStatus property: The more detailed status of the console. - * - * @return the detailedStatus value. - */ - public ConsoleDetailedStatus detailedStatus() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); - } - - /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); - } - /** * Get the enabled property: The indicator of whether the console access is enabled. * @@ -227,25 +212,6 @@ public ConsoleInner withExpiration(OffsetDateTime expiration) { return this; } - /** - * Get the privateLinkServiceId property: The resource ID of the private link service that is used to provide - * virtual machine console access. - * - * @return the privateLinkServiceId value. - */ - public String privateLinkServiceId() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceId(); - } - - /** - * Get the provisioningState property: The provisioning state of the virtual machine console. - * - * @return the provisioningState value. - */ - public ConsoleProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - /** * Get the sshPublicKey property: The SSH public key that will be provisioned for user access. The user is expected * to have the corresponding SSH private key for logging in. @@ -271,6 +237,34 @@ public ConsoleInner withSshPublicKey(SshPublicKey sshPublicKey) { return this; } + /** + * Get the detailedStatus property: The more detailed status of the console. + * + * @return the detailedStatus value. + */ + public ConsoleDetailedStatus detailedStatus() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); + } + + /** + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); + } + + /** + * Get the privateLinkServiceId property: The resource ID of the private link service that is used to provide + * virtual machine console access. + * + * @return the privateLinkServiceId value. + */ + public String privateLinkServiceId() { + return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceId(); + } + /** * Get the virtualMachineAccessId property: The unique identifier for the virtual machine that is used to access the * console. @@ -282,27 +276,14 @@ public String virtualMachineAccessId() { } /** - * Validates the instance. + * Get the provisioningState property: The provisioning state of the virtual machine console. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - public void validate() { - if (extendedLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property extendedLocation in model ConsoleInner")); - } else { - extendedLocation().validate(); - } - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property innerProperties in model ConsoleInner")); - } else { - innerProperties().validate(); - } + public ConsoleProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - private static final ClientLogger LOGGER = new ClientLogger(ConsoleInner.class); - /** * {@inheritDoc} */ @@ -311,8 +292,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); return jsonWriter.writeEndObject(); } @@ -343,10 +324,10 @@ public static ConsoleInner fromJson(JsonReader jsonReader) throws IOException { } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedConsoleInner.withTags(tags); - } else if ("extendedLocation".equals(fieldName)) { - deserializedConsoleInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedConsoleInner.innerProperties = ConsoleProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedConsoleInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedConsoleInner.etag = reader.getString(); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ConsolePatchProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ConsolePatchProperties.java index da31a3bc4915..ec604e22210b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ConsolePatchProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ConsolePatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -105,17 +105,6 @@ public ConsolePatchProperties withSshPublicKey(SshPublicKey sshPublicKey) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sshPublicKey() != null) { - sshPublicKey().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ConsoleProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ConsoleProperties.java index f6618fed450e..1911c32e2f86 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ConsoleProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ConsoleProperties.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -24,16 +23,6 @@ */ @Fluent public final class ConsoleProperties implements JsonSerializable { - /* - * The more detailed status of the console. - */ - private ConsoleDetailedStatus detailedStatus; - - /* - * The descriptive message about the current detailed status. - */ - private String detailedStatusMessage; - /* * The indicator of whether the console access is enabled. */ @@ -45,48 +34,40 @@ public final class ConsoleProperties implements JsonSerializable CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("detailedStatus".equals(fieldName)) { deserializedConsoleProperties.detailedStatus = ConsoleDetailedStatus.fromString(reader.getString()); } else if ("detailedStatusMessage".equals(fieldName)) { deserializedConsoleProperties.detailedStatusMessage = reader.getString(); - } else if ("expiration".equals(fieldName)) { - deserializedConsoleProperties.expiration = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("privateLinkServiceId".equals(fieldName)) { deserializedConsoleProperties.privateLinkServiceId = reader.getString(); + } else if ("virtualMachineAccessId".equals(fieldName)) { + deserializedConsoleProperties.virtualMachineAccessId = reader.getString(); } else if ("provisioningState".equals(fieldName)) { deserializedConsoleProperties.provisioningState = ConsoleProvisioningState.fromString(reader.getString()); - } else if ("virtualMachineAccessId".equals(fieldName)) { - deserializedConsoleProperties.virtualMachineAccessId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterFeatureInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterFeatureInner.java index 0085dda124c8..2764d0768899 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterFeatureInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterFeatureInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -25,14 +25,15 @@ @Fluent public final class KubernetesClusterFeatureInner extends Resource { /* - * Resource ETag. + * The list of the resource properties. */ - private String etag; + private KubernetesClusterFeatureProperties innerProperties; /* - * The list of the resource properties. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private KubernetesClusterFeatureProperties innerProperties; + private String etag; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -61,21 +62,24 @@ public KubernetesClusterFeatureInner() { } /** - * Get the etag property: Resource ETag. + * Get the innerProperties property: The list of the resource properties. * - * @return the etag value. + * @return the innerProperties value. */ - public String etag() { - return this.etag; + private KubernetesClusterFeatureProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: The list of the resource properties. + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * - * @return the innerProperties value. + * @return the etag value. */ - private KubernetesClusterFeatureProperties innerProperties() { - return this.innerProperties; + public String etag() { + return this.etag; } /** @@ -135,33 +139,6 @@ public KubernetesClusterFeatureInner withTags(Map tags) { return this; } - /** - * Get the availabilityLifecycle property: The lifecycle indicator of the feature. - * - * @return the availabilityLifecycle value. - */ - public KubernetesClusterFeatureAvailabilityLifecycle availabilityLifecycle() { - return this.innerProperties() == null ? null : this.innerProperties().availabilityLifecycle(); - } - - /** - * Get the detailedStatus property: The detailed status of the feature. - * - * @return the detailedStatus value. - */ - public KubernetesClusterFeatureDetailedStatus detailedStatus() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); - } - - /** - * Get the detailedStatusMessage property: The descriptive message for the detailed status of the feature. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); - } - /** * Get the options property: The configured options for the feature. * @@ -186,12 +163,30 @@ public KubernetesClusterFeatureInner withOptions(List option } /** - * Get the provisioningState property: The provisioning state of the Kubernetes cluster feature. + * Get the availabilityLifecycle property: The lifecycle indicator of the feature. * - * @return the provisioningState value. + * @return the availabilityLifecycle value. */ - public KubernetesClusterFeatureProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public KubernetesClusterFeatureAvailabilityLifecycle availabilityLifecycle() { + return this.innerProperties() == null ? null : this.innerProperties().availabilityLifecycle(); + } + + /** + * Get the detailedStatus property: The detailed status of the feature. + * + * @return the detailedStatus value. + */ + public KubernetesClusterFeatureDetailedStatus detailedStatus() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); + } + + /** + * Get the detailedStatusMessage property: The descriptive message for the detailed status of the feature. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); } /** @@ -214,14 +209,12 @@ public String version() { } /** - * Validates the instance. + * Get the provisioningState property: The provisioning state of the Kubernetes cluster feature. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } + public KubernetesClusterFeatureProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -264,11 +257,11 @@ public static KubernetesClusterFeatureInner fromJson(JsonReader jsonReader) thro } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedKubernetesClusterFeatureInner.withTags(tags); - } else if ("etag".equals(fieldName)) { - deserializedKubernetesClusterFeatureInner.etag = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedKubernetesClusterFeatureInner.innerProperties = KubernetesClusterFeatureProperties.fromJson(reader); + } else if ("etag".equals(fieldName)) { + deserializedKubernetesClusterFeatureInner.etag = reader.getString(); } else if ("systemData".equals(fieldName)) { deserializedKubernetesClusterFeatureInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterFeaturePatchProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterFeaturePatchProperties.java index d17ed34423d8..5bed3faf04d1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterFeaturePatchProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterFeaturePatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -50,17 +50,6 @@ public KubernetesClusterFeaturePatchProperties withOptions(List e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterFeatureProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterFeatureProperties.java index 961eff3acc59..1835414ef584 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterFeatureProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterFeatureProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -22,6 +22,11 @@ */ @Fluent public final class KubernetesClusterFeatureProperties implements JsonSerializable { + /* + * The configured options for the feature. + */ + private List options; + /* * The lifecycle indicator of the feature. */ @@ -37,16 +42,6 @@ public final class KubernetesClusterFeatureProperties implements JsonSerializabl */ private String detailedStatusMessage; - /* - * The configured options for the feature. - */ - private List options; - - /* - * The provisioning state of the Kubernetes cluster feature. - */ - private KubernetesClusterFeatureProvisioningState provisioningState; - /* * The indicator of if the feature is required or optional. Optional features may be deleted by the user, while * required features are managed with the kubernetes cluster lifecycle. @@ -58,12 +53,37 @@ public final class KubernetesClusterFeatureProperties implements JsonSerializabl */ private String version; + /* + * The provisioning state of the Kubernetes cluster feature. + */ + private KubernetesClusterFeatureProvisioningState provisioningState; + /** * Creates an instance of KubernetesClusterFeatureProperties class. */ public KubernetesClusterFeatureProperties() { } + /** + * Get the options property: The configured options for the feature. + * + * @return the options value. + */ + public List options() { + return this.options; + } + + /** + * Set the options property: The configured options for the feature. + * + * @param options the options value to set. + * @return the KubernetesClusterFeatureProperties object itself. + */ + public KubernetesClusterFeatureProperties withOptions(List options) { + this.options = options; + return this; + } + /** * Get the availabilityLifecycle property: The lifecycle indicator of the feature. * @@ -91,35 +111,6 @@ public String detailedStatusMessage() { return this.detailedStatusMessage; } - /** - * Get the options property: The configured options for the feature. - * - * @return the options value. - */ - public List options() { - return this.options; - } - - /** - * Set the options property: The configured options for the feature. - * - * @param options the options value to set. - * @return the KubernetesClusterFeatureProperties object itself. - */ - public KubernetesClusterFeatureProperties withOptions(List options) { - this.options = options; - return this; - } - - /** - * Get the provisioningState property: The provisioning state of the Kubernetes cluster feature. - * - * @return the provisioningState value. - */ - public KubernetesClusterFeatureProvisioningState provisioningState() { - return this.provisioningState; - } - /** * Get the required property: The indicator of if the feature is required or optional. Optional features may be * deleted by the user, while required features are managed with the kubernetes cluster lifecycle. @@ -140,14 +131,12 @@ public String version() { } /** - * Validates the instance. + * Get the provisioningState property: The provisioning state of the Kubernetes cluster feature. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - public void validate() { - if (options() != null) { - options().forEach(e -> e.validate()); - } + public KubernetesClusterFeatureProvisioningState provisioningState() { + return this.provisioningState; } /** @@ -176,7 +165,11 @@ public static KubernetesClusterFeatureProperties fromJson(JsonReader jsonReader) String fieldName = reader.getFieldName(); reader.nextToken(); - if ("availabilityLifecycle".equals(fieldName)) { + if ("options".equals(fieldName)) { + List options + = reader.readArray(reader1 -> StringKeyValuePair.fromJson(reader1)); + deserializedKubernetesClusterFeatureProperties.options = options; + } else if ("availabilityLifecycle".equals(fieldName)) { deserializedKubernetesClusterFeatureProperties.availabilityLifecycle = KubernetesClusterFeatureAvailabilityLifecycle.fromString(reader.getString()); } else if ("detailedStatus".equals(fieldName)) { @@ -184,18 +177,14 @@ public static KubernetesClusterFeatureProperties fromJson(JsonReader jsonReader) = KubernetesClusterFeatureDetailedStatus.fromString(reader.getString()); } else if ("detailedStatusMessage".equals(fieldName)) { deserializedKubernetesClusterFeatureProperties.detailedStatusMessage = reader.getString(); - } else if ("options".equals(fieldName)) { - List options - = reader.readArray(reader1 -> StringKeyValuePair.fromJson(reader1)); - deserializedKubernetesClusterFeatureProperties.options = options; - } else if ("provisioningState".equals(fieldName)) { - deserializedKubernetesClusterFeatureProperties.provisioningState - = KubernetesClusterFeatureProvisioningState.fromString(reader.getString()); } else if ("required".equals(fieldName)) { deserializedKubernetesClusterFeatureProperties.required = KubernetesClusterFeatureRequired.fromString(reader.getString()); } else if ("version".equals(fieldName)) { deserializedKubernetesClusterFeatureProperties.version = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedKubernetesClusterFeatureProperties.provisioningState + = KubernetesClusterFeatureProvisioningState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterInner.java index 27689380e19f..da0b35556bc6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -33,19 +32,20 @@ @Fluent public final class KubernetesClusterInner extends Resource { /* - * Resource ETag. + * The list of the resource properties. */ - private String etag; + private KubernetesClusterProperties innerProperties = new KubernetesClusterProperties(); /* - * The extended location of the cluster associated with the resource. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private ExtendedLocation extendedLocation; + private String etag; /* - * The list of the resource properties. + * The extended location of the resource. This property is required when creating the resource. */ - private KubernetesClusterProperties innerProperties = new KubernetesClusterProperties(); + private ExtendedLocation extendedLocation; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -74,7 +74,19 @@ public KubernetesClusterInner() { } /** - * Get the etag property: Resource ETag. + * Get the innerProperties property: The list of the resource properties. + * + * @return the innerProperties value. + */ + private KubernetesClusterProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ @@ -83,7 +95,8 @@ public String etag() { } /** - * Get the extendedLocation property: The extended location of the cluster associated with the resource. + * Get the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @return the extendedLocation value. */ @@ -92,7 +105,8 @@ public ExtendedLocation extendedLocation() { } /** - * Set the extendedLocation property: The extended location of the cluster associated with the resource. + * Set the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @param extendedLocation the extendedLocation value to set. * @return the KubernetesClusterInner object itself. @@ -102,15 +116,6 @@ public KubernetesClusterInner withExtendedLocation(ExtendedLocation extendedLoca return this; } - /** - * Get the innerProperties property: The list of the resource properties. - * - * @return the innerProperties value. - */ - private KubernetesClusterProperties innerProperties() { - return this.innerProperties; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -217,53 +222,6 @@ public AdministratorConfiguration administratorConfiguration() { return this; } - /** - * Get the attachedNetworkIds property: The full list of network resource IDs that are attached to this cluster, - * including those attached only to specific agent pools. - * - * @return the attachedNetworkIds value. - */ - public List attachedNetworkIds() { - return this.innerProperties() == null ? null : this.innerProperties().attachedNetworkIds(); - } - - /** - * Get the availableUpgrades property: The list of versions that this Kubernetes cluster can be upgraded to. - * - * @return the availableUpgrades value. - */ - public List availableUpgrades() { - return this.innerProperties() == null ? null : this.innerProperties().availableUpgrades(); - } - - /** - * Get the clusterId property: The resource ID of the Network Cloud cluster. - * - * @return the clusterId value. - */ - public String clusterId() { - return this.innerProperties() == null ? null : this.innerProperties().clusterId(); - } - - /** - * Get the connectedClusterId property: The resource ID of the connected cluster set up when this Kubernetes cluster - * is created. - * - * @return the connectedClusterId value. - */ - public String connectedClusterId() { - return this.innerProperties() == null ? null : this.innerProperties().connectedClusterId(); - } - - /** - * Get the controlPlaneKubernetesVersion property: The current running version of Kubernetes on the control plane. - * - * @return the controlPlaneKubernetesVersion value. - */ - public String controlPlaneKubernetesVersion() { - return this.innerProperties() == null ? null : this.innerProperties().controlPlaneKubernetesVersion(); - } - /** * Get the controlPlaneNodeConfiguration property: The defining characteristics of the control plane for this * Kubernetes Cluster. @@ -290,33 +248,6 @@ public ControlPlaneNodeConfiguration controlPlaneNodeConfiguration() { return this; } - /** - * Get the detailedStatus property: The current status of the Kubernetes cluster. - * - * @return the detailedStatus value. - */ - public KubernetesClusterDetailedStatus detailedStatus() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); - } - - /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); - } - - /** - * Get the featureStatuses property: The current feature settings. - * - * @return the featureStatuses value. - */ - public List featureStatuses() { - return this.innerProperties() == null ? null : this.innerProperties().featureStatuses(); - } - /** * Get the initialAgentPoolConfigurations property: The agent pools that are created with this Kubernetes cluster * for running critical system services and workloads. This data in this field is only used during creation, and the @@ -421,6 +352,80 @@ public KubernetesClusterInner withNetworkConfiguration(NetworkConfiguration netw return this; } + /** + * Get the attachedNetworkIds property: The full list of network resource IDs that are attached to this cluster, + * including those attached only to specific agent pools. + * + * @return the attachedNetworkIds value. + */ + public List attachedNetworkIds() { + return this.innerProperties() == null ? null : this.innerProperties().attachedNetworkIds(); + } + + /** + * Get the availableUpgrades property: The list of versions that this Kubernetes cluster can be upgraded to. + * + * @return the availableUpgrades value. + */ + public List availableUpgrades() { + return this.innerProperties() == null ? null : this.innerProperties().availableUpgrades(); + } + + /** + * Get the clusterId property: The resource ID of the Network Cloud cluster. + * + * @return the clusterId value. + */ + public String clusterId() { + return this.innerProperties() == null ? null : this.innerProperties().clusterId(); + } + + /** + * Get the connectedClusterId property: The resource ID of the connected cluster set up when this Kubernetes cluster + * is created. + * + * @return the connectedClusterId value. + */ + public String connectedClusterId() { + return this.innerProperties() == null ? null : this.innerProperties().connectedClusterId(); + } + + /** + * Get the controlPlaneKubernetesVersion property: The current running version of Kubernetes on the control plane. + * + * @return the controlPlaneKubernetesVersion value. + */ + public String controlPlaneKubernetesVersion() { + return this.innerProperties() == null ? null : this.innerProperties().controlPlaneKubernetesVersion(); + } + + /** + * Get the detailedStatus property: The current status of the Kubernetes cluster. + * + * @return the detailedStatus value. + */ + public KubernetesClusterDetailedStatus detailedStatus() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); + } + + /** + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); + } + + /** + * Get the featureStatuses property: The current feature settings. + * + * @return the featureStatuses value. + */ + public List featureStatuses() { + return this.innerProperties() == null ? null : this.innerProperties().featureStatuses(); + } + /** * Get the nodes property: The details of the nodes in this cluster. * @@ -439,30 +444,6 @@ public KubernetesClusterProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (extendedLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property extendedLocation in model KubernetesClusterInner")); - } else { - extendedLocation().validate(); - } - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model KubernetesClusterInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(KubernetesClusterInner.class); - /** * {@inheritDoc} */ @@ -471,8 +452,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); return jsonWriter.writeEndObject(); } @@ -503,10 +484,10 @@ public static KubernetesClusterInner fromJson(JsonReader jsonReader) throws IOEx } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedKubernetesClusterInner.withTags(tags); - } else if ("extendedLocation".equals(fieldName)) { - deserializedKubernetesClusterInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedKubernetesClusterInner.innerProperties = KubernetesClusterProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedKubernetesClusterInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedKubernetesClusterInner.etag = reader.getString(); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterPatchProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterPatchProperties.java index 4113588ce394..f0defaf146c1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterPatchProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterPatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -103,20 +103,6 @@ public KubernetesClusterPatchProperties withKubernetesVersion(String kubernetesV return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (administratorConfiguration() != null) { - administratorConfiguration().validate(); - } - if (controlPlaneNodeConfiguration() != null) { - controlPlaneNodeConfiguration().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterProperties.java index b361ef1cdb08..4d319f228b85 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -40,6 +39,34 @@ public final class KubernetesClusterProperties implements JsonSerializable initialAgentPoolConfigurations; + + /* + * The Kubernetes version for this cluster. + */ + private String kubernetesVersion; + + /* + * The configuration of the managed resource group associated with the resource. + */ + private ManagedResourceGroupConfiguration managedResourceGroupConfiguration; + + /* + * The configuration of the Kubernetes cluster networking, including the attachment of networks that span the + * cluster. + */ + private NetworkConfiguration networkConfiguration; + /* * The full list of network resource IDs that are attached to this cluster, including those attached only to * specific agent pools. @@ -66,11 +93,6 @@ public final class KubernetesClusterProperties implements JsonSerializable featureStatuses; - /* - * The agent pools that are created with this Kubernetes cluster for running critical system services and workloads. - * This data in this field is only used during creation, and the field will be empty following the creation of the - * Kubernetes Cluster. After creation, the management of agent pools is done using the agentPools sub-resource. - */ - private List initialAgentPoolConfigurations; - - /* - * The Kubernetes version for this cluster. - */ - private String kubernetesVersion; - - /* - * The configuration of the managed resource group associated with the resource. - */ - private ManagedResourceGroupConfiguration managedResourceGroupConfiguration; - - /* - * The configuration of the Kubernetes cluster networking, including the attachment of networks that span the - * cluster. - */ - private NetworkConfiguration networkConfiguration; - /* * The details of the nodes in this cluster. */ @@ -168,53 +167,6 @@ public AdministratorConfiguration administratorConfiguration() { return this; } - /** - * Get the attachedNetworkIds property: The full list of network resource IDs that are attached to this cluster, - * including those attached only to specific agent pools. - * - * @return the attachedNetworkIds value. - */ - public List attachedNetworkIds() { - return this.attachedNetworkIds; - } - - /** - * Get the availableUpgrades property: The list of versions that this Kubernetes cluster can be upgraded to. - * - * @return the availableUpgrades value. - */ - public List availableUpgrades() { - return this.availableUpgrades; - } - - /** - * Get the clusterId property: The resource ID of the Network Cloud cluster. - * - * @return the clusterId value. - */ - public String clusterId() { - return this.clusterId; - } - - /** - * Get the connectedClusterId property: The resource ID of the connected cluster set up when this Kubernetes cluster - * is created. - * - * @return the connectedClusterId value. - */ - public String connectedClusterId() { - return this.connectedClusterId; - } - - /** - * Get the controlPlaneKubernetesVersion property: The current running version of Kubernetes on the control plane. - * - * @return the controlPlaneKubernetesVersion value. - */ - public String controlPlaneKubernetesVersion() { - return this.controlPlaneKubernetesVersion; - } - /** * Get the controlPlaneNodeConfiguration property: The defining characteristics of the control plane for this * Kubernetes Cluster. @@ -238,33 +190,6 @@ public ControlPlaneNodeConfiguration controlPlaneNodeConfiguration() { return this; } - /** - * Get the detailedStatus property: The current status of the Kubernetes cluster. - * - * @return the detailedStatus value. - */ - public KubernetesClusterDetailedStatus detailedStatus() { - return this.detailedStatus; - } - - /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.detailedStatusMessage; - } - - /** - * Get the featureStatuses property: The current feature settings. - * - * @return the featureStatuses value. - */ - public List featureStatuses() { - return this.featureStatuses; - } - /** * Get the initialAgentPoolConfigurations property: The agent pools that are created with this Kubernetes cluster * for running critical system services and workloads. This data in this field is only used during creation, and the @@ -357,6 +282,80 @@ public KubernetesClusterProperties withNetworkConfiguration(NetworkConfiguration return this; } + /** + * Get the attachedNetworkIds property: The full list of network resource IDs that are attached to this cluster, + * including those attached only to specific agent pools. + * + * @return the attachedNetworkIds value. + */ + public List attachedNetworkIds() { + return this.attachedNetworkIds; + } + + /** + * Get the availableUpgrades property: The list of versions that this Kubernetes cluster can be upgraded to. + * + * @return the availableUpgrades value. + */ + public List availableUpgrades() { + return this.availableUpgrades; + } + + /** + * Get the clusterId property: The resource ID of the Network Cloud cluster. + * + * @return the clusterId value. + */ + public String clusterId() { + return this.clusterId; + } + + /** + * Get the connectedClusterId property: The resource ID of the connected cluster set up when this Kubernetes cluster + * is created. + * + * @return the connectedClusterId value. + */ + public String connectedClusterId() { + return this.connectedClusterId; + } + + /** + * Get the controlPlaneKubernetesVersion property: The current running version of Kubernetes on the control plane. + * + * @return the controlPlaneKubernetesVersion value. + */ + public String controlPlaneKubernetesVersion() { + return this.controlPlaneKubernetesVersion; + } + + /** + * Get the detailedStatus property: The current status of the Kubernetes cluster. + * + * @return the detailedStatus value. + */ + public KubernetesClusterDetailedStatus detailedStatus() { + return this.detailedStatus; + } + + /** + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.detailedStatusMessage; + } + + /** + * Get the featureStatuses property: The current feature settings. + * + * @return the featureStatuses value. + */ + public List featureStatuses() { + return this.featureStatuses; + } + /** * Get the nodes property: The details of the nodes in this cluster. * @@ -375,60 +374,6 @@ public KubernetesClusterProvisioningState provisioningState() { return this.provisioningState; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (aadConfiguration() != null) { - aadConfiguration().validate(); - } - if (administratorConfiguration() != null) { - administratorConfiguration().validate(); - } - if (availableUpgrades() != null) { - availableUpgrades().forEach(e -> e.validate()); - } - if (controlPlaneNodeConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property controlPlaneNodeConfiguration in model KubernetesClusterProperties")); - } else { - controlPlaneNodeConfiguration().validate(); - } - if (featureStatuses() != null) { - featureStatuses().forEach(e -> e.validate()); - } - if (initialAgentPoolConfigurations() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property initialAgentPoolConfigurations in model KubernetesClusterProperties")); - } else { - initialAgentPoolConfigurations().forEach(e -> e.validate()); - } - if (kubernetesVersion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property kubernetesVersion in model KubernetesClusterProperties")); - } - if (managedResourceGroupConfiguration() != null) { - managedResourceGroupConfiguration().validate(); - } - if (networkConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkConfiguration in model KubernetesClusterProperties")); - } else { - networkConfiguration().validate(); - } - if (nodes() != null) { - nodes().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(KubernetesClusterProperties.class); - /** * {@inheritDoc} */ @@ -480,6 +425,9 @@ public static KubernetesClusterProperties fromJson(JsonReader jsonReader) throws } else if ("administratorConfiguration".equals(fieldName)) { deserializedKubernetesClusterProperties.administratorConfiguration = AdministratorConfiguration.fromJson(reader); + } else if ("managedResourceGroupConfiguration".equals(fieldName)) { + deserializedKubernetesClusterProperties.managedResourceGroupConfiguration + = ManagedResourceGroupConfiguration.fromJson(reader); } else if ("attachedNetworkIds".equals(fieldName)) { List attachedNetworkIds = reader.readArray(reader1 -> reader1.getString()); deserializedKubernetesClusterProperties.attachedNetworkIds = attachedNetworkIds; @@ -501,9 +449,6 @@ public static KubernetesClusterProperties fromJson(JsonReader jsonReader) throws } else if ("featureStatuses".equals(fieldName)) { List featureStatuses = reader.readArray(reader1 -> FeatureStatus.fromJson(reader1)); deserializedKubernetesClusterProperties.featureStatuses = featureStatuses; - } else if ("managedResourceGroupConfiguration".equals(fieldName)) { - deserializedKubernetesClusterProperties.managedResourceGroupConfiguration - = ManagedResourceGroupConfiguration.fromJson(reader); } else if ("nodes".equals(fieldName)) { List nodes = reader.readArray(reader1 -> KubernetesClusterNode.fromJson(reader1)); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesVersionInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesVersionInner.java new file mode 100644 index 000000000000..725a7b9d1da3 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesVersionInner.java @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.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.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.KubernetesVersionProvisioningState; +import com.azure.resourcemanager.networkcloud.models.KubernetesVersionValue; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * KubernetesVersion represents the available Kubernetes versions for a cluster. + */ +@Fluent +public final class KubernetesVersionInner extends Resource { + /* + * The list of the resource properties. + */ + private KubernetesVersionProperties innerProperties = new KubernetesVersionProperties(); + + /* + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) + */ + private String etag; + + /* + * The extended location of the resource. This property is required when creating 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 KubernetesVersionInner class. + */ + public KubernetesVersionInner() { + } + + /** + * Get the innerProperties property: The list of the resource properties. + * + * @return the innerProperties value. + */ + private KubernetesVersionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Get the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. + * + * @return the extendedLocation value. + */ + public ExtendedLocation extendedLocation() { + return this.extendedLocation; + } + + /** + * Set the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. + * + * @param extendedLocation the extendedLocation value to set. + * @return the KubernetesVersionInner object itself. + */ + public KubernetesVersionInner 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 KubernetesVersionInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public KubernetesVersionInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the values property: The list of available Kubernetes versions. + * + * @return the values value. + */ + public List values() { + return this.innerProperties() == null ? null : this.innerProperties().values(); + } + + /** + * Get the provisioningState property: The provisioning state of the Kubernetes version resource. + * + * @return the provisioningState value. + */ + public KubernetesVersionProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * {@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.innerProperties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KubernetesVersionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KubernetesVersionInner 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 KubernetesVersionInner. + */ + public static KubernetesVersionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KubernetesVersionInner deserializedKubernetesVersionInner = new KubernetesVersionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedKubernetesVersionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedKubernetesVersionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedKubernetesVersionInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedKubernetesVersionInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedKubernetesVersionInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedKubernetesVersionInner.innerProperties = KubernetesVersionProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedKubernetesVersionInner.extendedLocation = ExtendedLocation.fromJson(reader); + } else if ("etag".equals(fieldName)) { + deserializedKubernetesVersionInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedKubernetesVersionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedKubernetesVersionInner; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesVersionProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesVersionProperties.java new file mode 100644 index 000000000000..b4684a8c1c5c --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesVersionProperties.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.networkcloud.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.networkcloud.models.KubernetesVersionProvisioningState; +import com.azure.resourcemanager.networkcloud.models.KubernetesVersionValue; +import java.io.IOException; +import java.util.List; + +/** + * KubernetesVersionProperties contains the read-only properties describing available versions. + */ +@Immutable +public final class KubernetesVersionProperties implements JsonSerializable { + /* + * The list of available Kubernetes versions. + */ + private List values; + + /* + * The provisioning state of the Kubernetes version resource. + */ + private KubernetesVersionProvisioningState provisioningState; + + /** + * Creates an instance of KubernetesVersionProperties class. + */ + public KubernetesVersionProperties() { + } + + /** + * Get the values property: The list of available Kubernetes versions. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Get the provisioningState property: The provisioning state of the Kubernetes version resource. + * + * @return the provisioningState value. + */ + public KubernetesVersionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KubernetesVersionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KubernetesVersionProperties 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 KubernetesVersionProperties. + */ + public static KubernetesVersionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KubernetesVersionProperties deserializedKubernetesVersionProperties = new KubernetesVersionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("values".equals(fieldName)) { + List values + = reader.readArray(reader1 -> KubernetesVersionValue.fromJson(reader1)); + deserializedKubernetesVersionProperties.values = values; + } else if ("provisioningState".equals(fieldName)) { + deserializedKubernetesVersionProperties.provisioningState + = KubernetesVersionProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedKubernetesVersionProperties; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L2NetworkInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L2NetworkInner.java index 8fc59b3d2caf..399106eeb13f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L2NetworkInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L2NetworkInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -25,19 +24,20 @@ @Fluent public final class L2NetworkInner extends Resource { /* - * Resource ETag. + * The list of the resource properties. */ - private String etag; + private L2NetworkProperties innerProperties = new L2NetworkProperties(); /* - * The extended location of the cluster associated with the resource. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private ExtendedLocation extendedLocation; + private String etag; /* - * The list of the resource properties. + * The extended location of the resource. This property is required when creating the resource. */ - private L2NetworkProperties innerProperties = new L2NetworkProperties(); + private ExtendedLocation extendedLocation; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -66,7 +66,19 @@ public L2NetworkInner() { } /** - * Get the etag property: Resource ETag. + * Get the innerProperties property: The list of the resource properties. + * + * @return the innerProperties value. + */ + private L2NetworkProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ @@ -75,7 +87,8 @@ public String etag() { } /** - * Get the extendedLocation property: The extended location of the cluster associated with the resource. + * Get the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @return the extendedLocation value. */ @@ -84,7 +97,8 @@ public ExtendedLocation extendedLocation() { } /** - * Set the extendedLocation property: The extended location of the cluster associated with the resource. + * Set the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @param extendedLocation the extendedLocation value to set. * @return the L2NetworkInner object itself. @@ -94,15 +108,6 @@ public L2NetworkInner withExtendedLocation(ExtendedLocation extendedLocation) { return this; } - /** - * Get the innerProperties property: The list of the resource properties. - * - * @return the innerProperties value. - */ - private L2NetworkProperties innerProperties() { - return this.innerProperties; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -160,53 +165,6 @@ public L2NetworkInner withTags(Map tags) { return this; } - /** - * Get the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources - * that have attached this network. - * - * @return the associatedResourceIds value. - */ - public List associatedResourceIds() { - return this.innerProperties() == null ? null : this.innerProperties().associatedResourceIds(); - } - - /** - * Get the clusterId property: The resource ID of the Network Cloud cluster this L2 network is associated with. - * - * @return the clusterId value. - */ - public String clusterId() { - return this.innerProperties() == null ? null : this.innerProperties().clusterId(); - } - - /** - * Get the detailedStatus property: The more detailed status of the L2 network. - * - * @return the detailedStatus value. - */ - public L2NetworkDetailedStatus detailedStatus() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); - } - - /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); - } - - /** - * Get the hybridAksClustersAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list - * of Hybrid AKS cluster resource ID(s) that are associated with this L2 network. - * - * @return the hybridAksClustersAssociatedIds value. - */ - public List hybridAksClustersAssociatedIds() { - return this.innerProperties() == null ? null : this.innerProperties().hybridAksClustersAssociatedIds(); - } - /** * Get the hybridAksPluginType property: Field Deprecated. The field was previously optional, now it will have no * defined behavior and will be ignored. The network plugin type for Hybrid AKS. @@ -281,12 +239,50 @@ public L2NetworkInner withL2IsolationDomainId(String l2IsolationDomainId) { } /** - * Get the provisioningState property: The provisioning state of the L2 network. + * Get the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources + * that have attached this network. * - * @return the provisioningState value. + * @return the associatedResourceIds value. */ - public L2NetworkProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public List associatedResourceIds() { + return this.innerProperties() == null ? null : this.innerProperties().associatedResourceIds(); + } + + /** + * Get the clusterId property: The resource ID of the Network Cloud cluster this L2 network is associated with. + * + * @return the clusterId value. + */ + public String clusterId() { + return this.innerProperties() == null ? null : this.innerProperties().clusterId(); + } + + /** + * Get the detailedStatus property: The more detailed status of the L2 network. + * + * @return the detailedStatus value. + */ + public L2NetworkDetailedStatus detailedStatus() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); + } + + /** + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); + } + + /** + * Get the hybridAksClustersAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list + * of Hybrid AKS cluster resource ID(s) that are associated with this L2 network. + * + * @return the hybridAksClustersAssociatedIds value. + */ + public List hybridAksClustersAssociatedIds() { + return this.innerProperties() == null ? null : this.innerProperties().hybridAksClustersAssociatedIds(); } /** @@ -301,28 +297,14 @@ public List virtualMachinesAssociatedIds() { } /** - * Validates the instance. + * Get the provisioningState property: The provisioning state of the L2 network. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (extendedLocation() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property extendedLocation in model L2NetworkInner")); - } else { - extendedLocation().validate(); - } - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property innerProperties in model L2NetworkInner")); - } else { - innerProperties().validate(); - } + * @return the provisioningState value. + */ + public L2NetworkProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - private static final ClientLogger LOGGER = new ClientLogger(L2NetworkInner.class); - /** * {@inheritDoc} */ @@ -331,8 +313,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); return jsonWriter.writeEndObject(); } @@ -363,10 +345,10 @@ public static L2NetworkInner fromJson(JsonReader jsonReader) throws IOException } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedL2NetworkInner.withTags(tags); - } else if ("extendedLocation".equals(fieldName)) { - deserializedL2NetworkInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedL2NetworkInner.innerProperties = L2NetworkProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedL2NetworkInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedL2NetworkInner.etag = reader.getString(); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L2NetworkProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L2NetworkProperties.java index 51c841ca7255..9ad79a3670a6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L2NetworkProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L2NetworkProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -21,6 +20,23 @@ */ @Fluent public final class L2NetworkProperties implements JsonSerializable { + /* + * Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. + * The network plugin type for Hybrid AKS. + */ + private HybridAksPluginType hybridAksPluginType; + + /* + * The default interface name for this L2 network in the virtual machine. This name can be overridden by the name + * supplied in the network attachment configuration of that virtual machine. + */ + private String interfaceName; + + /* + * The resource ID of the Network Fabric l2IsolationDomain. + */ + private String l2IsolationDomainId; + /* * The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. */ @@ -48,86 +64,22 @@ public final class L2NetworkProperties implements JsonSerializable hybridAksClustersAssociatedIds; /* - * Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. - * The network plugin type for Hybrid AKS. - */ - private HybridAksPluginType hybridAksPluginType; - - /* - * The default interface name for this L2 network in the virtual machine. This name can be overridden by the name - * supplied in the network attachment configuration of that virtual machine. - */ - private String interfaceName; - - /* - * The resource ID of the Network Fabric l2IsolationDomain. + * Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource ID(s), excluding any + * Hybrid AKS virtual machines, that are currently using this L2 network. */ - private String l2IsolationDomainId; + private List virtualMachinesAssociatedIds; /* * The provisioning state of the L2 network. */ private L2NetworkProvisioningState provisioningState; - /* - * Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource ID(s), excluding any - * Hybrid AKS virtual machines, that are currently using this L2 network. - */ - private List virtualMachinesAssociatedIds; - /** * Creates an instance of L2NetworkProperties class. */ public L2NetworkProperties() { } - /** - * Get the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources - * that have attached this network. - * - * @return the associatedResourceIds value. - */ - public List associatedResourceIds() { - return this.associatedResourceIds; - } - - /** - * Get the clusterId property: The resource ID of the Network Cloud cluster this L2 network is associated with. - * - * @return the clusterId value. - */ - public String clusterId() { - return this.clusterId; - } - - /** - * Get the detailedStatus property: The more detailed status of the L2 network. - * - * @return the detailedStatus value. - */ - public L2NetworkDetailedStatus detailedStatus() { - return this.detailedStatus; - } - - /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.detailedStatusMessage; - } - - /** - * Get the hybridAksClustersAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list - * of Hybrid AKS cluster resource ID(s) that are associated with this L2 network. - * - * @return the hybridAksClustersAssociatedIds value. - */ - public List hybridAksClustersAssociatedIds() { - return this.hybridAksClustersAssociatedIds; - } - /** * Get the hybridAksPluginType property: Field Deprecated. The field was previously optional, now it will have no * defined behavior and will be ignored. The network plugin type for Hybrid AKS. @@ -193,12 +145,50 @@ public L2NetworkProperties withL2IsolationDomainId(String l2IsolationDomainId) { } /** - * Get the provisioningState property: The provisioning state of the L2 network. + * Get the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources + * that have attached this network. * - * @return the provisioningState value. + * @return the associatedResourceIds value. */ - public L2NetworkProvisioningState provisioningState() { - return this.provisioningState; + public List associatedResourceIds() { + return this.associatedResourceIds; + } + + /** + * Get the clusterId property: The resource ID of the Network Cloud cluster this L2 network is associated with. + * + * @return the clusterId value. + */ + public String clusterId() { + return this.clusterId; + } + + /** + * Get the detailedStatus property: The more detailed status of the L2 network. + * + * @return the detailedStatus value. + */ + public L2NetworkDetailedStatus detailedStatus() { + return this.detailedStatus; + } + + /** + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.detailedStatusMessage; + } + + /** + * Get the hybridAksClustersAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list + * of Hybrid AKS cluster resource ID(s) that are associated with this L2 network. + * + * @return the hybridAksClustersAssociatedIds value. + */ + public List hybridAksClustersAssociatedIds() { + return this.hybridAksClustersAssociatedIds; } /** @@ -213,20 +203,14 @@ public List virtualMachinesAssociatedIds() { } /** - * Validates the instance. + * Get the provisioningState property: The provisioning state of the L2 network. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - public void validate() { - if (l2IsolationDomainId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property l2IsolationDomainId in model L2NetworkProperties")); - } + public L2NetworkProvisioningState provisioningState() { + return this.provisioningState; } - private static final ClientLogger LOGGER = new ClientLogger(L2NetworkProperties.class); - /** * {@inheritDoc} */ @@ -258,6 +242,11 @@ public static L2NetworkProperties fromJson(JsonReader jsonReader) throws IOExcep if ("l2IsolationDomainId".equals(fieldName)) { deserializedL2NetworkProperties.l2IsolationDomainId = reader.getString(); + } else if ("hybridAksPluginType".equals(fieldName)) { + deserializedL2NetworkProperties.hybridAksPluginType + = HybridAksPluginType.fromString(reader.getString()); + } else if ("interfaceName".equals(fieldName)) { + deserializedL2NetworkProperties.interfaceName = reader.getString(); } else if ("associatedResourceIds".equals(fieldName)) { List associatedResourceIds = reader.readArray(reader1 -> reader1.getString()); deserializedL2NetworkProperties.associatedResourceIds = associatedResourceIds; @@ -271,17 +260,12 @@ public static L2NetworkProperties fromJson(JsonReader jsonReader) throws IOExcep } else if ("hybridAksClustersAssociatedIds".equals(fieldName)) { List hybridAksClustersAssociatedIds = reader.readArray(reader1 -> reader1.getString()); deserializedL2NetworkProperties.hybridAksClustersAssociatedIds = hybridAksClustersAssociatedIds; - } else if ("hybridAksPluginType".equals(fieldName)) { - deserializedL2NetworkProperties.hybridAksPluginType - = HybridAksPluginType.fromString(reader.getString()); - } else if ("interfaceName".equals(fieldName)) { - deserializedL2NetworkProperties.interfaceName = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedL2NetworkProperties.provisioningState - = L2NetworkProvisioningState.fromString(reader.getString()); } else if ("virtualMachinesAssociatedIds".equals(fieldName)) { List virtualMachinesAssociatedIds = reader.readArray(reader1 -> reader1.getString()); deserializedL2NetworkProperties.virtualMachinesAssociatedIds = virtualMachinesAssociatedIds; + } else if ("provisioningState".equals(fieldName)) { + deserializedL2NetworkProperties.provisioningState + = L2NetworkProvisioningState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L3NetworkInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L3NetworkInner.java index f06f6312cb4a..828705269501 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L3NetworkInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L3NetworkInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -27,19 +26,20 @@ @Fluent public final class L3NetworkInner extends Resource { /* - * Resource ETag. + * The list of the resource properties. */ - private String etag; + private L3NetworkProperties innerProperties = new L3NetworkProperties(); /* - * The extended location of the cluster associated with the resource. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private ExtendedLocation extendedLocation; + private String etag; /* - * The list of the resource properties. + * The extended location of the resource. This property is required when creating the resource. */ - private L3NetworkProperties innerProperties = new L3NetworkProperties(); + private ExtendedLocation extendedLocation; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -68,7 +68,19 @@ public L3NetworkInner() { } /** - * Get the etag property: Resource ETag. + * Get the innerProperties property: The list of the resource properties. + * + * @return the innerProperties value. + */ + private L3NetworkProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ @@ -77,7 +89,8 @@ public String etag() { } /** - * Get the extendedLocation property: The extended location of the cluster associated with the resource. + * Get the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @return the extendedLocation value. */ @@ -86,7 +99,8 @@ public ExtendedLocation extendedLocation() { } /** - * Set the extendedLocation property: The extended location of the cluster associated with the resource. + * Set the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @param extendedLocation the extendedLocation value to set. * @return the L3NetworkInner object itself. @@ -96,15 +110,6 @@ public L3NetworkInner withExtendedLocation(ExtendedLocation extendedLocation) { return this; } - /** - * Get the innerProperties property: The list of the resource properties. - * - * @return the innerProperties value. - */ - private L3NetworkProperties innerProperties() { - return this.innerProperties; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -162,53 +167,6 @@ public L3NetworkInner withTags(Map tags) { return this; } - /** - * Get the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources - * that have attached this network. - * - * @return the associatedResourceIds value. - */ - public List associatedResourceIds() { - return this.innerProperties() == null ? null : this.innerProperties().associatedResourceIds(); - } - - /** - * Get the clusterId property: The resource ID of the Network Cloud cluster this L3 network is associated with. - * - * @return the clusterId value. - */ - public String clusterId() { - return this.innerProperties() == null ? null : this.innerProperties().clusterId(); - } - - /** - * Get the detailedStatus property: The more detailed status of the L3 network. - * - * @return the detailedStatus value. - */ - public L3NetworkDetailedStatus detailedStatus() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); - } - - /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); - } - - /** - * Get the hybridAksClustersAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list - * of Hybrid AKS cluster resource IDs that are associated with this L3 network. - * - * @return the hybridAksClustersAssociatedIds value. - */ - public List hybridAksClustersAssociatedIds() { - return this.innerProperties() == null ? null : this.innerProperties().hybridAksClustersAssociatedIds(); - } - /** * Get the hybridAksIpamEnabled property: Field Deprecated. The field was previously optional, now it will have no * defined behavior and will be ignored. The indicator of whether or not to disable IPAM allocation on the network @@ -382,26 +340,6 @@ public L3NetworkInner withL3IsolationDomainId(String l3IsolationDomainId) { return this; } - /** - * Get the provisioningState property: The provisioning state of the L3 network. - * - * @return the provisioningState value. - */ - public L3NetworkProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the virtualMachinesAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list of - * virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this L3 - * network. - * - * @return the virtualMachinesAssociatedIds value. - */ - public List virtualMachinesAssociatedIds() { - return this.innerProperties() == null ? null : this.innerProperties().virtualMachinesAssociatedIds(); - } - /** * Get the vlan property: The VLAN from the l3IsolationDomain that is used for this network. * @@ -426,27 +364,71 @@ public L3NetworkInner withVlan(long vlan) { } /** - * Validates the instance. + * Get the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources + * that have attached this network. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the associatedResourceIds value. */ - public void validate() { - if (extendedLocation() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property extendedLocation in model L3NetworkInner")); - } else { - extendedLocation().validate(); - } - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property innerProperties in model L3NetworkInner")); - } else { - innerProperties().validate(); - } + public List associatedResourceIds() { + return this.innerProperties() == null ? null : this.innerProperties().associatedResourceIds(); } - private static final ClientLogger LOGGER = new ClientLogger(L3NetworkInner.class); + /** + * Get the clusterId property: The resource ID of the Network Cloud cluster this L3 network is associated with. + * + * @return the clusterId value. + */ + public String clusterId() { + return this.innerProperties() == null ? null : this.innerProperties().clusterId(); + } + + /** + * Get the detailedStatus property: The more detailed status of the L3 network. + * + * @return the detailedStatus value. + */ + public L3NetworkDetailedStatus detailedStatus() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); + } + + /** + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); + } + + /** + * Get the hybridAksClustersAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list + * of Hybrid AKS cluster resource IDs that are associated with this L3 network. + * + * @return the hybridAksClustersAssociatedIds value. + */ + public List hybridAksClustersAssociatedIds() { + return this.innerProperties() == null ? null : this.innerProperties().hybridAksClustersAssociatedIds(); + } + + /** + * Get the virtualMachinesAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list of + * virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this L3 + * network. + * + * @return the virtualMachinesAssociatedIds value. + */ + public List virtualMachinesAssociatedIds() { + return this.innerProperties() == null ? null : this.innerProperties().virtualMachinesAssociatedIds(); + } + + /** + * Get the provisioningState property: The provisioning state of the L3 network. + * + * @return the provisioningState value. + */ + public L3NetworkProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } /** * {@inheritDoc} @@ -456,8 +438,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); return jsonWriter.writeEndObject(); } @@ -488,10 +470,10 @@ public static L3NetworkInner fromJson(JsonReader jsonReader) throws IOException } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedL3NetworkInner.withTags(tags); - } else if ("extendedLocation".equals(fieldName)) { - deserializedL3NetworkInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedL3NetworkInner.innerProperties = L3NetworkProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedL3NetworkInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedL3NetworkInner.etag = reader.getString(); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L3NetworkProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L3NetworkProperties.java index fe4936e93e4e..22c8664b3ff6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L3NetworkProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L3NetworkProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -23,32 +22,6 @@ */ @Fluent public final class L3NetworkProperties implements JsonSerializable { - /* - * The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. - */ - private List associatedResourceIds; - - /* - * The resource ID of the Network Cloud cluster this L3 network is associated with. - */ - private String clusterId; - - /* - * The more detailed status of the L3 network. - */ - private L3NetworkDetailedStatus detailedStatus; - - /* - * The descriptive message about the current detailed status. - */ - private String detailedStatusMessage; - - /* - * Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource IDs that are - * associated with this L3 network. - */ - private List hybridAksClustersAssociatedIds; - /* * Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. * The indicator of whether or not to disable IPAM allocation on the network attachment definition injected into the @@ -89,72 +62,51 @@ public final class L3NetworkProperties implements JsonSerializable virtualMachinesAssociatedIds; + private List associatedResourceIds; /* - * The VLAN from the l3IsolationDomain that is used for this network. + * The resource ID of the Network Cloud cluster this L3 network is associated with. */ - private long vlan; + private String clusterId; - /** - * Creates an instance of L3NetworkProperties class. + /* + * The more detailed status of the L3 network. */ - public L3NetworkProperties() { - } + private L3NetworkDetailedStatus detailedStatus; - /** - * Get the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources - * that have attached this network. - * - * @return the associatedResourceIds value. + /* + * The descriptive message about the current detailed status. */ - public List associatedResourceIds() { - return this.associatedResourceIds; - } + private String detailedStatusMessage; - /** - * Get the clusterId property: The resource ID of the Network Cloud cluster this L3 network is associated with. - * - * @return the clusterId value. + /* + * Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource IDs that are + * associated with this L3 network. */ - public String clusterId() { - return this.clusterId; - } + private List hybridAksClustersAssociatedIds; - /** - * Get the detailedStatus property: The more detailed status of the L3 network. - * - * @return the detailedStatus value. + /* + * Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource IDs, excluding any + * Hybrid AKS virtual machines, that are currently using this L3 network. */ - public L3NetworkDetailedStatus detailedStatus() { - return this.detailedStatus; - } + private List virtualMachinesAssociatedIds; - /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. + /* + * The provisioning state of the L3 network. */ - public String detailedStatusMessage() { - return this.detailedStatusMessage; - } + private L3NetworkProvisioningState provisioningState; /** - * Get the hybridAksClustersAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list - * of Hybrid AKS cluster resource IDs that are associated with this L3 network. - * - * @return the hybridAksClustersAssociatedIds value. + * Creates an instance of L3NetworkProperties class. */ - public List hybridAksClustersAssociatedIds() { - return this.hybridAksClustersAssociatedIds; + public L3NetworkProperties() { } /** @@ -309,26 +261,6 @@ public L3NetworkProperties withL3IsolationDomainId(String l3IsolationDomainId) { return this; } - /** - * Get the provisioningState property: The provisioning state of the L3 network. - * - * @return the provisioningState value. - */ - public L3NetworkProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the virtualMachinesAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list of - * virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this L3 - * network. - * - * @return the virtualMachinesAssociatedIds value. - */ - public List virtualMachinesAssociatedIds() { - return this.virtualMachinesAssociatedIds; - } - /** * Get the vlan property: The VLAN from the l3IsolationDomain that is used for this network. * @@ -350,19 +282,71 @@ public L3NetworkProperties withVlan(long vlan) { } /** - * Validates the instance. + * Get the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources + * that have attached this network. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (l3IsolationDomainId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property l3IsolationDomainId in model L3NetworkProperties")); - } + * @return the associatedResourceIds value. + */ + public List associatedResourceIds() { + return this.associatedResourceIds; } - private static final ClientLogger LOGGER = new ClientLogger(L3NetworkProperties.class); + /** + * Get the clusterId property: The resource ID of the Network Cloud cluster this L3 network is associated with. + * + * @return the clusterId value. + */ + public String clusterId() { + return this.clusterId; + } + + /** + * Get the detailedStatus property: The more detailed status of the L3 network. + * + * @return the detailedStatus value. + */ + public L3NetworkDetailedStatus detailedStatus() { + return this.detailedStatus; + } + + /** + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.detailedStatusMessage; + } + + /** + * Get the hybridAksClustersAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list + * of Hybrid AKS cluster resource IDs that are associated with this L3 network. + * + * @return the hybridAksClustersAssociatedIds value. + */ + public List hybridAksClustersAssociatedIds() { + return this.hybridAksClustersAssociatedIds; + } + + /** + * Get the virtualMachinesAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list of + * virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this L3 + * network. + * + * @return the virtualMachinesAssociatedIds value. + */ + public List virtualMachinesAssociatedIds() { + return this.virtualMachinesAssociatedIds; + } + + /** + * Get the provisioningState property: The provisioning state of the L3 network. + * + * @return the provisioningState value. + */ + public L3NetworkProvisioningState provisioningState() { + return this.provisioningState; + } /** * {@inheritDoc} @@ -404,19 +388,6 @@ public static L3NetworkProperties fromJson(JsonReader jsonReader) throws IOExcep deserializedL3NetworkProperties.l3IsolationDomainId = reader.getString(); } else if ("vlan".equals(fieldName)) { deserializedL3NetworkProperties.vlan = reader.getLong(); - } else if ("associatedResourceIds".equals(fieldName)) { - List associatedResourceIds = reader.readArray(reader1 -> reader1.getString()); - deserializedL3NetworkProperties.associatedResourceIds = associatedResourceIds; - } else if ("clusterId".equals(fieldName)) { - deserializedL3NetworkProperties.clusterId = reader.getString(); - } else if ("detailedStatus".equals(fieldName)) { - deserializedL3NetworkProperties.detailedStatus - = L3NetworkDetailedStatus.fromString(reader.getString()); - } else if ("detailedStatusMessage".equals(fieldName)) { - deserializedL3NetworkProperties.detailedStatusMessage = reader.getString(); - } else if ("hybridAksClustersAssociatedIds".equals(fieldName)) { - List hybridAksClustersAssociatedIds = reader.readArray(reader1 -> reader1.getString()); - deserializedL3NetworkProperties.hybridAksClustersAssociatedIds = hybridAksClustersAssociatedIds; } else if ("hybridAksIpamEnabled".equals(fieldName)) { deserializedL3NetworkProperties.hybridAksIpamEnabled = HybridAksIpamEnabled.fromString(reader.getString()); @@ -431,12 +402,25 @@ public static L3NetworkProperties fromJson(JsonReader jsonReader) throws IOExcep deserializedL3NetworkProperties.ipv4ConnectedPrefix = reader.getString(); } else if ("ipv6ConnectedPrefix".equals(fieldName)) { deserializedL3NetworkProperties.ipv6ConnectedPrefix = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedL3NetworkProperties.provisioningState - = L3NetworkProvisioningState.fromString(reader.getString()); + } else if ("associatedResourceIds".equals(fieldName)) { + List associatedResourceIds = reader.readArray(reader1 -> reader1.getString()); + deserializedL3NetworkProperties.associatedResourceIds = associatedResourceIds; + } else if ("clusterId".equals(fieldName)) { + deserializedL3NetworkProperties.clusterId = reader.getString(); + } else if ("detailedStatus".equals(fieldName)) { + deserializedL3NetworkProperties.detailedStatus + = L3NetworkDetailedStatus.fromString(reader.getString()); + } else if ("detailedStatusMessage".equals(fieldName)) { + deserializedL3NetworkProperties.detailedStatusMessage = reader.getString(); + } else if ("hybridAksClustersAssociatedIds".equals(fieldName)) { + List hybridAksClustersAssociatedIds = reader.readArray(reader1 -> reader1.getString()); + deserializedL3NetworkProperties.hybridAksClustersAssociatedIds = hybridAksClustersAssociatedIds; } else if ("virtualMachinesAssociatedIds".equals(fieldName)) { List virtualMachinesAssociatedIds = reader.readArray(reader1 -> reader1.getString()); deserializedL3NetworkProperties.virtualMachinesAssociatedIds = virtualMachinesAssociatedIds; + } else if ("provisioningState".equals(fieldName)) { + deserializedL3NetworkProperties.provisioningState + = L3NetworkProvisioningState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/MachineSkuProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/MachineSkuProperties.java index 1437155f0d72..5eb69043035c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/MachineSkuProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/MachineSkuProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -78,7 +78,7 @@ public final class MachineSkuProperties implements JsonSerializable e.validate()); - } - if (networkInterfaces() != null) { - networkInterfaces().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/OperationInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/OperationInner.java index a9ce199734ab..4de64f2ae404 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/OperationInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/OperationInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,7 +19,7 @@ * * Details of a REST API operation, returned from the Resource Provider Operations API. */ -@Fluent +@Immutable public final class OperationInner implements JsonSerializable { /* * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: @@ -28,8 +28,8 @@ public final class OperationInner implements JsonSerializable { private String name; /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for - * ARM/control-plane operations. + * 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; @@ -45,14 +45,14 @@ public final class OperationInner implements JsonSerializable { private Origin origin; /* - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * 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. */ - public OperationInner() { + private OperationInner() { } /** @@ -67,7 +67,7 @@ public String name() { /** * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. + * operations and "false" for Azure Resource Manager/control-plane operations. * * @return the isDataAction value. */ @@ -84,17 +84,6 @@ public OperationDisplay display() { return this.display; } - /** - * Set the display property: Localized display information for this particular operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - /** * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". @@ -106,8 +95,8 @@ public Origin origin() { } /** - * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. + * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. * * @return the actionType value. */ @@ -115,17 +104,6 @@ public ActionType actionType() { return this.actionType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/OperationStatusResultInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/OperationStatusResultInner.java deleted file mode 100644 index 0873f0fd03da..000000000000 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/OperationStatusResultInner.java +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.networkcloud.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * The current status of an async operation. - */ -@Fluent -public final class OperationStatusResultInner implements JsonSerializable { - /* - * The end time of the operation. - */ - private OffsetDateTime endTime; - - /* - * If present, details of the operation error. - */ - private ManagementError error; - - /* - * Fully qualified ID for the async operation. - */ - private String id; - - /* - * Name of the async operation. - */ - private String name; - - /* - * The operations list. - */ - private List operations; - - /* - * Percent of the operation that is complete. - */ - private Float percentComplete; - - /* - * The additional properties of the operation status result. - */ - private OperationStatusResultProperties innerProperties; - - /* - * Fully qualified ID of the resource against which the original async operation was started. - */ - private String resourceId; - - /* - * The start time of the operation. - */ - private OffsetDateTime startTime; - - /* - * Operation status. - */ - private String status; - - /** - * Creates an instance of OperationStatusResultInner class. - */ - public OperationStatusResultInner() { - } - - /** - * Get the endTime property: The end time of the operation. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Get the error property: If present, details of the operation error. - * - * @return the error value. - */ - public ManagementError error() { - return this.error; - } - - /** - * 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 operations property: The operations list. - * - * @return the operations value. - */ - public List operations() { - return this.operations; - } - - /** - * Get the percentComplete property: Percent of the operation that is complete. - * - * @return the percentComplete value. - */ - public Float percentComplete() { - return this.percentComplete; - } - - /** - * Get the innerProperties property: The additional properties of the operation status result. - * - * @return the innerProperties value. - */ - private OperationStatusResultProperties innerProperties() { - return this.innerProperties; - } - - /** - * 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; - } - - /** - * Get the startTime property: The start time of the operation. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the status property: Operation status. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Set the status property: Operation status. - * - * @param status the status value to set. - * @return the OperationStatusResultInner object itself. - */ - public OperationStatusResultInner withStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the exitCode property: For actions that run commands or scripts, the exit code of the script execution. - * - * @return the exitCode value. - */ - public String exitCode() { - return this.innerProperties() == null ? null : this.innerProperties().exitCode(); - } - - /** - * Get the outputHead property: For actions that run commands or scripts, the leading bytes of the output of the - * script execution. - * - * @return the outputHead value. - */ - public String outputHead() { - return this.innerProperties() == null ? null : this.innerProperties().outputHead(); - } - - /** - * Get the resultRef property: For actions that run commands or scripts, a reference to the location of the result. - * - * @return the resultRef value. - */ - public String resultRef() { - return this.innerProperties() == null ? null : this.innerProperties().resultRef(); - } - - /** - * Get the resultUrl property: For actions that run commands or scripts, the URL where the full output of the script - * output can be retrieved. - * - * @return the resultUrl value. - */ - public String resultUrl() { - return this.innerProperties() == null ? null : this.innerProperties().resultUrl(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (operations() != null) { - operations().forEach(e -> e.validate()); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - if (status() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property status in model OperationStatusResultInner")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OperationStatusResultInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status); - jsonWriter.writeJsonField("properties", this.innerProperties); - 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 ("endTime".equals(fieldName)) { - deserializedOperationStatusResultInner.endTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("error".equals(fieldName)) { - deserializedOperationStatusResultInner.error = ManagementError.fromJson(reader); - } else if ("id".equals(fieldName)) { - deserializedOperationStatusResultInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedOperationStatusResultInner.name = reader.getString(); - } else if ("operations".equals(fieldName)) { - List operations - = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); - deserializedOperationStatusResultInner.operations = operations; - } else if ("percentComplete".equals(fieldName)) { - deserializedOperationStatusResultInner.percentComplete = reader.getNullable(JsonReader::getFloat); - } else if ("properties".equals(fieldName)) { - deserializedOperationStatusResultInner.innerProperties - = OperationStatusResultProperties.fromJson(reader); - } else if ("resourceId".equals(fieldName)) { - deserializedOperationStatusResultInner.resourceId = reader.getString(); - } else if ("startTime".equals(fieldName)) { - deserializedOperationStatusResultInner.startTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationStatusResultInner; - }); - } -} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/OperationStatusResultProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/OperationStatusResultProperties.java index d470274c2934..a85f2bab57c2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/OperationStatusResultProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/OperationStatusResultProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -39,7 +39,7 @@ public final class OperationStatusResultProperties implements JsonSerializable writer.writeString(element)); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); return jsonWriter.writeEndObject(); } @@ -355,10 +338,10 @@ public static RackInner fromJson(JsonReader jsonReader) throws IOException { } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedRackInner.withTags(tags); - } else if ("extendedLocation".equals(fieldName)) { - deserializedRackInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedRackInner.innerProperties = RackProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedRackInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedRackInner.etag = reader.getString(); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RackProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RackProperties.java index 996a7fa494de..62028c8495c3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RackProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RackProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -26,41 +25,41 @@ public final class RackProperties implements JsonSerializable { private String availabilityZone; /* - * The resource ID of the cluster the rack is created for. This value is set when the rack is created by the - * cluster. + * The free-form description of the rack location. (e.g. "DTN Datacenter, Floor 3, Isle 9, Rack 2B") */ - private String clusterId; + private String rackLocation; /* - * The more detailed status of the rack. + * The unique identifier for the rack within Network Cloud cluster. An alternate unique alphanumeric value other + * than a serial number may be provided if desired. */ - private RackDetailedStatus detailedStatus; + private String rackSerialNumber; /* - * The descriptive message about the current detailed status. + * The SKU for the rack. */ - private String detailedStatusMessage; + private String rackSkuId; /* - * The provisioning state of the rack resource. + * The resource ID of the cluster the rack is created for. This value is set when the rack is created by the + * cluster. */ - private RackProvisioningState provisioningState; + private String clusterId; /* - * The free-form description of the rack location. (e.g. “DTN Datacenter, Floor 3, Isle 9, Rack 2B”) + * The more detailed status of the rack. */ - private String rackLocation; + private RackDetailedStatus detailedStatus; /* - * The unique identifier for the rack within Network Cloud cluster. An alternate unique alphanumeric value other - * than a serial number may be provided if desired. + * The descriptive message about the current detailed status. */ - private String rackSerialNumber; + private String detailedStatusMessage; /* - * The SKU for the rack. + * The provisioning state of the rack resource. */ - private String rackSkuId; + private RackProvisioningState provisioningState; /** * Creates an instance of RackProperties class. @@ -91,45 +90,8 @@ public RackProperties withAvailabilityZone(String availabilityZone) { } /** - * Get the clusterId property: The resource ID of the cluster the rack is created for. This value is set when the - * rack is created by the cluster. - * - * @return the clusterId value. - */ - public String clusterId() { - return this.clusterId; - } - - /** - * Get the detailedStatus property: The more detailed status of the rack. - * - * @return the detailedStatus value. - */ - public RackDetailedStatus detailedStatus() { - return this.detailedStatus; - } - - /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.detailedStatusMessage; - } - - /** - * Get the provisioningState property: The provisioning state of the rack resource. - * - * @return the provisioningState value. - */ - public RackProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the rackLocation property: The free-form description of the rack location. (e.g. “DTN Datacenter, Floor 3, - * Isle 9, Rack 2B”). + * Get the rackLocation property: The free-form description of the rack location. (e.g. "DTN Datacenter, Floor 3, + * Isle 9, Rack 2B"). * * @return the rackLocation value. */ @@ -138,8 +100,8 @@ public String rackLocation() { } /** - * Set the rackLocation property: The free-form description of the rack location. (e.g. “DTN Datacenter, Floor 3, - * Isle 9, Rack 2B”). + * Set the rackLocation property: The free-form description of the rack location. (e.g. "DTN Datacenter, Floor 3, + * Isle 9, Rack 2B"). * * @param rackLocation the rackLocation value to set. * @return the RackProperties object itself. @@ -192,32 +154,41 @@ public RackProperties withRackSkuId(String rackSkuId) { } /** - * Validates the instance. + * Get the clusterId property: The resource ID of the cluster the rack is created for. This value is set when the + * rack is created by the cluster. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the clusterId value. */ - public void validate() { - if (availabilityZone() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property availabilityZone in model RackProperties")); - } - if (rackLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property rackLocation in model RackProperties")); - } - if (rackSerialNumber() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property rackSerialNumber in model RackProperties")); - } - if (rackSkuId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property rackSkuId in model RackProperties")); - } + public String clusterId() { + return this.clusterId; } - private static final ClientLogger LOGGER = new ClientLogger(RackProperties.class); + /** + * Get the detailedStatus property: The more detailed status of the rack. + * + * @return the detailedStatus value. + */ + public RackDetailedStatus detailedStatus() { + return this.detailedStatus; + } + + /** + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.detailedStatusMessage; + } + + /** + * Get the provisioningState property: The provisioning state of the rack resource. + * + * @return the provisioningState value. + */ + public RackProvisioningState provisioningState() { + return this.provisioningState; + } /** * {@inheritDoc} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RackSkuInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RackSkuInner.java index a2cdec31022a..468e7cb5335b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RackSkuInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RackSkuInner.java @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.networkcloud.models.DeploymentType; import com.azure.resourcemanager.networkcloud.models.MachineSkuSlot; import com.azure.resourcemanager.networkcloud.models.RackSkuProvisioningState; import com.azure.resourcemanager.networkcloud.models.RackSkuType; @@ -26,7 +26,7 @@ public final class RackSkuInner extends ProxyResource { /* * The list of the resource properties. */ - private RackSkuProperties innerProperties = new RackSkuProperties(); + private RackSkuProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -51,7 +51,7 @@ public final class RackSkuInner extends ProxyResource { /** * Creates an instance of RackSkuInner class. */ - public RackSkuInner() { + private RackSkuInner() { } /** @@ -122,6 +122,15 @@ public List controllerMachines() { return this.innerProperties() == null ? null : this.innerProperties().controllerMachines(); } + /** + * Get the deploymentType property: The deployment type supported by the rack SKU. + * + * @return the deploymentType value. + */ + public DeploymentType deploymentType() { + return this.innerProperties() == null ? null : this.innerProperties().deploymentType(); + } + /** * Get the description property: The free-form text describing the rack. * @@ -178,22 +187,6 @@ public List supportedRackSkuIds() { return this.innerProperties() == null ? null : this.innerProperties().supportedRackSkuIds(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property innerProperties in model RackSkuInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RackSkuInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RackSkuProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RackSkuProperties.java index 63c6a332bf81..abc53201fca5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RackSkuProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RackSkuProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -9,6 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.networkcloud.models.DeploymentType; import com.azure.resourcemanager.networkcloud.models.MachineSkuSlot; import com.azure.resourcemanager.networkcloud.models.RackSkuProvisioningState; import com.azure.resourcemanager.networkcloud.models.RackSkuType; @@ -32,6 +33,11 @@ public final class RackSkuProperties implements JsonSerializable controllerMachines; + /* + * The deployment type supported by the rack SKU. + */ + private DeploymentType deploymentType; + /* * The free-form text describing the rack. */ @@ -66,7 +72,7 @@ public final class RackSkuProperties implements JsonSerializable controllerMachines() { return this.controllerMachines; } + /** + * Get the deploymentType property: The deployment type supported by the rack SKU. + * + * @return the deploymentType value. + */ + public DeploymentType deploymentType() { + return this.deploymentType; + } + /** * Get the description property: The free-form text describing the rack. * @@ -145,23 +160,6 @@ public List supportedRackSkuIds() { return this.supportedRackSkuIds; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (computeMachines() != null) { - computeMachines().forEach(e -> e.validate()); - } - if (controllerMachines() != null) { - controllerMachines().forEach(e -> e.validate()); - } - if (storageAppliances() != null) { - storageAppliances().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -194,6 +192,8 @@ public static RackSkuProperties fromJson(JsonReader jsonReader) throws IOExcepti List controllerMachines = reader.readArray(reader1 -> MachineSkuSlot.fromJson(reader1)); deserializedRackSkuProperties.controllerMachines = controllerMachines; + } else if ("deploymentType".equals(fieldName)) { + deserializedRackSkuProperties.deploymentType = DeploymentType.fromString(reader.getString()); } else if ("description".equals(fieldName)) { deserializedRackSkuProperties.description = reader.getString(); } else if ("maxClusterSlots".equals(fieldName)) { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RacksPatchProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RacksPatchProperties.java index a23623f1a001..7d56150e5492 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RacksPatchProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RacksPatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -17,7 +17,7 @@ @Fluent public final class RacksPatchProperties implements JsonSerializable { /* - * The free-form description of the rack location. (e.g. “DTN Datacenter, Floor 3, Isle 9, Rack 2B”) + * The free-form description of the rack location. (e.g. "DTN Datacenter, Floor 3, Isle 9, Rack 2B") */ private String rackLocation; @@ -33,8 +33,8 @@ public RacksPatchProperties() { } /** - * Get the rackLocation property: The free-form description of the rack location. (e.g. “DTN Datacenter, Floor 3, - * Isle 9, Rack 2B”). + * Get the rackLocation property: The free-form description of the rack location. (e.g. "DTN Datacenter, Floor 3, + * Isle 9, Rack 2B"). * * @return the rackLocation value. */ @@ -43,8 +43,8 @@ public String rackLocation() { } /** - * Set the rackLocation property: The free-form description of the rack location. (e.g. “DTN Datacenter, Floor 3, - * Isle 9, Rack 2B”). + * Set the rackLocation property: The free-form description of the rack location. (e.g. "DTN Datacenter, Floor 3, + * Isle 9, Rack 2B"). * * @param rackLocation the rackLocation value to set. * @return the RacksPatchProperties object itself. @@ -74,14 +74,6 @@ public RacksPatchProperties withRackSerialNumber(String rackSerialNumber) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageApplianceInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageApplianceInner.java index 4f24640ee3cf..95d541eae1b4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageApplianceInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageApplianceInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,6 +17,8 @@ import com.azure.resourcemanager.networkcloud.models.RemoteVendorManagementStatus; import com.azure.resourcemanager.networkcloud.models.SecretRotationStatus; import com.azure.resourcemanager.networkcloud.models.StorageApplianceDetailedStatus; +import com.azure.resourcemanager.networkcloud.models.StorageApplianceExpansionShelf; +import com.azure.resourcemanager.networkcloud.models.StorageApplianceMonitoringConfigurationStatus; import com.azure.resourcemanager.networkcloud.models.StorageApplianceProvisioningState; import java.io.IOException; import java.util.List; @@ -29,19 +30,20 @@ @Fluent public final class StorageApplianceInner extends Resource { /* - * Resource ETag. + * The list of the resource properties. */ - private String etag; + private StorageApplianceProperties innerProperties = new StorageApplianceProperties(); /* - * The extended location of the cluster associated with the resource. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private ExtendedLocation extendedLocation; + private String etag; /* - * The list of the resource properties. + * The extended location of the resource. This property is required when creating the resource. */ - private StorageApplianceProperties innerProperties = new StorageApplianceProperties(); + private ExtendedLocation extendedLocation; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -70,7 +72,19 @@ public StorageApplianceInner() { } /** - * Get the etag property: Resource ETag. + * Get the innerProperties property: The list of the resource properties. + * + * @return the innerProperties value. + */ + private StorageApplianceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ @@ -79,7 +93,8 @@ public String etag() { } /** - * Get the extendedLocation property: The extended location of the cluster associated with the resource. + * Get the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @return the extendedLocation value. */ @@ -88,7 +103,8 @@ public ExtendedLocation extendedLocation() { } /** - * Set the extendedLocation property: The extended location of the cluster associated with the resource. + * Set the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @param extendedLocation the extendedLocation value to set. * @return the StorageApplianceInner object itself. @@ -98,15 +114,6 @@ public StorageApplianceInner withExtendedLocation(ExtendedLocation extendedLocat return this; } - /** - * Get the innerProperties property: The list of the resource properties. - * - * @return the innerProperties value. - */ - private StorageApplianceProperties innerProperties() { - return this.innerProperties; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -189,6 +196,98 @@ public StorageApplianceInner withAdministratorCredentials(AdministrativeCredenti return this; } + /** + * Get the rackId property: The resource ID of the rack where this storage appliance resides. + * + * @return the rackId value. + */ + public String rackId() { + return this.innerProperties() == null ? null : this.innerProperties().rackId(); + } + + /** + * Set the rackId property: The resource ID of the rack where this storage appliance resides. + * + * @param rackId the rackId value to set. + * @return the StorageApplianceInner object itself. + */ + public StorageApplianceInner withRackId(String rackId) { + if (this.innerProperties() == null) { + this.innerProperties = new StorageApplianceProperties(); + } + this.innerProperties().withRackId(rackId); + return this; + } + + /** + * Get the rackSlot property: The slot the storage appliance is in the rack based on the BOM configuration. + * + * @return the rackSlot value. + */ + public long rackSlot() { + return this.innerProperties() == null ? 0L : this.innerProperties().rackSlot(); + } + + /** + * Set the rackSlot property: The slot the storage appliance is in the rack based on the BOM configuration. + * + * @param rackSlot the rackSlot value to set. + * @return the StorageApplianceInner object itself. + */ + public StorageApplianceInner withRackSlot(long rackSlot) { + if (this.innerProperties() == null) { + this.innerProperties = new StorageApplianceProperties(); + } + this.innerProperties().withRackSlot(rackSlot); + return this; + } + + /** + * Get the serialNumber property: The serial number for the storage appliance. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); + } + + /** + * Set the serialNumber property: The serial number for the storage appliance. + * + * @param serialNumber the serialNumber value to set. + * @return the StorageApplianceInner object itself. + */ + public StorageApplianceInner withSerialNumber(String serialNumber) { + if (this.innerProperties() == null) { + this.innerProperties = new StorageApplianceProperties(); + } + this.innerProperties().withSerialNumber(serialNumber); + return this; + } + + /** + * Get the storageApplianceSkuId property: The SKU for the storage appliance. + * + * @return the storageApplianceSkuId value. + */ + public String storageApplianceSkuId() { + return this.innerProperties() == null ? null : this.innerProperties().storageApplianceSkuId(); + } + + /** + * Set the storageApplianceSkuId property: The SKU for the storage appliance. + * + * @param storageApplianceSkuId the storageApplianceSkuId value to set. + * @return the StorageApplianceInner object itself. + */ + public StorageApplianceInner withStorageApplianceSkuId(String storageApplianceSkuId) { + if (this.innerProperties() == null) { + this.innerProperties = new StorageApplianceProperties(); + } + this.innerProperties().withStorageApplianceSkuId(storageApplianceSkuId); + return this; + } + /** * Get the caCertificate property: The CA certificate information issued by the platform for connecting to TLS * interfaces for the storage appliance. Callers add this certificate to their trusted CA store to allow secure @@ -245,6 +344,15 @@ public String detailedStatusMessage() { return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); } + /** + * Get the expansionShelves property: The list of expansion shelves connected to the storage appliance. + * + * @return the expansionShelves value. + */ + public List expansionShelves() { + return this.innerProperties() == null ? null : this.innerProperties().expansionShelves(); + } + /** * Get the managementIpv4Address property: The endpoint for the management interface of the storage appliance. * @@ -273,58 +381,12 @@ public String model() { } /** - * Get the provisioningState property: The provisioning state of the storage appliance. - * - * @return the provisioningState value. - */ - public StorageApplianceProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the rackId property: The resource ID of the rack where this storage appliance resides. - * - * @return the rackId value. - */ - public String rackId() { - return this.innerProperties() == null ? null : this.innerProperties().rackId(); - } - - /** - * Set the rackId property: The resource ID of the rack where this storage appliance resides. - * - * @param rackId the rackId value to set. - * @return the StorageApplianceInner object itself. - */ - public StorageApplianceInner withRackId(String rackId) { - if (this.innerProperties() == null) { - this.innerProperties = new StorageApplianceProperties(); - } - this.innerProperties().withRackId(rackId); - return this; - } - - /** - * Get the rackSlot property: The slot the storage appliance is in the rack based on the BOM configuration. + * Get the monitoringConfigurationStatus property: The monitoring configuration status of the storage appliance. * - * @return the rackSlot value. + * @return the monitoringConfigurationStatus value. */ - public long rackSlot() { - return this.innerProperties() == null ? 0L : this.innerProperties().rackSlot(); - } - - /** - * Set the rackSlot property: The slot the storage appliance is in the rack based on the BOM configuration. - * - * @param rackSlot the rackSlot value to set. - * @return the StorageApplianceInner object itself. - */ - public StorageApplianceInner withRackSlot(long rackSlot) { - if (this.innerProperties() == null) { - this.innerProperties = new StorageApplianceProperties(); - } - this.innerProperties().withRackSlot(rackSlot); - return this; + public StorageApplianceMonitoringConfigurationStatus monitoringConfigurationStatus() { + return this.innerProperties() == null ? null : this.innerProperties().monitoringConfigurationStatus(); } /** @@ -356,52 +418,6 @@ public List secretRotationStatus() { return this.innerProperties() == null ? null : this.innerProperties().secretRotationStatus(); } - /** - * Get the serialNumber property: The serial number for the storage appliance. - * - * @return the serialNumber value. - */ - public String serialNumber() { - return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); - } - - /** - * Set the serialNumber property: The serial number for the storage appliance. - * - * @param serialNumber the serialNumber value to set. - * @return the StorageApplianceInner object itself. - */ - public StorageApplianceInner withSerialNumber(String serialNumber) { - if (this.innerProperties() == null) { - this.innerProperties = new StorageApplianceProperties(); - } - this.innerProperties().withSerialNumber(serialNumber); - return this; - } - - /** - * Get the storageApplianceSkuId property: The SKU for the storage appliance. - * - * @return the storageApplianceSkuId value. - */ - public String storageApplianceSkuId() { - return this.innerProperties() == null ? null : this.innerProperties().storageApplianceSkuId(); - } - - /** - * Set the storageApplianceSkuId property: The SKU for the storage appliance. - * - * @param storageApplianceSkuId the storageApplianceSkuId value to set. - * @return the StorageApplianceInner object itself. - */ - public StorageApplianceInner withStorageApplianceSkuId(String storageApplianceSkuId) { - if (this.innerProperties() == null) { - this.innerProperties = new StorageApplianceProperties(); - } - this.innerProperties().withStorageApplianceSkuId(storageApplianceSkuId); - return this; - } - /** * Get the version property: The version of the storage appliance. * @@ -412,29 +428,14 @@ public String version() { } /** - * Validates the instance. + * Get the provisioningState property: The provisioning state of the storage appliance. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - public void validate() { - if (extendedLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property extendedLocation in model StorageApplianceInner")); - } else { - extendedLocation().validate(); - } - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model StorageApplianceInner")); - } else { - innerProperties().validate(); - } + public StorageApplianceProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - private static final ClientLogger LOGGER = new ClientLogger(StorageApplianceInner.class); - /** * {@inheritDoc} */ @@ -443,8 +444,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); return jsonWriter.writeEndObject(); } @@ -475,10 +476,10 @@ public static StorageApplianceInner fromJson(JsonReader jsonReader) throws IOExc } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedStorageApplianceInner.withTags(tags); - } else if ("extendedLocation".equals(fieldName)) { - deserializedStorageApplianceInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedStorageApplianceInner.innerProperties = StorageApplianceProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedStorageApplianceInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedStorageApplianceInner.etag = reader.getString(); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageAppliancePatchProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageAppliancePatchProperties.java index e06efccf17be..4d25735d6de9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageAppliancePatchProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageAppliancePatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -47,14 +47,6 @@ public StorageAppliancePatchProperties withSerialNumber(String serialNumber) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageApplianceProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageApplianceProperties.java index 250073a43f48..b4769264d662 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageApplianceProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageApplianceProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,6 +15,8 @@ import com.azure.resourcemanager.networkcloud.models.RemoteVendorManagementStatus; import com.azure.resourcemanager.networkcloud.models.SecretRotationStatus; import com.azure.resourcemanager.networkcloud.models.StorageApplianceDetailedStatus; +import com.azure.resourcemanager.networkcloud.models.StorageApplianceExpansionShelf; +import com.azure.resourcemanager.networkcloud.models.StorageApplianceMonitoringConfigurationStatus; import com.azure.resourcemanager.networkcloud.models.StorageApplianceProvisioningState; import java.io.IOException; import java.util.List; @@ -30,6 +31,26 @@ public final class StorageApplianceProperties implements JsonSerializable expansionShelves; + /* * The endpoint for the management interface of the storage appliance. */ @@ -77,19 +103,9 @@ public final class StorageApplianceProperties implements JsonSerializable secretRotationStatus; /* - * The serial number for the storage appliance. - */ - private String serialNumber; - - /* - * The SKU for the storage appliance. + * The version of the storage appliance. */ - private String storageApplianceSkuId; + private String version; /* - * The version of the storage appliance. + * The provisioning state of the storage appliance. */ - private String version; + private StorageApplianceProvisioningState provisioningState; /** * Creates an instance of StorageApplianceProperties class. @@ -150,6 +161,86 @@ public StorageApplianceProperties withAdministratorCredentials(AdministrativeCre return this; } + /** + * Get the rackId property: The resource ID of the rack where this storage appliance resides. + * + * @return the rackId value. + */ + public String rackId() { + return this.rackId; + } + + /** + * Set the rackId property: The resource ID of the rack where this storage appliance resides. + * + * @param rackId the rackId value to set. + * @return the StorageApplianceProperties object itself. + */ + public StorageApplianceProperties withRackId(String rackId) { + this.rackId = rackId; + return this; + } + + /** + * Get the rackSlot property: The slot the storage appliance is in the rack based on the BOM configuration. + * + * @return the rackSlot value. + */ + public long rackSlot() { + return this.rackSlot; + } + + /** + * Set the rackSlot property: The slot the storage appliance is in the rack based on the BOM configuration. + * + * @param rackSlot the rackSlot value to set. + * @return the StorageApplianceProperties object itself. + */ + public StorageApplianceProperties withRackSlot(long rackSlot) { + this.rackSlot = rackSlot; + return this; + } + + /** + * Get the serialNumber property: The serial number for the storage appliance. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Set the serialNumber property: The serial number for the storage appliance. + * + * @param serialNumber the serialNumber value to set. + * @return the StorageApplianceProperties object itself. + */ + public StorageApplianceProperties withSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; + } + + /** + * Get the storageApplianceSkuId property: The SKU for the storage appliance. + * + * @return the storageApplianceSkuId value. + */ + public String storageApplianceSkuId() { + return this.storageApplianceSkuId; + } + + /** + * Set the storageApplianceSkuId property: The SKU for the storage appliance. + * + * @param storageApplianceSkuId the storageApplianceSkuId value to set. + * @return the StorageApplianceProperties object itself. + */ + public StorageApplianceProperties withStorageApplianceSkuId(String storageApplianceSkuId) { + this.storageApplianceSkuId = storageApplianceSkuId; + return this; + } + /** * Get the caCertificate property: The CA certificate information issued by the platform for connecting to TLS * interfaces for the storage appliance. Callers add this certificate to their trusted CA store to allow secure @@ -206,6 +297,15 @@ public String detailedStatusMessage() { return this.detailedStatusMessage; } + /** + * Get the expansionShelves property: The list of expansion shelves connected to the storage appliance. + * + * @return the expansionShelves value. + */ + public List expansionShelves() { + return this.expansionShelves; + } + /** * Get the managementIpv4Address property: The endpoint for the management interface of the storage appliance. * @@ -234,52 +334,12 @@ public String model() { } /** - * Get the provisioningState property: The provisioning state of the storage appliance. - * - * @return the provisioningState value. - */ - public StorageApplianceProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the rackId property: The resource ID of the rack where this storage appliance resides. - * - * @return the rackId value. - */ - public String rackId() { - return this.rackId; - } - - /** - * Set the rackId property: The resource ID of the rack where this storage appliance resides. - * - * @param rackId the rackId value to set. - * @return the StorageApplianceProperties object itself. - */ - public StorageApplianceProperties withRackId(String rackId) { - this.rackId = rackId; - return this; - } - - /** - * Get the rackSlot property: The slot the storage appliance is in the rack based on the BOM configuration. - * - * @return the rackSlot value. - */ - public long rackSlot() { - return this.rackSlot; - } - - /** - * Set the rackSlot property: The slot the storage appliance is in the rack based on the BOM configuration. + * Get the monitoringConfigurationStatus property: The monitoring configuration status of the storage appliance. * - * @param rackSlot the rackSlot value to set. - * @return the StorageApplianceProperties object itself. + * @return the monitoringConfigurationStatus value. */ - public StorageApplianceProperties withRackSlot(long rackSlot) { - this.rackSlot = rackSlot; - return this; + public StorageApplianceMonitoringConfigurationStatus monitoringConfigurationStatus() { + return this.monitoringConfigurationStatus; } /** @@ -311,46 +371,6 @@ public List secretRotationStatus() { return this.secretRotationStatus; } - /** - * Get the serialNumber property: The serial number for the storage appliance. - * - * @return the serialNumber value. - */ - public String serialNumber() { - return this.serialNumber; - } - - /** - * Set the serialNumber property: The serial number for the storage appliance. - * - * @param serialNumber the serialNumber value to set. - * @return the StorageApplianceProperties object itself. - */ - public StorageApplianceProperties withSerialNumber(String serialNumber) { - this.serialNumber = serialNumber; - return this; - } - - /** - * Get the storageApplianceSkuId property: The SKU for the storage appliance. - * - * @return the storageApplianceSkuId value. - */ - public String storageApplianceSkuId() { - return this.storageApplianceSkuId; - } - - /** - * Set the storageApplianceSkuId property: The SKU for the storage appliance. - * - * @param storageApplianceSkuId the storageApplianceSkuId value to set. - * @return the StorageApplianceProperties object itself. - */ - public StorageApplianceProperties withStorageApplianceSkuId(String storageApplianceSkuId) { - this.storageApplianceSkuId = storageApplianceSkuId; - return this; - } - /** * Get the version property: The version of the storage appliance. * @@ -361,43 +381,14 @@ public String version() { } /** - * Validates the instance. + * Get the provisioningState property: The provisioning state of the storage appliance. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (administratorCredentials() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property administratorCredentials in model StorageApplianceProperties")); - } else { - administratorCredentials().validate(); - } - if (caCertificate() != null) { - caCertificate().validate(); - } - if (rackId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property rackId in model StorageApplianceProperties")); - } - if (secretRotationStatus() != null) { - secretRotationStatus().forEach(e -> e.validate()); - } - if (serialNumber() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property serialNumber in model StorageApplianceProperties")); - } - if (storageApplianceSkuId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property storageApplianceSkuId in model StorageApplianceProperties")); - } + * @return the provisioningState value. + */ + public StorageApplianceProvisioningState provisioningState() { + return this.provisioningState; } - private static final ClientLogger LOGGER = new ClientLogger(StorageApplianceProperties.class); - /** * {@inheritDoc} */ @@ -452,15 +443,19 @@ public static StorageApplianceProperties fromJson(JsonReader jsonReader) throws = StorageApplianceDetailedStatus.fromString(reader.getString()); } else if ("detailedStatusMessage".equals(fieldName)) { deserializedStorageApplianceProperties.detailedStatusMessage = reader.getString(); + } else if ("expansionShelves".equals(fieldName)) { + List expansionShelves + = reader.readArray(reader1 -> StorageApplianceExpansionShelf.fromJson(reader1)); + deserializedStorageApplianceProperties.expansionShelves = expansionShelves; } else if ("managementIpv4Address".equals(fieldName)) { deserializedStorageApplianceProperties.managementIpv4Address = reader.getString(); } else if ("manufacturer".equals(fieldName)) { deserializedStorageApplianceProperties.manufacturer = reader.getString(); } else if ("model".equals(fieldName)) { deserializedStorageApplianceProperties.model = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedStorageApplianceProperties.provisioningState - = StorageApplianceProvisioningState.fromString(reader.getString()); + } else if ("monitoringConfigurationStatus".equals(fieldName)) { + deserializedStorageApplianceProperties.monitoringConfigurationStatus + = StorageApplianceMonitoringConfigurationStatus.fromJson(reader); } else if ("remoteVendorManagementFeature".equals(fieldName)) { deserializedStorageApplianceProperties.remoteVendorManagementFeature = RemoteVendorManagementFeature.fromString(reader.getString()); @@ -473,6 +468,9 @@ public static StorageApplianceProperties fromJson(JsonReader jsonReader) throws deserializedStorageApplianceProperties.secretRotationStatus = secretRotationStatus; } else if ("version".equals(fieldName)) { deserializedStorageApplianceProperties.version = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedStorageApplianceProperties.provisioningState + = StorageApplianceProvisioningState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageApplianceSkuProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageApplianceSkuProperties.java index bf1c5610d7f0..c4ab5a5f0562 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageApplianceSkuProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageApplianceSkuProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -29,7 +29,7 @@ public final class StorageApplianceSkuProperties implements JsonSerializable tags) { return this; } - /** - * Get the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources - * that have attached this network. - * - * @return the associatedResourceIds value. - */ - public List associatedResourceIds() { - return this.innerProperties() == null ? null : this.innerProperties().associatedResourceIds(); - } - - /** - * Get the clusterId property: The resource ID of the Network Cloud cluster this trunked network is associated with. - * - * @return the clusterId value. - */ - public String clusterId() { - return this.innerProperties() == null ? null : this.innerProperties().clusterId(); - } - - /** - * Get the detailedStatus property: The more detailed status of the trunked network. - * - * @return the detailedStatus value. - */ - public TrunkedNetworkDetailedStatus detailedStatus() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); - } - - /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); - } - - /** - * Get the hybridAksClustersAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list - * of Hybrid AKS cluster resource IDs that are associated with this trunked network. - * - * @return the hybridAksClustersAssociatedIds value. - */ - public List hybridAksClustersAssociatedIds() { - return this.innerProperties() == null ? null : this.innerProperties().hybridAksClustersAssociatedIds(); - } - /** * Get the hybridAksPluginType property: Field Deprecated. The field was previously optional, now it will have no * defined behavior and will be ignored. The network plugin type for Hybrid AKS. @@ -283,26 +241,6 @@ public TrunkedNetworkInner withIsolationDomainIds(List isolationDomainId return this; } - /** - * Get the provisioningState property: The provisioning state of the trunked network. - * - * @return the provisioningState value. - */ - public TrunkedNetworkProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the virtualMachinesAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list of - * virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this trunked - * network. - * - * @return the virtualMachinesAssociatedIds value. - */ - public List virtualMachinesAssociatedIds() { - return this.innerProperties() == null ? null : this.innerProperties().virtualMachinesAssociatedIds(); - } - /** * Get the vlans property: The list of vlans that are selected from the isolation domains for trunking. * @@ -327,28 +265,71 @@ public TrunkedNetworkInner withVlans(List vlans) { } /** - * Validates the instance. + * Get the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources + * that have attached this network. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (extendedLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property extendedLocation in model TrunkedNetworkInner")); - } else { - extendedLocation().validate(); - } - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model TrunkedNetworkInner")); - } else { - innerProperties().validate(); - } + * @return the associatedResourceIds value. + */ + public List associatedResourceIds() { + return this.innerProperties() == null ? null : this.innerProperties().associatedResourceIds(); } - private static final ClientLogger LOGGER = new ClientLogger(TrunkedNetworkInner.class); + /** + * Get the clusterId property: The resource ID of the Network Cloud cluster this trunked network is associated with. + * + * @return the clusterId value. + */ + public String clusterId() { + return this.innerProperties() == null ? null : this.innerProperties().clusterId(); + } + + /** + * Get the detailedStatus property: The more detailed status of the trunked network. + * + * @return the detailedStatus value. + */ + public TrunkedNetworkDetailedStatus detailedStatus() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); + } + + /** + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); + } + + /** + * Get the hybridAksClustersAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list + * of Hybrid AKS cluster resource IDs that are associated with this trunked network. + * + * @return the hybridAksClustersAssociatedIds value. + */ + public List hybridAksClustersAssociatedIds() { + return this.innerProperties() == null ? null : this.innerProperties().hybridAksClustersAssociatedIds(); + } + + /** + * Get the virtualMachinesAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list of + * virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this trunked + * network. + * + * @return the virtualMachinesAssociatedIds value. + */ + public List virtualMachinesAssociatedIds() { + return this.innerProperties() == null ? null : this.innerProperties().virtualMachinesAssociatedIds(); + } + + /** + * Get the provisioningState property: The provisioning state of the trunked network. + * + * @return the provisioningState value. + */ + public TrunkedNetworkProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } /** * {@inheritDoc} @@ -358,8 +339,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); return jsonWriter.writeEndObject(); } @@ -390,10 +371,10 @@ public static TrunkedNetworkInner fromJson(JsonReader jsonReader) throws IOExcep } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedTrunkedNetworkInner.withTags(tags); - } else if ("extendedLocation".equals(fieldName)) { - deserializedTrunkedNetworkInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedTrunkedNetworkInner.innerProperties = TrunkedNetworkProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedTrunkedNetworkInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedTrunkedNetworkInner.etag = reader.getString(); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/TrunkedNetworkProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/TrunkedNetworkProperties.java index 78ea6eb1fc04..58cd1ddeec92 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/TrunkedNetworkProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/TrunkedNetworkProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -22,53 +21,53 @@ @Fluent public final class TrunkedNetworkProperties implements JsonSerializable { /* - * The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. + * Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. + * The network plugin type for Hybrid AKS. */ - private List associatedResourceIds; + private HybridAksPluginType hybridAksPluginType; /* - * The resource ID of the Network Cloud cluster this trunked network is associated with. + * The default interface name for this trunked network in the virtual machine. This name can be overridden by the + * name supplied in the network attachment configuration of that virtual machine. */ - private String clusterId; + private String interfaceName; /* - * The more detailed status of the trunked network. + * The list of resource IDs representing the Network Fabric isolation domains. It can be any combination of + * l2IsolationDomain and l3IsolationDomain resources. */ - private TrunkedNetworkDetailedStatus detailedStatus; + private List isolationDomainIds; /* - * The descriptive message about the current detailed status. + * The list of vlans that are selected from the isolation domains for trunking. */ - private String detailedStatusMessage; + private List vlans; /* - * Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource IDs that are - * associated with this trunked network. + * The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. */ - private List hybridAksClustersAssociatedIds; + private List associatedResourceIds; /* - * Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. - * The network plugin type for Hybrid AKS. + * The resource ID of the Network Cloud cluster this trunked network is associated with. */ - private HybridAksPluginType hybridAksPluginType; + private String clusterId; /* - * The default interface name for this trunked network in the virtual machine. This name can be overridden by the - * name supplied in the network attachment configuration of that virtual machine. + * The more detailed status of the trunked network. */ - private String interfaceName; + private TrunkedNetworkDetailedStatus detailedStatus; /* - * The list of resource IDs representing the Network Fabric isolation domains. It can be any combination of - * l2IsolationDomain and l3IsolationDomain resources. + * The descriptive message about the current detailed status. */ - private List isolationDomainIds; + private String detailedStatusMessage; /* - * The provisioning state of the trunked network. + * Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource IDs that are + * associated with this trunked network. */ - private TrunkedNetworkProvisioningState provisioningState; + private List hybridAksClustersAssociatedIds; /* * Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource IDs, excluding any @@ -77,9 +76,9 @@ public final class TrunkedNetworkProperties implements JsonSerializable virtualMachinesAssociatedIds; /* - * The list of vlans that are selected from the isolation domains for trunking. + * The provisioning state of the trunked network. */ - private List vlans; + private TrunkedNetworkProvisioningState provisioningState; /** * Creates an instance of TrunkedNetworkProperties class. @@ -87,53 +86,6 @@ public final class TrunkedNetworkProperties implements JsonSerializable associatedResourceIds() { - return this.associatedResourceIds; - } - - /** - * Get the clusterId property: The resource ID of the Network Cloud cluster this trunked network is associated with. - * - * @return the clusterId value. - */ - public String clusterId() { - return this.clusterId; - } - - /** - * Get the detailedStatus property: The more detailed status of the trunked network. - * - * @return the detailedStatus value. - */ - public TrunkedNetworkDetailedStatus detailedStatus() { - return this.detailedStatus; - } - - /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.detailedStatusMessage; - } - - /** - * Get the hybridAksClustersAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list - * of Hybrid AKS cluster resource IDs that are associated with this trunked network. - * - * @return the hybridAksClustersAssociatedIds value. - */ - public List hybridAksClustersAssociatedIds() { - return this.hybridAksClustersAssociatedIds; - } - /** * Get the hybridAksPluginType property: Field Deprecated. The field was previously optional, now it will have no * defined behavior and will be ignored. The network plugin type for Hybrid AKS. @@ -200,26 +152,6 @@ public TrunkedNetworkProperties withIsolationDomainIds(List isolationDom return this; } - /** - * Get the provisioningState property: The provisioning state of the trunked network. - * - * @return the provisioningState value. - */ - public TrunkedNetworkProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the virtualMachinesAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list of - * virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this trunked - * network. - * - * @return the virtualMachinesAssociatedIds value. - */ - public List virtualMachinesAssociatedIds() { - return this.virtualMachinesAssociatedIds; - } - /** * Get the vlans property: The list of vlans that are selected from the isolation domains for trunking. * @@ -241,23 +173,71 @@ public TrunkedNetworkProperties withVlans(List vlans) { } /** - * Validates the instance. + * Get the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources + * that have attached this network. + * + * @return the associatedResourceIds value. + */ + public List associatedResourceIds() { + return this.associatedResourceIds; + } + + /** + * Get the clusterId property: The resource ID of the Network Cloud cluster this trunked network is associated with. + * + * @return the clusterId value. + */ + public String clusterId() { + return this.clusterId; + } + + /** + * Get the detailedStatus property: The more detailed status of the trunked network. + * + * @return the detailedStatus value. + */ + public TrunkedNetworkDetailedStatus detailedStatus() { + return this.detailedStatus; + } + + /** + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.detailedStatusMessage; + } + + /** + * Get the hybridAksClustersAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list + * of Hybrid AKS cluster resource IDs that are associated with this trunked network. + * + * @return the hybridAksClustersAssociatedIds value. + */ + public List hybridAksClustersAssociatedIds() { + return this.hybridAksClustersAssociatedIds; + } + + /** + * Get the virtualMachinesAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list of + * virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this trunked + * network. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the virtualMachinesAssociatedIds value. */ - public void validate() { - if (isolationDomainIds() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property isolationDomainIds in model TrunkedNetworkProperties")); - } - if (vlans() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property vlans in model TrunkedNetworkProperties")); - } + public List virtualMachinesAssociatedIds() { + return this.virtualMachinesAssociatedIds; } - private static final ClientLogger LOGGER = new ClientLogger(TrunkedNetworkProperties.class); + /** + * Get the provisioningState property: The provisioning state of the trunked network. + * + * @return the provisioningState value. + */ + public TrunkedNetworkProvisioningState provisioningState() { + return this.provisioningState; + } /** * {@inheritDoc} @@ -296,6 +276,11 @@ public static TrunkedNetworkProperties fromJson(JsonReader jsonReader) throws IO } else if ("vlans".equals(fieldName)) { List vlans = reader.readArray(reader1 -> reader1.getLong()); deserializedTrunkedNetworkProperties.vlans = vlans; + } else if ("hybridAksPluginType".equals(fieldName)) { + deserializedTrunkedNetworkProperties.hybridAksPluginType + = HybridAksPluginType.fromString(reader.getString()); + } else if ("interfaceName".equals(fieldName)) { + deserializedTrunkedNetworkProperties.interfaceName = reader.getString(); } else if ("associatedResourceIds".equals(fieldName)) { List associatedResourceIds = reader.readArray(reader1 -> reader1.getString()); deserializedTrunkedNetworkProperties.associatedResourceIds = associatedResourceIds; @@ -310,17 +295,12 @@ public static TrunkedNetworkProperties fromJson(JsonReader jsonReader) throws IO List hybridAksClustersAssociatedIds = reader.readArray(reader1 -> reader1.getString()); deserializedTrunkedNetworkProperties.hybridAksClustersAssociatedIds = hybridAksClustersAssociatedIds; - } else if ("hybridAksPluginType".equals(fieldName)) { - deserializedTrunkedNetworkProperties.hybridAksPluginType - = HybridAksPluginType.fromString(reader.getString()); - } else if ("interfaceName".equals(fieldName)) { - deserializedTrunkedNetworkProperties.interfaceName = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedTrunkedNetworkProperties.provisioningState - = TrunkedNetworkProvisioningState.fromString(reader.getString()); } else if ("virtualMachinesAssociatedIds".equals(fieldName)) { List virtualMachinesAssociatedIds = reader.readArray(reader1 -> reader1.getString()); deserializedTrunkedNetworkProperties.virtualMachinesAssociatedIds = virtualMachinesAssociatedIds; + } else if ("provisioningState".equals(fieldName)) { + deserializedTrunkedNetworkProperties.provisioningState + = TrunkedNetworkProvisioningState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachineInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachineInner.java index 946c04ddddc2..af5ca5d7acc7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachineInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachineInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -35,24 +34,25 @@ @Fluent public final class VirtualMachineInner extends Resource { /* - * Resource ETag. + * The list of the resource properties. */ - private String etag; + private VirtualMachineProperties innerProperties = new VirtualMachineProperties(); /* - * The extended location of the cluster associated with the resource. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private ExtendedLocation extendedLocation; + private String etag; /* - * The identity for the resource. + * The extended location of the resource. This property is required when creating the resource. */ - private ManagedServiceIdentity identity; + private ExtendedLocation extendedLocation; /* - * The list of the resource properties. + * The managed service identities assigned to this resource. */ - private VirtualMachineProperties innerProperties = new VirtualMachineProperties(); + private ManagedServiceIdentity identity; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -81,7 +81,19 @@ public VirtualMachineInner() { } /** - * Get the etag property: Resource ETag. + * Get the innerProperties property: The list of the resource properties. + * + * @return the innerProperties value. + */ + private VirtualMachineProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ @@ -90,7 +102,8 @@ public String etag() { } /** - * Get the extendedLocation property: The extended location of the cluster associated with the resource. + * Get the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @return the extendedLocation value. */ @@ -99,7 +112,8 @@ public ExtendedLocation extendedLocation() { } /** - * Set the extendedLocation property: The extended location of the cluster associated with the resource. + * Set the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @param extendedLocation the extendedLocation value to set. * @return the VirtualMachineInner object itself. @@ -110,7 +124,7 @@ public VirtualMachineInner withExtendedLocation(ExtendedLocation extendedLocatio } /** - * Get the identity property: The identity for the resource. + * Get the identity property: The managed service identities assigned to this resource. * * @return the identity value. */ @@ -119,7 +133,7 @@ public ManagedServiceIdentity identity() { } /** - * Set the identity property: The identity for the resource. + * Set the identity property: The managed service identities assigned to this resource. * * @param identity the identity value to set. * @return the VirtualMachineInner object itself. @@ -129,15 +143,6 @@ public VirtualMachineInner withIdentity(ManagedServiceIdentity identity) { return this; } - /** - * Get the innerProperties property: The list of the resource properties. - * - * @return the innerProperties value. - */ - private VirtualMachineProperties innerProperties() { - return this.innerProperties; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -220,24 +225,6 @@ public VirtualMachineInner withAdminUsername(String adminUsername) { return this; } - /** - * Get the availabilityZone property: The cluster availability zone containing this virtual machine. - * - * @return the availabilityZone value. - */ - public String availabilityZone() { - return this.innerProperties() == null ? null : this.innerProperties().availabilityZone(); - } - - /** - * Get the bareMetalMachineId property: The resource ID of the bare metal machine that hosts the virtual machine. - * - * @return the bareMetalMachineId value. - */ - public String bareMetalMachineId() { - return this.innerProperties() == null ? null : this.innerProperties().bareMetalMachineId(); - } - /** * Get the bootMethod property: Selects the boot method for the virtual machine. * @@ -286,38 +273,6 @@ public VirtualMachineInner withCloudServicesNetworkAttachment(NetworkAttachment return this; } - /** - * Get the clusterId property: The resource ID of the cluster the virtual machine is created for. - * - * @return the clusterId value. - */ - public String clusterId() { - return this.innerProperties() == null ? null : this.innerProperties().clusterId(); - } - - /** - * Get the consoleExtendedLocation property: The extended location to use for creation of a VM console resource. - * - * @return the consoleExtendedLocation value. - */ - public ExtendedLocation consoleExtendedLocation() { - return this.innerProperties() == null ? null : this.innerProperties().consoleExtendedLocation(); - } - - /** - * Set the consoleExtendedLocation property: The extended location to use for creation of a VM console resource. - * - * @param consoleExtendedLocation the consoleExtendedLocation value to set. - * @return the VirtualMachineInner object itself. - */ - public VirtualMachineInner withConsoleExtendedLocation(ExtendedLocation consoleExtendedLocation) { - if (this.innerProperties() == null) { - this.innerProperties = new VirtualMachineProperties(); - } - this.innerProperties().withConsoleExtendedLocation(consoleExtendedLocation); - return this; - } - /** * Get the cpuCores property: The number of CPU cores in the virtual machine. * @@ -341,24 +296,6 @@ public VirtualMachineInner withCpuCores(long cpuCores) { return this; } - /** - * Get the detailedStatus property: The more detailed status of the virtual machine. - * - * @return the detailedStatus value. - */ - public VirtualMachineDetailedStatus detailedStatus() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); - } - - /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); - } - /** * Get the isolateEmulatorThread property: Field Deprecated, the value will be ignored if provided. The indicator of * whether one of the specified CPU cores is isolated to run the emulator thread for this virtual machine. @@ -501,24 +438,6 @@ public VirtualMachineInner withPlacementHints(List return this; } - /** - * Get the powerState property: The power state of the virtual machine. - * - * @return the powerState value. - */ - public VirtualMachinePowerState powerState() { - return this.innerProperties() == null ? null : this.innerProperties().powerState(); - } - - /** - * Get the provisioningState property: The provisioning state of the virtual machine. - * - * @return the provisioningState value. - */ - public VirtualMachineProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - /** * Get the sshPublicKeys property: The list of ssh public keys. Each key will be added to the virtual machine using * the cloud-init ssh_authorized_keys mechanism for the adminUsername. @@ -716,6 +635,83 @@ public ImageRepositoryCredentials vmImageRepositoryCredentials() { return this; } + /** + * Get the availabilityZone property: The cluster availability zone containing this virtual machine. + * + * @return the availabilityZone value. + */ + public String availabilityZone() { + return this.innerProperties() == null ? null : this.innerProperties().availabilityZone(); + } + + /** + * Get the bareMetalMachineId property: The resource ID of the bare metal machine that hosts the virtual machine. + * + * @return the bareMetalMachineId value. + */ + public String bareMetalMachineId() { + return this.innerProperties() == null ? null : this.innerProperties().bareMetalMachineId(); + } + + /** + * Get the clusterId property: The resource ID of the cluster the virtual machine is created for. + * + * @return the clusterId value. + */ + public String clusterId() { + return this.innerProperties() == null ? null : this.innerProperties().clusterId(); + } + + /** + * Get the consoleExtendedLocation property: The extended location to use for creation of a VM console resource. + * + * @return the consoleExtendedLocation value. + */ + public ExtendedLocation consoleExtendedLocation() { + return this.innerProperties() == null ? null : this.innerProperties().consoleExtendedLocation(); + } + + /** + * Set the consoleExtendedLocation property: The extended location to use for creation of a VM console resource. + * + * @param consoleExtendedLocation the consoleExtendedLocation value to set. + * @return the VirtualMachineInner object itself. + */ + public VirtualMachineInner withConsoleExtendedLocation(ExtendedLocation consoleExtendedLocation) { + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachineProperties(); + } + this.innerProperties().withConsoleExtendedLocation(consoleExtendedLocation); + return this; + } + + /** + * Get the detailedStatus property: The more detailed status of the virtual machine. + * + * @return the detailedStatus value. + */ + public VirtualMachineDetailedStatus detailedStatus() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); + } + + /** + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + public String detailedStatusMessage() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); + } + + /** + * Get the powerState property: The power state of the virtual machine. + * + * @return the powerState value. + */ + public VirtualMachinePowerState powerState() { + return this.innerProperties() == null ? null : this.innerProperties().powerState(); + } + /** * Get the volumes property: The resource IDs of volumes that are attached to the virtual machine. * @@ -726,32 +722,14 @@ public List volumes() { } /** - * Validates the instance. + * Get the provisioningState property: The provisioning state of the virtual machine. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - public void validate() { - if (extendedLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property extendedLocation in model VirtualMachineInner")); - } else { - extendedLocation().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model VirtualMachineInner")); - } else { - innerProperties().validate(); - } + public VirtualMachineProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - private static final ClientLogger LOGGER = new ClientLogger(VirtualMachineInner.class); - /** * {@inheritDoc} */ @@ -760,8 +738,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -793,10 +771,10 @@ public static VirtualMachineInner fromJson(JsonReader jsonReader) throws IOExcep } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedVirtualMachineInner.withTags(tags); - } else if ("extendedLocation".equals(fieldName)) { - deserializedVirtualMachineInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedVirtualMachineInner.innerProperties = VirtualMachineProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedVirtualMachineInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedVirtualMachineInner.etag = reader.getString(); } else if ("identity".equals(fieldName)) { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachinePatchProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachinePatchProperties.java index ad532bba522a..01de8f40db9e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachinePatchProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachinePatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -51,17 +51,6 @@ public ImageRepositoryCredentials vmImageRepositoryCredentials() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (vmImageRepositoryCredentials() != null) { - vmImageRepositoryCredentials().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachineProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachineProperties.java index 300a055b4dd7..e00faaf47e70 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachineProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachineProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -36,16 +35,6 @@ public final class VirtualMachineProperties implements JsonSerializable placementHints; - /* - * The power state of the virtual machine. - */ - private VirtualMachinePowerState powerState; - - /* - * The provisioning state of the virtual machine. - */ - private VirtualMachineProvisioningState provisioningState; - /* * The list of ssh public keys. Each key will be added to the virtual machine using the cloud-init * ssh_authorized_keys mechanism for the adminUsername. @@ -166,11 +125,51 @@ public final class VirtualMachineProperties implements JsonSerializable volumes; + /* + * The provisioning state of the virtual machine. + */ + private VirtualMachineProvisioningState provisioningState; + /** * Creates an instance of VirtualMachineProperties class. */ @@ -199,24 +198,6 @@ public VirtualMachineProperties withAdminUsername(String adminUsername) { return this; } - /** - * Get the availabilityZone property: The cluster availability zone containing this virtual machine. - * - * @return the availabilityZone value. - */ - public String availabilityZone() { - return this.availabilityZone; - } - - /** - * Get the bareMetalMachineId property: The resource ID of the bare metal machine that hosts the virtual machine. - * - * @return the bareMetalMachineId value. - */ - public String bareMetalMachineId() { - return this.bareMetalMachineId; - } - /** * Get the bootMethod property: Selects the boot method for the virtual machine. * @@ -260,35 +241,6 @@ public NetworkAttachment cloudServicesNetworkAttachment() { return this; } - /** - * Get the clusterId property: The resource ID of the cluster the virtual machine is created for. - * - * @return the clusterId value. - */ - public String clusterId() { - return this.clusterId; - } - - /** - * Get the consoleExtendedLocation property: The extended location to use for creation of a VM console resource. - * - * @return the consoleExtendedLocation value. - */ - public ExtendedLocation consoleExtendedLocation() { - return this.consoleExtendedLocation; - } - - /** - * Set the consoleExtendedLocation property: The extended location to use for creation of a VM console resource. - * - * @param consoleExtendedLocation the consoleExtendedLocation value to set. - * @return the VirtualMachineProperties object itself. - */ - public VirtualMachineProperties withConsoleExtendedLocation(ExtendedLocation consoleExtendedLocation) { - this.consoleExtendedLocation = consoleExtendedLocation; - return this; - } - /** * Get the cpuCores property: The number of CPU cores in the virtual machine. * @@ -309,24 +261,6 @@ public VirtualMachineProperties withCpuCores(long cpuCores) { return this; } - /** - * Get the detailedStatus property: The more detailed status of the virtual machine. - * - * @return the detailedStatus value. - */ - public VirtualMachineDetailedStatus detailedStatus() { - return this.detailedStatus; - } - - /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - public String detailedStatusMessage() { - return this.detailedStatusMessage; - } - /** * Get the isolateEmulatorThread property: Field Deprecated, the value will be ignored if provided. The indicator of * whether one of the specified CPU cores is isolated to run the emulator thread for this virtual machine. @@ -452,24 +386,6 @@ public VirtualMachineProperties withPlacementHints(List volumes() { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (adminUsername() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property adminUsername in model VirtualMachineProperties")); - } - if (cloudServicesNetworkAttachment() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property cloudServicesNetworkAttachment in model VirtualMachineProperties")); - } else { - cloudServicesNetworkAttachment().validate(); - } - if (consoleExtendedLocation() != null) { - consoleExtendedLocation().validate(); - } - if (networkAttachments() != null) { - networkAttachments().forEach(e -> e.validate()); - } - if (placementHints() != null) { - placementHints().forEach(e -> e.validate()); - } - if (sshPublicKeys() != null) { - sshPublicKeys().forEach(e -> e.validate()); - } - if (storageProfile() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property storageProfile in model VirtualMachineProperties")); - } else { - storageProfile().validate(); - } - if (vmImage() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property vmImage in model VirtualMachineProperties")); - } - if (vmImageRepositoryCredentials() != null) { - vmImageRepositoryCredentials().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VirtualMachineProperties.class); + * Get the provisioningState property: The provisioning state of the virtual machine. + * + * @return the provisioningState value. + */ + public VirtualMachineProvisioningState provisioningState() { + return this.provisioningState; + } /** * {@inheritDoc} @@ -714,7 +664,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("storageProfile", this.storageProfile); jsonWriter.writeStringField("vmImage", this.vmImage); jsonWriter.writeStringField("bootMethod", this.bootMethod == null ? null : this.bootMethod.toString()); - jsonWriter.writeJsonField("consoleExtendedLocation", this.consoleExtendedLocation); jsonWriter.writeStringField("isolateEmulatorThread", this.isolateEmulatorThread == null ? null : this.isolateEmulatorThread.toString()); jsonWriter.writeArrayField("networkAttachments", this.networkAttachments, @@ -730,6 +679,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { this.virtioInterface == null ? null : this.virtioInterface.toString()); jsonWriter.writeStringField("vmDeviceModel", this.vmDeviceModel == null ? null : this.vmDeviceModel.toString()); jsonWriter.writeJsonField("vmImageRepositoryCredentials", this.vmImageRepositoryCredentials); + jsonWriter.writeJsonField("consoleExtendedLocation", this.consoleExtendedLocation); return jsonWriter.writeEndObject(); } @@ -762,22 +712,9 @@ public static VirtualMachineProperties fromJson(JsonReader jsonReader) throws IO deserializedVirtualMachineProperties.storageProfile = StorageProfile.fromJson(reader); } else if ("vmImage".equals(fieldName)) { deserializedVirtualMachineProperties.vmImage = reader.getString(); - } else if ("availabilityZone".equals(fieldName)) { - deserializedVirtualMachineProperties.availabilityZone = reader.getString(); - } else if ("bareMetalMachineId".equals(fieldName)) { - deserializedVirtualMachineProperties.bareMetalMachineId = reader.getString(); } else if ("bootMethod".equals(fieldName)) { deserializedVirtualMachineProperties.bootMethod = VirtualMachineBootMethod.fromString(reader.getString()); - } else if ("clusterId".equals(fieldName)) { - deserializedVirtualMachineProperties.clusterId = reader.getString(); - } else if ("consoleExtendedLocation".equals(fieldName)) { - deserializedVirtualMachineProperties.consoleExtendedLocation = ExtendedLocation.fromJson(reader); - } else if ("detailedStatus".equals(fieldName)) { - deserializedVirtualMachineProperties.detailedStatus - = VirtualMachineDetailedStatus.fromString(reader.getString()); - } else if ("detailedStatusMessage".equals(fieldName)) { - deserializedVirtualMachineProperties.detailedStatusMessage = reader.getString(); } else if ("isolateEmulatorThread".equals(fieldName)) { deserializedVirtualMachineProperties.isolateEmulatorThread = VirtualMachineIsolateEmulatorThread.fromString(reader.getString()); @@ -793,12 +730,6 @@ public static VirtualMachineProperties fromJson(JsonReader jsonReader) throws IO List placementHints = reader.readArray(reader1 -> VirtualMachinePlacementHint.fromJson(reader1)); deserializedVirtualMachineProperties.placementHints = placementHints; - } else if ("powerState".equals(fieldName)) { - deserializedVirtualMachineProperties.powerState - = VirtualMachinePowerState.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedVirtualMachineProperties.provisioningState - = VirtualMachineProvisioningState.fromString(reader.getString()); } else if ("sshPublicKeys".equals(fieldName)) { List sshPublicKeys = reader.readArray(reader1 -> SshPublicKey.fromJson(reader1)); deserializedVirtualMachineProperties.sshPublicKeys = sshPublicKeys; @@ -815,9 +746,28 @@ public static VirtualMachineProperties fromJson(JsonReader jsonReader) throws IO } else if ("vmImageRepositoryCredentials".equals(fieldName)) { deserializedVirtualMachineProperties.vmImageRepositoryCredentials = ImageRepositoryCredentials.fromJson(reader); + } else if ("availabilityZone".equals(fieldName)) { + deserializedVirtualMachineProperties.availabilityZone = reader.getString(); + } else if ("bareMetalMachineId".equals(fieldName)) { + deserializedVirtualMachineProperties.bareMetalMachineId = reader.getString(); + } else if ("clusterId".equals(fieldName)) { + deserializedVirtualMachineProperties.clusterId = reader.getString(); + } else if ("consoleExtendedLocation".equals(fieldName)) { + deserializedVirtualMachineProperties.consoleExtendedLocation = ExtendedLocation.fromJson(reader); + } else if ("detailedStatus".equals(fieldName)) { + deserializedVirtualMachineProperties.detailedStatus + = VirtualMachineDetailedStatus.fromString(reader.getString()); + } else if ("detailedStatusMessage".equals(fieldName)) { + deserializedVirtualMachineProperties.detailedStatusMessage = reader.getString(); + } else if ("powerState".equals(fieldName)) { + deserializedVirtualMachineProperties.powerState + = VirtualMachinePowerState.fromString(reader.getString()); } else if ("volumes".equals(fieldName)) { List volumes = reader.readArray(reader1 -> reader1.getString()); deserializedVirtualMachineProperties.volumes = volumes; + } else if ("provisioningState".equals(fieldName)) { + deserializedVirtualMachineProperties.provisioningState + = VirtualMachineProvisioningState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VolumeInner.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VolumeInner.java index 1fe91fe17725..be69dad50286 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VolumeInner.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VolumeInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -24,19 +23,20 @@ @Fluent public final class VolumeInner extends Resource { /* - * Resource ETag. + * The list of the resource properties. */ - private String etag; + private VolumeProperties innerProperties = new VolumeProperties(); /* - * The extended location of the cluster associated with the resource. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private ExtendedLocation extendedLocation; + private String etag; /* - * The list of the resource properties. + * The extended location of the resource. This property is required when creating the resource. */ - private VolumeProperties innerProperties = new VolumeProperties(); + private ExtendedLocation extendedLocation; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -65,7 +65,19 @@ public VolumeInner() { } /** - * Get the etag property: Resource ETag. + * Get the innerProperties property: The list of the resource properties. + * + * @return the innerProperties value. + */ + private VolumeProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ @@ -74,7 +86,8 @@ public String etag() { } /** - * Get the extendedLocation property: The extended location of the cluster associated with the resource. + * Get the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @return the extendedLocation value. */ @@ -83,7 +96,8 @@ public ExtendedLocation extendedLocation() { } /** - * Set the extendedLocation property: The extended location of the cluster associated with the resource. + * Set the extendedLocation property: The extended location of the resource. This property is required when creating + * the resource. * * @param extendedLocation the extendedLocation value to set. * @return the VolumeInner object itself. @@ -93,15 +107,6 @@ public VolumeInner withExtendedLocation(ExtendedLocation extendedLocation) { return this; } - /** - * Get the innerProperties property: The list of the resource properties. - * - * @return the innerProperties value. - */ - private VolumeProperties innerProperties() { - return this.innerProperties; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -160,128 +165,116 @@ public VolumeInner withTags(Map tags) { } /** - * Get the allocatedSizeMiB property: The allocated size of the volume in Mebibytes. + * Get the sizeMiB property: The requested storage allocation for the volume in Mebibytes. * - * @return the allocatedSizeMiB value. + * @return the sizeMiB value. */ - public Long allocatedSizeMiB() { - return this.innerProperties() == null ? null : this.innerProperties().allocatedSizeMiB(); + public long sizeMiB() { + return this.innerProperties() == null ? 0L : this.innerProperties().sizeMiB(); } /** - * Get the attachedTo property: The list of resource IDs that attach the volume. It may include virtual machines and - * Hybrid AKS clusters. + * Set the sizeMiB property: The requested storage allocation for the volume in Mebibytes. * - * @return the attachedTo value. + * @param sizeMiB the sizeMiB value to set. + * @return the VolumeInner object itself. */ - public List attachedTo() { - return this.innerProperties() == null ? null : this.innerProperties().attachedTo(); + public VolumeInner withSizeMiB(long sizeMiB) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withSizeMiB(sizeMiB); + return this; } /** - * Get the detailedStatus property: The more detailed status of the volume. + * Get the storageApplianceId property: The resource ID of the storage appliance that hosts the volume. * - * @return the detailedStatus value. + * @return the storageApplianceId value. */ - public VolumeDetailedStatus detailedStatus() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); + public String storageApplianceId() { + return this.innerProperties() == null ? null : this.innerProperties().storageApplianceId(); } /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * Set the storageApplianceId property: The resource ID of the storage appliance that hosts the volume. * - * @return the detailedStatusMessage value. + * @param storageApplianceId the storageApplianceId value to set. + * @return the VolumeInner object itself. */ - public String detailedStatusMessage() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); + public VolumeInner withStorageApplianceId(String storageApplianceId) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withStorageApplianceId(storageApplianceId); + return this; } /** - * Get the provisioningState property: The provisioning state of the volume. + * Get the allocatedSizeMiB property: The allocated size of the volume in Mebibytes. * - * @return the provisioningState value. + * @return the allocatedSizeMiB value. */ - public VolumeProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public Long allocatedSizeMiB() { + return this.innerProperties() == null ? null : this.innerProperties().allocatedSizeMiB(); } /** - * Get the serialNumber property: The unique identifier of the volume. + * Get the assignedStorageApplianceId property: The assigned resource ID of the storage appliance that hosts the + * volume. * - * @return the serialNumber value. + * @return the assignedStorageApplianceId value. */ - public String serialNumber() { - return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); + public String assignedStorageApplianceId() { + return this.innerProperties() == null ? null : this.innerProperties().assignedStorageApplianceId(); } /** - * Get the sizeMiB property: The requested storage allocation for the volume in Mebibytes. + * Get the attachedTo property: The list of resource IDs that attach the volume. It may include virtual machines and + * Hybrid AKS clusters. * - * @return the sizeMiB value. + * @return the attachedTo value. */ - public long sizeMiB() { - return this.innerProperties() == null ? 0L : this.innerProperties().sizeMiB(); + public List attachedTo() { + return this.innerProperties() == null ? null : this.innerProperties().attachedTo(); } /** - * Set the sizeMiB property: The requested storage allocation for the volume in Mebibytes. + * Get the detailedStatus property: The more detailed status of the volume. * - * @param sizeMiB the sizeMiB value to set. - * @return the VolumeInner object itself. + * @return the detailedStatus value. */ - public VolumeInner withSizeMiB(long sizeMiB) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withSizeMiB(sizeMiB); - return this; + public VolumeDetailedStatus detailedStatus() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); } /** - * Get the storageApplianceId property: The resource ID of the storage appliance that hosts the volume. + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. * - * @return the storageApplianceId value. + * @return the detailedStatusMessage value. */ - public String storageApplianceId() { - return this.innerProperties() == null ? null : this.innerProperties().storageApplianceId(); + public String detailedStatusMessage() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatusMessage(); } /** - * Set the storageApplianceId property: The resource ID of the storage appliance that hosts the volume. + * Get the serialNumber property: The unique identifier of the volume. * - * @param storageApplianceId the storageApplianceId value to set. - * @return the VolumeInner object itself. + * @return the serialNumber value. */ - public VolumeInner withStorageApplianceId(String storageApplianceId) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withStorageApplianceId(storageApplianceId); - return this; + public String serialNumber() { + return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); } /** - * Validates the instance. + * Get the provisioningState property: The provisioning state of the volume. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - public void validate() { - if (extendedLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property extendedLocation in model VolumeInner")); - } else { - extendedLocation().validate(); - } - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property innerProperties in model VolumeInner")); - } else { - innerProperties().validate(); - } + public VolumeProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - private static final ClientLogger LOGGER = new ClientLogger(VolumeInner.class); - /** * {@inheritDoc} */ @@ -290,8 +283,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); return jsonWriter.writeEndObject(); } @@ -322,10 +315,10 @@ public static VolumeInner fromJson(JsonReader jsonReader) throws IOException { } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedVolumeInner.withTags(tags); - } else if ("extendedLocation".equals(fieldName)) { - deserializedVolumeInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedVolumeInner.innerProperties = VolumeProperties.fromJson(reader); + } else if ("extendedLocation".equals(fieldName)) { + deserializedVolumeInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedVolumeInner.etag = reader.getString(); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VolumeProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VolumeProperties.java index acf5b4559cba..458a8263a141 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VolumeProperties.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VolumeProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.fluent.models; @@ -19,11 +19,26 @@ */ @Fluent public final class VolumeProperties implements JsonSerializable { + /* + * The requested storage allocation for the volume in Mebibytes. + */ + private long sizeMiB; + + /* + * The resource ID of the storage appliance that hosts the volume. + */ + private String storageApplianceId; + /* * The allocated size of the volume in Mebibytes. */ private Long allocatedSizeMiB; + /* + * The assigned resource ID of the storage appliance that hosts the volume. + */ + private String assignedStorageApplianceId; + /* * The list of resource IDs that attach the volume. It may include virtual machines and Hybrid AKS clusters. */ @@ -39,25 +54,15 @@ public final class VolumeProperties implements JsonSerializable attachedTo() { - return this.attachedTo; + public VolumeProperties withSizeMiB(long sizeMiB) { + this.sizeMiB = sizeMiB; + return this; } /** - * Get the detailedStatus property: The more detailed status of the volume. + * Get the storageApplianceId property: The resource ID of the storage appliance that hosts the volume. * - * @return the detailedStatus value. + * @return the storageApplianceId value. */ - public VolumeDetailedStatus detailedStatus() { - return this.detailedStatus; + public String storageApplianceId() { + return this.storageApplianceId; } /** - * Get the detailedStatusMessage property: The descriptive message about the current detailed status. + * Set the storageApplianceId property: The resource ID of the storage appliance that hosts the volume. * - * @return the detailedStatusMessage value. + * @param storageApplianceId the storageApplianceId value to set. + * @return the VolumeProperties object itself. */ - public String detailedStatusMessage() { - return this.detailedStatusMessage; + public VolumeProperties withStorageApplianceId(String storageApplianceId) { + this.storageApplianceId = storageApplianceId; + return this; } /** - * Get the provisioningState property: The provisioning state of the volume. + * Get the allocatedSizeMiB property: The allocated size of the volume in Mebibytes. * - * @return the provisioningState value. + * @return the allocatedSizeMiB value. */ - public VolumeProvisioningState provisioningState() { - return this.provisioningState; + public Long allocatedSizeMiB() { + return this.allocatedSizeMiB; } /** - * Get the serialNumber property: The unique identifier of the volume. + * Get the assignedStorageApplianceId property: The assigned resource ID of the storage appliance that hosts the + * volume. * - * @return the serialNumber value. + * @return the assignedStorageApplianceId value. */ - public String serialNumber() { - return this.serialNumber; + public String assignedStorageApplianceId() { + return this.assignedStorageApplianceId; } /** - * Get the sizeMiB property: The requested storage allocation for the volume in Mebibytes. + * Get the attachedTo property: The list of resource IDs that attach the volume. It may include virtual machines and + * Hybrid AKS clusters. * - * @return the sizeMiB value. + * @return the attachedTo value. */ - public long sizeMiB() { - return this.sizeMiB; + public List attachedTo() { + return this.attachedTo; } /** - * Set the sizeMiB property: The requested storage allocation for the volume in Mebibytes. + * Get the detailedStatus property: The more detailed status of the volume. * - * @param sizeMiB the sizeMiB value to set. - * @return the VolumeProperties object itself. + * @return the detailedStatus value. */ - public VolumeProperties withSizeMiB(long sizeMiB) { - this.sizeMiB = sizeMiB; - return this; + public VolumeDetailedStatus detailedStatus() { + return this.detailedStatus; } /** - * Get the storageApplianceId property: The resource ID of the storage appliance that hosts the volume. + * Get the detailedStatusMessage property: The descriptive message about the current detailed status. * - * @return the storageApplianceId value. + * @return the detailedStatusMessage value. */ - public String storageApplianceId() { - return this.storageApplianceId; + public String detailedStatusMessage() { + return this.detailedStatusMessage; } /** - * Set the storageApplianceId property: The resource ID of the storage appliance that hosts the volume. + * Get the serialNumber property: The unique identifier of the volume. * - * @param storageApplianceId the storageApplianceId value to set. - * @return the VolumeProperties object itself. + * @return the serialNumber value. */ - public VolumeProperties withStorageApplianceId(String storageApplianceId) { - this.storageApplianceId = storageApplianceId; - return this; + public String serialNumber() { + return this.serialNumber; } /** - * Validates the instance. + * Get the provisioningState property: The provisioning state of the volume. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - public void validate() { + public VolumeProvisioningState provisioningState() { + return this.provisioningState; } /** @@ -197,8 +204,12 @@ public static VolumeProperties fromJson(JsonReader jsonReader) throws IOExceptio if ("sizeMiB".equals(fieldName)) { deserializedVolumeProperties.sizeMiB = reader.getLong(); + } else if ("storageApplianceId".equals(fieldName)) { + deserializedVolumeProperties.storageApplianceId = reader.getString(); } else if ("allocatedSizeMiB".equals(fieldName)) { deserializedVolumeProperties.allocatedSizeMiB = reader.getNullable(JsonReader::getLong); + } else if ("assignedStorageApplianceId".equals(fieldName)) { + deserializedVolumeProperties.assignedStorageApplianceId = reader.getString(); } else if ("attachedTo".equals(fieldName)) { List attachedTo = reader.readArray(reader1 -> reader1.getString()); deserializedVolumeProperties.attachedTo = attachedTo; @@ -206,13 +217,11 @@ public static VolumeProperties fromJson(JsonReader jsonReader) throws IOExceptio deserializedVolumeProperties.detailedStatus = VolumeDetailedStatus.fromString(reader.getString()); } else if ("detailedStatusMessage".equals(fieldName)) { deserializedVolumeProperties.detailedStatusMessage = reader.getString(); + } else if ("serialNumber".equals(fieldName)) { + deserializedVolumeProperties.serialNumber = reader.getString(); } else if ("provisioningState".equals(fieldName)) { deserializedVolumeProperties.provisioningState = VolumeProvisioningState.fromString(reader.getString()); - } else if ("serialNumber".equals(fieldName)) { - deserializedVolumeProperties.serialNumber = reader.getString(); - } else if ("storageApplianceId".equals(fieldName)) { - deserializedVolumeProperties.storageApplianceId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/package-info.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/package-info.java index 15e1bcf886fe..5050b6a351c1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/package-info.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/package-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the inner data models for NetworkCloud. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/package-info.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/package-info.java index 977a52d96d74..59008188b4b9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/package-info.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/fluent/package-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the service clients for NetworkCloud. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AccessBridgeImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AccessBridgeImpl.java new file mode 100644 index 000000000000..2dea536627cf --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AccessBridgeImpl.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.networkcloud.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.networkcloud.fluent.models.AccessBridgeInner; +import com.azure.resourcemanager.networkcloud.models.AccessBridge; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeAllowedName; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeDetailedStatus; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeEndpoint; +import com.azure.resourcemanager.networkcloud.models.AccessBridgePatchParameters; +import com.azure.resourcemanager.networkcloud.models.AccessBridgePatchProperties; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeProvisioningState; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeSecurityRule; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.TransportProtocol; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class AccessBridgeImpl implements AccessBridge, AccessBridge.Definition, AccessBridge.Update { + private AccessBridgeInner innerObject; + + private final com.azure.resourcemanager.networkcloud.NetworkCloudManager 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 String etag() { + return this.innerModel().etag(); + } + + public ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String ipv4ConnectedPrefix() { + return this.innerModel().ipv4ConnectedPrefix(); + } + + public String ipv6ConnectedPrefix() { + return this.innerModel().ipv6ConnectedPrefix(); + } + + public String networkId() { + return this.innerModel().networkId(); + } + + public List securityRules() { + List inner = this.innerModel().securityRules(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public AccessBridgeDetailedStatus detailedStatus() { + return this.innerModel().detailedStatus(); + } + + public String detailedStatusMessage() { + return this.innerModel().detailedStatusMessage(); + } + + public List endpoints() { + List inner = this.innerModel().endpoints(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public TransportProtocol protocol() { + return this.innerModel().protocol(); + } + + public AccessBridgeProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public AccessBridgeInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.networkcloud.NetworkCloudManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private AccessBridgeAllowedName accessBridgeName; + + private String updateIfMatch; + + private String updateIfNoneMatch; + + private AccessBridgePatchParameters updateAccessBridgeUpdateParameters; + + public AccessBridgeImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public AccessBridge create() { + this.innerObject = serviceManager.serviceClient() + .getAccessBridges() + .createOrUpdate(resourceGroupName, accessBridgeName, this.innerModel(), Context.NONE); + return this; + } + + public AccessBridge create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAccessBridges() + .createOrUpdate(resourceGroupName, accessBridgeName, this.innerModel(), context); + return this; + } + + AccessBridgeImpl(AccessBridgeAllowedName name, + com.azure.resourcemanager.networkcloud.NetworkCloudManager serviceManager) { + this.innerObject = new AccessBridgeInner(); + this.serviceManager = serviceManager; + this.accessBridgeName = name; + } + + public AccessBridgeImpl update() { + this.updateIfMatch = null; + this.updateIfNoneMatch = null; + this.updateAccessBridgeUpdateParameters = new AccessBridgePatchParameters(); + return this; + } + + public AccessBridge apply() { + this.innerObject = serviceManager.serviceClient() + .getAccessBridges() + .update(resourceGroupName, accessBridgeName, updateIfMatch, updateIfNoneMatch, + updateAccessBridgeUpdateParameters, Context.NONE); + return this; + } + + public AccessBridge apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAccessBridges() + .update(resourceGroupName, accessBridgeName, updateIfMatch, updateIfNoneMatch, + updateAccessBridgeUpdateParameters, context); + return this; + } + + AccessBridgeImpl(AccessBridgeInner innerObject, + com.azure.resourcemanager.networkcloud.NetworkCloudManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accessBridgeName = AccessBridgeAllowedName + .fromString(ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "accessBridges")); + } + + public AccessBridge refresh() { + this.innerObject = serviceManager.serviceClient() + .getAccessBridges() + .getByResourceGroupWithResponse(resourceGroupName, accessBridgeName, Context.NONE) + .getValue(); + return this; + } + + public AccessBridge refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAccessBridges() + .getByResourceGroupWithResponse(resourceGroupName, accessBridgeName, context) + .getValue(); + return this; + } + + public AccessBridgeImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public AccessBridgeImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public AccessBridgeImpl withExtendedLocation(ExtendedLocation extendedLocation) { + this.innerModel().withExtendedLocation(extendedLocation); + return this; + } + + public AccessBridgeImpl withNetworkId(String networkId) { + this.innerModel().withNetworkId(networkId); + return this; + } + + public AccessBridgeImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateAccessBridgeUpdateParameters.withTags(tags); + return this; + } + } + + public AccessBridgeImpl withIpv4ConnectedPrefix(String ipv4ConnectedPrefix) { + this.innerModel().withIpv4ConnectedPrefix(ipv4ConnectedPrefix); + return this; + } + + public AccessBridgeImpl withIpv6ConnectedPrefix(String ipv6ConnectedPrefix) { + this.innerModel().withIpv6ConnectedPrefix(ipv6ConnectedPrefix); + return this; + } + + public AccessBridgeImpl withSecurityRules(List securityRules) { + this.innerModel().withSecurityRules(securityRules); + return this; + } + + public AccessBridgeImpl withProperties(AccessBridgePatchProperties properties) { + this.updateAccessBridgeUpdateParameters.withProperties(properties); + return this; + } + + public AccessBridgeImpl withIfMatch(String ifMatch) { + this.updateIfMatch = ifMatch; + return this; + } + + public AccessBridgeImpl withIfNoneMatch(String ifNoneMatch) { + this.updateIfNoneMatch = ifNoneMatch; + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AccessBridgesClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AccessBridgesClientImpl.java new file mode 100644 index 000000000000..ea02253c61ee --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AccessBridgesClientImpl.java @@ -0,0 +1,1413 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.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.networkcloud.fluent.AccessBridgesClient; +import com.azure.resourcemanager.networkcloud.fluent.models.AccessBridgeInner; +import com.azure.resourcemanager.networkcloud.implementation.models.AccessBridgeList; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeAllowedName; +import com.azure.resourcemanager.networkcloud.models.AccessBridgePatchParameters; +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 AccessBridgesClient. + */ +public final class AccessBridgesClientImpl implements AccessBridgesClient { + /** + * The proxy service used to perform REST calls. + */ + private final AccessBridgesService service; + + /** + * The service client containing this operation class. + */ + private final NetworkCloudManagementClientImpl client; + + /** + * Initializes an instance of AccessBridgesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AccessBridgesClientImpl(NetworkCloudManagementClientImpl client) { + this.service + = RestProxy.create(AccessBridgesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetworkCloudManagementClientAccessBridges to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientAccessBridges") + public interface AccessBridgesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/accessBridges/{accessBridgeName}") + @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("accessBridgeName") AccessBridgeAllowedName accessBridgeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/accessBridges/{accessBridgeName}") + @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("accessBridgeName") AccessBridgeAllowedName accessBridgeName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/accessBridges/{accessBridgeName}") + @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("accessBridgeName") AccessBridgeAllowedName accessBridgeName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AccessBridgeInner accessBridge, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/accessBridges/{accessBridgeName}") + @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("accessBridgeName") AccessBridgeAllowedName accessBridgeName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AccessBridgeInner accessBridge, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/accessBridges/{accessBridgeName}") + @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("accessBridgeName") AccessBridgeAllowedName accessBridgeName, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") AccessBridgePatchParameters accessBridgeUpdateParameters, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/accessBridges/{accessBridgeName}") + @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("accessBridgeName") AccessBridgeAllowedName accessBridgeName, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") AccessBridgePatchParameters accessBridgeUpdateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/accessBridges/{accessBridgeName}") + @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("accessBridgeName") AccessBridgeAllowedName accessBridgeName, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/accessBridges/{accessBridgeName}") + @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("accessBridgeName") AccessBridgeAllowedName accessBridgeName, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/accessBridges") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/accessBridges") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/accessBridges") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/accessBridges") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, + @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> listBySubscriptionNext( + @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 listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the properties of the provided access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the provided access bridge along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessBridgeName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the properties of the provided access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the provided access bridge on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, accessBridgeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the properties of the provided access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @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 properties of the provided access bridge along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessBridgeName, accept, context); + } + + /** + * Get the properties of the provided access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the provided access bridge. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessBridgeInner getByResourceGroup(String resourceGroupName, AccessBridgeAllowedName accessBridgeName) { + return getByResourceGroupWithResponse(resourceGroupName, accessBridgeName, Context.NONE).getValue(); + } + + /** + * Create a new access bridge or update the properties of the existing access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param accessBridge The access bridge configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return accessBridge represents a managed access bridge resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName, AccessBridgeInner accessBridge) { + 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, accessBridgeName, contentType, accept, accessBridge, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a new access bridge or update the properties of the existing access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param accessBridge The access bridge configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return accessBridge represents a managed access bridge resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName, AccessBridgeInner accessBridge) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessBridgeName, contentType, accept, accessBridge, + Context.NONE); + } + + /** + * Create a new access bridge or update the properties of the existing access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param accessBridge The access bridge configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return accessBridge represents a managed access bridge resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName, AccessBridgeInner accessBridge, 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, accessBridgeName, contentType, accept, accessBridge, + context); + } + + /** + * Create a new access bridge or update the properties of the existing access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param accessBridge The access bridge configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AccessBridgeInner> beginCreateOrUpdateAsync( + String resourceGroupName, AccessBridgeAllowedName accessBridgeName, AccessBridgeInner accessBridge) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accessBridgeName, accessBridge); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AccessBridgeInner.class, AccessBridgeInner.class, this.client.getContext()); + } + + /** + * Create a new access bridge or update the properties of the existing access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param accessBridge The access bridge configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AccessBridgeInner> beginCreateOrUpdate(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName, AccessBridgeInner accessBridge) { + Response response = createOrUpdateWithResponse(resourceGroupName, accessBridgeName, accessBridge); + return this.client.getLroResult(response, AccessBridgeInner.class, + AccessBridgeInner.class, Context.NONE); + } + + /** + * Create a new access bridge or update the properties of the existing access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param accessBridge The access bridge configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AccessBridgeInner> beginCreateOrUpdate(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName, AccessBridgeInner accessBridge, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accessBridgeName, accessBridge, context); + return this.client.getLroResult(response, AccessBridgeInner.class, + AccessBridgeInner.class, context); + } + + /** + * Create a new access bridge or update the properties of the existing access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param accessBridge The access bridge configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return accessBridge represents a managed access bridge resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName, AccessBridgeInner accessBridge) { + return beginCreateOrUpdateAsync(resourceGroupName, accessBridgeName, accessBridge).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a new access bridge or update the properties of the existing access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param accessBridge The access bridge configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessBridgeInner createOrUpdate(String resourceGroupName, AccessBridgeAllowedName accessBridgeName, + AccessBridgeInner accessBridge) { + return beginCreateOrUpdate(resourceGroupName, accessBridgeName, accessBridge).getFinalResult(); + } + + /** + * Create a new access bridge or update the properties of the existing access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param accessBridge The access bridge configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessBridgeInner createOrUpdate(String resourceGroupName, AccessBridgeAllowedName accessBridgeName, + AccessBridgeInner accessBridge, Context context) { + return beginCreateOrUpdate(resourceGroupName, accessBridgeName, accessBridge, context).getFinalResult(); + } + + /** + * Update properties of the provided access bridge, or update tags associated with the access bridge. Properties and + * tag updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param accessBridgeUpdateParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return accessBridge represents a managed access bridge resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName, String ifMatch, String ifNoneMatch, + AccessBridgePatchParameters accessBridgeUpdateParameters) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch, accept, + accessBridgeUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update properties of the provided access bridge, or update tags associated with the access bridge. Properties and + * tag updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param accessBridgeUpdateParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return accessBridge represents a managed access bridge resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, AccessBridgeAllowedName accessBridgeName, + String ifMatch, String ifNoneMatch, AccessBridgePatchParameters accessBridgeUpdateParameters) { + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch, accept, + accessBridgeUpdateParameters, Context.NONE); + } + + /** + * Update properties of the provided access bridge, or update tags associated with the access bridge. Properties and + * tag updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param accessBridgeUpdateParameters The request body. + * @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 accessBridge represents a managed access bridge resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, AccessBridgeAllowedName accessBridgeName, + String ifMatch, String ifNoneMatch, AccessBridgePatchParameters accessBridgeUpdateParameters, Context context) { + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch, accept, + accessBridgeUpdateParameters, context); + } + + /** + * Update properties of the provided access bridge, or update tags associated with the access bridge. Properties and + * tag updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param accessBridgeUpdateParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AccessBridgeInner> beginUpdateAsync(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName, String ifMatch, String ifNoneMatch, + AccessBridgePatchParameters accessBridgeUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, accessBridgeName, ifMatch, + ifNoneMatch, accessBridgeUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AccessBridgeInner.class, AccessBridgeInner.class, this.client.getContext()); + } + + /** + * Update properties of the provided access bridge, or update tags associated with the access bridge. Properties and + * tag updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AccessBridgeInner> beginUpdateAsync(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final AccessBridgePatchParameters accessBridgeUpdateParameters = null; + Mono>> mono = updateWithResponseAsync(resourceGroupName, accessBridgeName, ifMatch, + ifNoneMatch, accessBridgeUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AccessBridgeInner.class, AccessBridgeInner.class, this.client.getContext()); + } + + /** + * Update properties of the provided access bridge, or update tags associated with the access bridge. Properties and + * tag updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param accessBridgeUpdateParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AccessBridgeInner> beginUpdate(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName, String ifMatch, String ifNoneMatch, + AccessBridgePatchParameters accessBridgeUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch, + accessBridgeUpdateParameters); + return this.client.getLroResult(response, AccessBridgeInner.class, + AccessBridgeInner.class, Context.NONE); + } + + /** + * Update properties of the provided access bridge, or update tags associated with the access bridge. Properties and + * tag updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AccessBridgeInner> beginUpdate(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final AccessBridgePatchParameters accessBridgeUpdateParameters = null; + Response response = updateWithResponse(resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch, + accessBridgeUpdateParameters); + return this.client.getLroResult(response, AccessBridgeInner.class, + AccessBridgeInner.class, Context.NONE); + } + + /** + * Update properties of the provided access bridge, or update tags associated with the access bridge. Properties and + * tag updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param accessBridgeUpdateParameters The request body. + * @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 accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AccessBridgeInner> beginUpdate(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName, String ifMatch, String ifNoneMatch, + AccessBridgePatchParameters accessBridgeUpdateParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch, + accessBridgeUpdateParameters, context); + return this.client.getLroResult(response, AccessBridgeInner.class, + AccessBridgeInner.class, context); + } + + /** + * Update properties of the provided access bridge, or update tags associated with the access bridge. Properties and + * tag updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param accessBridgeUpdateParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return accessBridge represents a managed access bridge resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, AccessBridgeAllowedName accessBridgeName, + String ifMatch, String ifNoneMatch, AccessBridgePatchParameters accessBridgeUpdateParameters) { + return beginUpdateAsync(resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch, accessBridgeUpdateParameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update properties of the provided access bridge, or update tags associated with the access bridge. Properties and + * tag updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return accessBridge represents a managed access bridge resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, AccessBridgeAllowedName accessBridgeName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final AccessBridgePatchParameters accessBridgeUpdateParameters = null; + return beginUpdateAsync(resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch, accessBridgeUpdateParameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update properties of the provided access bridge, or update tags associated with the access bridge. Properties and + * tag updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessBridgeInner update(String resourceGroupName, AccessBridgeAllowedName accessBridgeName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final AccessBridgePatchParameters accessBridgeUpdateParameters = null; + return beginUpdate(resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch, accessBridgeUpdateParameters) + .getFinalResult(); + } + + /** + * Update properties of the provided access bridge, or update tags associated with the access bridge. Properties and + * tag updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param accessBridgeUpdateParameters The request body. + * @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 accessBridge represents a managed access bridge resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessBridgeInner update(String resourceGroupName, AccessBridgeAllowedName accessBridgeName, String ifMatch, + String ifNoneMatch, AccessBridgePatchParameters accessBridgeUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch, accessBridgeUpdateParameters, + context).getFinalResult(); + } + + /** + * Delete the specified access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, + AccessBridgeAllowedName accessBridgeName, String ifMatch, String ifNoneMatch) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, AccessBridgeAllowedName accessBridgeName, + String ifMatch, String ifNoneMatch) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch, Context.NONE); + } + + /** + * Delete the specified access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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, AccessBridgeAllowedName accessBridgeName, + String ifMatch, String ifNoneMatch, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch, context); + } + + /** + * Delete the specified access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, + AccessBridgeAllowedName accessBridgeName, String ifMatch, String ifNoneMatch) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, + AccessBridgeAllowedName accessBridgeName) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, + AccessBridgeAllowedName accessBridgeName, String ifMatch, String ifNoneMatch) { + Response response = deleteWithResponse(resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, + AccessBridgeAllowedName accessBridgeName) { + final String ifMatch = null; + final String ifNoneMatch = null; + Response response = deleteWithResponse(resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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, + AccessBridgeAllowedName accessBridgeName, String ifMatch, String ifNoneMatch, Context context) { + Response response + = deleteWithResponse(resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, AccessBridgeAllowedName accessBridgeName, String ifMatch, + String ifNoneMatch) { + return beginDeleteAsync(resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, AccessBridgeAllowedName accessBridgeName) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginDeleteAsync(resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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, AccessBridgeAllowedName accessBridgeName) { + final String ifMatch = null; + final String ifNoneMatch = null; + beginDelete(resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch).getFinalResult(); + } + + /** + * Delete the specified access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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, AccessBridgeAllowedName accessBridgeName, String ifMatch, + String ifNoneMatch, Context context) { + beginDelete(resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch, context).getFinalResult(); + } + + /** + * Get a list of access bridges in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 access bridges in the provided resource group along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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 a list of access bridges in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 access bridges in the provided resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, + String skipToken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of access bridges in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of access bridges in the provided resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of access bridges in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 access bridges in the provided resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of access bridges in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 access bridges in the provided resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of access bridges in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of access bridges in the provided resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * Get a list of access bridges in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 access bridges in the provided resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Get a list of access bridges in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 access bridges in the provided subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, 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 a list of access bridges in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 access bridges in the provided subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Integer top, String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of access bridges in the provided subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of access bridges in the provided subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of access bridges in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 access bridges in the provided subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Integer top, String skipToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of access bridges in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 access bridges in the provided subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of access bridges in the provided subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of access bridges in the provided subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listSinglePage(top, skipToken), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * Get a list of access bridges in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 access bridges in the provided subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Integer top, String skipToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), + nextLink -> listBySubscriptionNextSinglePage(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 access bridges in the provided resource group 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 a list of access bridges in the provided resource group 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 a list of access bridges in the provided resource group 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 a list of access bridges in the provided subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(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 access bridges in the provided subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(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 access bridges in the provided subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(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/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AccessBridgesImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AccessBridgesImpl.java new file mode 100644 index 000000000000..c3e62d2da783 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AccessBridgesImpl.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.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.networkcloud.fluent.AccessBridgesClient; +import com.azure.resourcemanager.networkcloud.fluent.models.AccessBridgeInner; +import com.azure.resourcemanager.networkcloud.models.AccessBridge; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeAllowedName; +import com.azure.resourcemanager.networkcloud.models.AccessBridges; + +public final class AccessBridgesImpl implements AccessBridges { + private static final ClientLogger LOGGER = new ClientLogger(AccessBridgesImpl.class); + + private final AccessBridgesClient innerClient; + + private final com.azure.resourcemanager.networkcloud.NetworkCloudManager serviceManager; + + public AccessBridgesImpl(AccessBridgesClient innerClient, + com.azure.resourcemanager.networkcloud.NetworkCloudManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, accessBridgeName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AccessBridgeImpl(inner.getValue(), this.manager())); + } + + public AccessBridge getByResourceGroup(String resourceGroupName, AccessBridgeAllowedName accessBridgeName) { + AccessBridgeInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, accessBridgeName); + if (inner != null) { + return new AccessBridgeImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, AccessBridgeAllowedName accessBridgeName) { + this.serviceClient().delete(resourceGroupName, accessBridgeName); + } + + public void delete(String resourceGroupName, AccessBridgeAllowedName accessBridgeName, String ifMatch, + String ifNoneMatch, Context context) { + this.serviceClient().delete(resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AccessBridgeImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AccessBridgeImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AccessBridgeImpl(inner1, this.manager())); + } + + public PagedIterable list(Integer top, String skipToken, Context context) { + PagedIterable inner = this.serviceClient().list(top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AccessBridgeImpl(inner1, this.manager())); + } + + public AccessBridge 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 accessBridgeNameLocal = ResourceManagerUtils.getValueFromIdByName(id, "accessBridges"); + if (accessBridgeNameLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'accessBridges'.", id))); + } + AccessBridgeAllowedName accessBridgeName = AccessBridgeAllowedName.fromString(accessBridgeNameLocal); + return this.getByResourceGroupWithResponse(resourceGroupName, accessBridgeName, 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 accessBridgeNameLocal = ResourceManagerUtils.getValueFromIdByName(id, "accessBridges"); + if (accessBridgeNameLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'accessBridges'.", id))); + } + AccessBridgeAllowedName accessBridgeName = AccessBridgeAllowedName.fromString(accessBridgeNameLocal); + return this.getByResourceGroupWithResponse(resourceGroupName, accessBridgeName, 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 accessBridgeNameLocal = ResourceManagerUtils.getValueFromIdByName(id, "accessBridges"); + if (accessBridgeNameLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'accessBridges'.", id))); + } + AccessBridgeAllowedName accessBridgeName = AccessBridgeAllowedName.fromString(accessBridgeNameLocal); + String localIfMatch = null; + String localIfNoneMatch = null; + this.delete(resourceGroupName, accessBridgeName, localIfMatch, localIfNoneMatch, Context.NONE); + } + + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, 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 accessBridgeNameLocal = ResourceManagerUtils.getValueFromIdByName(id, "accessBridges"); + if (accessBridgeNameLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'accessBridges'.", id))); + } + AccessBridgeAllowedName accessBridgeName = AccessBridgeAllowedName.fromString(accessBridgeNameLocal); + this.delete(resourceGroupName, accessBridgeName, ifMatch, ifNoneMatch, context); + } + + private AccessBridgesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.networkcloud.NetworkCloudManager manager() { + return this.serviceManager; + } + + public AccessBridgeImpl define(AccessBridgeAllowedName name) { + return new AccessBridgeImpl(name, this.manager()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AgentPoolImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AgentPoolImpl.java index 58d4f397ddf7..7703d027e1d2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AgentPoolImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AgentPoolImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -91,18 +91,6 @@ public long count() { return this.innerModel().count(); } - public AgentPoolDetailedStatus detailedStatus() { - return this.innerModel().detailedStatus(); - } - - public String detailedStatusMessage() { - return this.innerModel().detailedStatusMessage(); - } - - public String kubernetesVersion() { - return this.innerModel().kubernetesVersion(); - } - public List labels() { List inner = this.innerModel().labels(); if (inner != null) { @@ -116,10 +104,6 @@ public AgentPoolMode mode() { return this.innerModel().mode(); } - public AgentPoolProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - public List taints() { List inner = this.innerModel().taints(); if (inner != null) { @@ -137,6 +121,22 @@ public String vmSkuName() { return this.innerModel().vmSkuName(); } + public AgentPoolDetailedStatus detailedStatus() { + return this.innerModel().detailedStatus(); + } + + public String detailedStatusMessage() { + return this.innerModel().detailedStatusMessage(); + } + + public String kubernetesVersion() { + return this.innerModel().kubernetesVersion(); + } + + public AgentPoolProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public Region region() { return Region.fromName(this.regionName()); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AgentPoolsClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AgentPoolsClientImpl.java index 9ab0848803d7..ddb1d7c9e255 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AgentPoolsClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AgentPoolsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -31,13 +31,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.AgentPoolsClient; import com.azure.resourcemanager.networkcloud.fluent.models.AgentPoolInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; -import com.azure.resourcemanager.networkcloud.models.AgentPoolList; +import com.azure.resourcemanager.networkcloud.implementation.models.AgentPoolList; import com.azure.resourcemanager.networkcloud.models.AgentPoolPatchParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,51 +53,31 @@ public final class AgentPoolsClientImpl implements AgentPoolsClient { /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of AgentPoolsClientImpl. * * @param client the instance of the service client containing this operation class. */ - AgentPoolsClientImpl(NetworkCloudImpl client) { + AgentPoolsClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(AgentPoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudAgentPools to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for NetworkCloudManagementClientAgentPools to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudAgentPools") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientAgentPools") public interface AgentPoolsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByKubernetesCluster(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("kubernetesClusterName") String kubernetesClusterName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByKubernetesClusterSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("kubernetesClusterName") String kubernetesClusterName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @@ -109,92 +87,108 @@ Mono> get(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @PathParam("agentPoolName") String agentPoolName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") AgentPoolInner agentPoolParameters, @HeaderParam("Accept") String accept, + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") AgentPoolInner agentPoolParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @PathParam("agentPoolName") String agentPoolName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") AgentPoolInner agentPoolParameters, @HeaderParam("Accept") String accept, + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") AgentPoolInner agentPoolParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @PathParam("agentPoolName") String agentPoolName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AgentPoolPatchParameters agentPoolUpdateParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @PathParam("agentPoolName") String agentPoolName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AgentPoolPatchParameters agentPoolUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @PathParam("agentPoolName") String agentPoolName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") AgentPoolPatchParameters agentPoolUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @PathParam("agentPoolName") String agentPoolName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") AgentPoolPatchParameters agentPoolUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByKubernetesCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("kubernetesClusterName") String kubernetesClusterName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByKubernetesClusterSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("kubernetesClusterName") String kubernetesClusterName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByKubernetesClusterNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -202,240 +196,11 @@ Mono> listByKubernetesClusterNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByKubernetesClusterNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List agent pools of the Kubernetes cluster. - * - * Get a list of agent pools for the provided Kubernetes cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 agent pools for the provided Kubernetes cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByKubernetesClusterSinglePageAsync(String resourceGroupName, - String kubernetesClusterName, Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByKubernetesCluster(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, - top, skipToken, 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 agent pools of the Kubernetes cluster. - * - * Get a list of agent pools for the provided Kubernetes cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 agent pools for the provided Kubernetes cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByKubernetesClusterAsync(String resourceGroupName, - String kubernetesClusterName, Integer top, String skipToken) { - return new PagedFlux<>( - () -> listByKubernetesClusterSinglePageAsync(resourceGroupName, kubernetesClusterName, top, skipToken), - nextLink -> listByKubernetesClusterNextSinglePageAsync(nextLink)); - } - - /** - * List agent pools of the Kubernetes cluster. - * - * Get a list of agent pools for the provided Kubernetes cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 agent pools for the provided Kubernetes cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByKubernetesClusterAsync(String resourceGroupName, - String kubernetesClusterName) { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>( - () -> listByKubernetesClusterSinglePageAsync(resourceGroupName, kubernetesClusterName, top, skipToken), - nextLink -> listByKubernetesClusterNextSinglePageAsync(nextLink)); - } - - /** - * List agent pools of the Kubernetes cluster. - * - * Get a list of agent pools for the provided Kubernetes cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 agent pools for the provided Kubernetes cluster along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByKubernetesClusterSinglePage(String resourceGroupName, - String kubernetesClusterName, Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listByKubernetesClusterSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, top, - skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List agent pools of the Kubernetes cluster. - * - * Get a list of agent pools for the provided Kubernetes cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 agent pools for the provided Kubernetes cluster along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByKubernetesClusterSinglePage(String resourceGroupName, - String kubernetesClusterName, Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listByKubernetesClusterSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, top, - skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List agent pools of the Kubernetes cluster. - * - * Get a list of agent pools for the provided Kubernetes cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 agent pools for the provided Kubernetes cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByKubernetesCluster(String resourceGroupName, - String kubernetesClusterName) { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>( - () -> listByKubernetesClusterSinglePage(resourceGroupName, kubernetesClusterName, top, skipToken), - nextLink -> listByKubernetesClusterNextSinglePage(nextLink)); - } - - /** - * List agent pools of the Kubernetes cluster. - * - * Get a list of agent pools for the provided Kubernetes cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 agent pools for the provided Kubernetes cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByKubernetesCluster(String resourceGroupName, String kubernetesClusterName, - Integer top, String skipToken, Context context) { - return new PagedIterable<>( - () -> listByKubernetesClusterSinglePage(resourceGroupName, kubernetesClusterName, top, skipToken, context), - nextLink -> listByKubernetesClusterNextSinglePage(nextLink, context)); - } - - /** - * Retrieve the Kubernetes cluster agent pool. - * * Get properties of the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -450,25 +215,6 @@ public PagedIterable listByKubernetesCluster(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String kubernetesClusterName, String agentPoolName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, agentPoolName, accept, context)) @@ -476,8 +222,6 @@ private Mono> getWithResponseAsync(String resourceGroup } /** - * Retrieve the Kubernetes cluster agent pool. - * * Get properties of the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -496,8 +240,6 @@ private Mono getAsync(String resourceGroupName, String kubernete } /** - * Retrieve the Kubernetes cluster agent pool. - * * Get properties of the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -512,36 +254,12 @@ private Mono getAsync(String resourceGroupName, String kubernete @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String kubernetesClusterName, String agentPoolName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (agentPoolName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, agentPoolName, accept, context); } /** - * Retrieve the Kubernetes cluster agent pool. - * * Get properties of the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -558,8 +276,6 @@ public AgentPoolInner get(String resourceGroupName, String kubernetesClusterName } /** - * Create or update the Kubernetes cluster agent pool. - * * Create a new Kubernetes cluster agent pool or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -580,42 +296,16 @@ public AgentPoolInner get(String resourceGroupName, String kubernetesClusterName private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String kubernetesClusterName, String agentPoolName, AgentPoolInner agentPoolParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - if (agentPoolParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter agentPoolParameters is required and cannot be null.")); - } else { - agentPoolParameters.validate(); - } + 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, kubernetesClusterName, agentPoolName, ifMatch, - ifNoneMatch, agentPoolParameters, accept, context)) + ifNoneMatch, contentType, accept, agentPoolParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update the Kubernetes cluster agent pool. - * * Create a new Kubernetes cluster agent pool or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -634,43 +324,14 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String kubernetesClusterName, String agentPoolName, AgentPoolInner agentPoolParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (agentPoolName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - if (agentPoolParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter agentPoolParameters is required and cannot be null.")); - } else { - agentPoolParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, - ifNoneMatch, agentPoolParameters, accept, Context.NONE); + ifNoneMatch, contentType, accept, agentPoolParameters, Context.NONE); } /** - * Create or update the Kubernetes cluster agent pool. - * * Create a new Kubernetes cluster agent pool or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -690,43 +351,14 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String kubernetesClusterName, String agentPoolName, AgentPoolInner agentPoolParameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (agentPoolName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - if (agentPoolParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter agentPoolParameters is required and cannot be null.")); - } else { - agentPoolParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, - ifNoneMatch, agentPoolParameters, accept, context); + ifNoneMatch, contentType, accept, agentPoolParameters, context); } /** - * Create or update the Kubernetes cluster agent pool. - * * Create a new Kubernetes cluster agent pool or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -753,8 +385,6 @@ private PollerFlux, AgentPoolInner> beginCreateOrUpda } /** - * Create or update the Kubernetes cluster agent pool. - * * Create a new Kubernetes cluster agent pool or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -778,8 +408,6 @@ private PollerFlux, AgentPoolInner> beginCreateOrUpda } /** - * Create or update the Kubernetes cluster agent pool. - * * Create a new Kubernetes cluster agent pool or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -806,8 +434,6 @@ public SyncPoller, AgentPoolInner> beginCreateOrUpdat } /** - * Create or update the Kubernetes cluster agent pool. - * * Create a new Kubernetes cluster agent pool or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -831,8 +457,6 @@ public SyncPoller, AgentPoolInner> beginCreateOrUpdat } /** - * Create or update the Kubernetes cluster agent pool. - * * Create a new Kubernetes cluster agent pool or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -860,8 +484,6 @@ public SyncPoller, AgentPoolInner> beginCreateOrUpdat } /** - * Create or update the Kubernetes cluster agent pool. - * * Create a new Kubernetes cluster agent pool or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -885,8 +507,6 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin } /** - * Create or update the Kubernetes cluster agent pool. - * * Create a new Kubernetes cluster agent pool or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -908,8 +528,6 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin } /** - * Create or update the Kubernetes cluster agent pool. - * * Create a new Kubernetes cluster agent pool or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -931,8 +549,6 @@ public AgentPoolInner createOrUpdate(String resourceGroupName, String kubernetes } /** - * Create or update the Kubernetes cluster agent pool. - * * Create a new Kubernetes cluster agent pool or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -957,9 +573,8 @@ public AgentPoolInner createOrUpdate(String resourceGroupName, String kubernetes } /** - * Delete the Kubernetes cluster agent pool. - * - * Delete the provided Kubernetes cluster agent pool. + * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the + * Kubernetes cluster agent pool. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -968,46 +583,28 @@ public AgentPoolInner createOrUpdate(String resourceGroupName, String kubernetes * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param agentPoolUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return agentPool represents the agent pool of Kubernetes cluster along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String kubernetesClusterName, String agentPoolName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, + String kubernetesClusterName, String agentPoolName, String ifMatch, String ifNoneMatch, + AgentPoolPatchParameters agentPoolUpdateParameters) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, - ifNoneMatch, accept, context)) + ifNoneMatch, accept, agentPoolUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the Kubernetes cluster agent pool. - * - * Delete the provided Kubernetes cluster agent pool. + * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the + * Kubernetes cluster agent pool. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1016,46 +613,24 @@ private Mono>> deleteWithResponseAsync(String resource * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param agentPoolUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return agentPool represents the agent pool of Kubernetes cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String kubernetesClusterName, - String agentPoolName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (agentPoolName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String kubernetesClusterName, + String agentPoolName, String ifMatch, String ifNoneMatch, AgentPoolPatchParameters agentPoolUpdateParameters) { final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, - ifNoneMatch, accept, Context.NONE); + ifNoneMatch, accept, agentPoolUpdateParameters, Context.NONE); } /** - * Delete the Kubernetes cluster agent pool. - * - * Delete the provided Kubernetes cluster agent pool. + * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the + * Kubernetes cluster agent pool. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1064,47 +639,26 @@ private Response deleteWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param agentPoolUpdateParameters The request body. * @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}. + * @return agentPool represents the agent pool of Kubernetes cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String kubernetesClusterName, - String agentPoolName, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (agentPoolName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String kubernetesClusterName, + String agentPoolName, String ifMatch, String ifNoneMatch, AgentPoolPatchParameters agentPoolUpdateParameters, + Context context) { final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, - ifNoneMatch, accept, context); + ifNoneMatch, accept, agentPoolUpdateParameters, context); } /** - * Delete the Kubernetes cluster agent pool. - * - * Delete the provided Kubernetes cluster agent pool. + * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the + * Kubernetes cluster agent pool. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1113,26 +667,25 @@ private Response deleteWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param agentPoolUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of agentPool represents the agent pool of Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginDeleteAsync( - String resourceGroupName, String kubernetesClusterName, String agentPoolName, String ifMatch, - String ifNoneMatch) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, - this.client.getContext()); + private PollerFlux, AgentPoolInner> beginUpdateAsync(String resourceGroupName, + String kubernetesClusterName, String agentPoolName, String ifMatch, String ifNoneMatch, + AgentPoolPatchParameters agentPoolUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, kubernetesClusterName, + agentPoolName, ifMatch, ifNoneMatch, agentPoolUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AgentPoolInner.class, AgentPoolInner.class, this.client.getContext()); } /** - * Delete the Kubernetes cluster agent pool. - * - * Delete the provided Kubernetes cluster agent pool. + * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the + * Kubernetes cluster agent pool. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1140,24 +693,23 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of agentPool represents the agent pool of Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String kubernetesClusterName, String agentPoolName) { + private PollerFlux, AgentPoolInner> beginUpdateAsync(String resourceGroupName, + String kubernetesClusterName, String agentPoolName) { final String ifMatch = null; final String ifNoneMatch = null; - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, - this.client.getContext()); + final AgentPoolPatchParameters agentPoolUpdateParameters = null; + Mono>> mono = updateWithResponseAsync(resourceGroupName, kubernetesClusterName, + agentPoolName, ifMatch, ifNoneMatch, agentPoolUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AgentPoolInner.class, AgentPoolInner.class, this.client.getContext()); } /** - * Delete the Kubernetes cluster agent pool. - * - * Delete the provided Kubernetes cluster agent pool. + * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the + * Kubernetes cluster agent pool. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1166,25 +718,25 @@ private PollerFlux, OperationStatusResult * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param agentPoolUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of agentPool represents the agent pool of Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( - String resourceGroupName, String kubernetesClusterName, String agentPoolName, String ifMatch, - String ifNoneMatch) { - Response response - = deleteWithResponse(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + public SyncPoller, AgentPoolInner> beginUpdate(String resourceGroupName, + String kubernetesClusterName, String agentPoolName, String ifMatch, String ifNoneMatch, + AgentPoolPatchParameters agentPoolUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, kubernetesClusterName, agentPoolName, + ifMatch, ifNoneMatch, agentPoolUpdateParameters); + return this.client.getLroResult(response, AgentPoolInner.class, + AgentPoolInner.class, Context.NONE); } /** - * Delete the Kubernetes cluster agent pool. - * - * Delete the provided Kubernetes cluster agent pool. + * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the + * Kubernetes cluster agent pool. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1192,23 +744,23 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of agentPool represents the agent pool of Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String kubernetesClusterName, String agentPoolName) { + public SyncPoller, AgentPoolInner> beginUpdate(String resourceGroupName, + String kubernetesClusterName, String agentPoolName) { final String ifMatch = null; final String ifNoneMatch = null; - Response response - = deleteWithResponse(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + final AgentPoolPatchParameters agentPoolUpdateParameters = null; + Response response = updateWithResponse(resourceGroupName, kubernetesClusterName, agentPoolName, + ifMatch, ifNoneMatch, agentPoolUpdateParameters); + return this.client.getLroResult(response, AgentPoolInner.class, + AgentPoolInner.class, Context.NONE); } /** - * Delete the Kubernetes cluster agent pool. - * - * Delete the provided Kubernetes cluster agent pool. + * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the + * Kubernetes cluster agent pool. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1217,26 +769,26 @@ public SyncPoller, OperationStatusResultI * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param agentPoolUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of agentPool represents the agent pool of Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( - String resourceGroupName, String kubernetesClusterName, String agentPoolName, String ifMatch, - String ifNoneMatch, Context context) { - Response response = deleteWithResponse(resourceGroupName, kubernetesClusterName, agentPoolName, - ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + public SyncPoller, AgentPoolInner> beginUpdate(String resourceGroupName, + String kubernetesClusterName, String agentPoolName, String ifMatch, String ifNoneMatch, + AgentPoolPatchParameters agentPoolUpdateParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, kubernetesClusterName, agentPoolName, + ifMatch, ifNoneMatch, agentPoolUpdateParameters, context); + return this.client.getLroResult(response, AgentPoolInner.class, + AgentPoolInner.class, context); } /** - * Delete the Kubernetes cluster agent pool. - * - * Delete the provided Kubernetes cluster agent pool. + * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the + * Kubernetes cluster agent pool. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1245,22 +797,22 @@ public SyncPoller, OperationStatusResultI * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param agentPoolUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return agentPool represents the agent pool of Kubernetes cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String kubernetesClusterName, - String agentPoolName, String ifMatch, String ifNoneMatch) { - return beginDeleteAsync(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String kubernetesClusterName, + String agentPoolName, String ifMatch, String ifNoneMatch, AgentPoolPatchParameters agentPoolUpdateParameters) { + return beginUpdateAsync(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch, + agentPoolUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the Kubernetes cluster agent pool. - * - * Delete the provided Kubernetes cluster agent pool. + * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the + * Kubernetes cluster agent pool. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1268,21 +820,21 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return agentPool represents the agent pool of Kubernetes cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String kubernetesClusterName, + private Mono updateAsync(String resourceGroupName, String kubernetesClusterName, String agentPoolName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginDeleteAsync(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + final AgentPoolPatchParameters agentPoolUpdateParameters = null; + return beginUpdateAsync(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch, + agentPoolUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the Kubernetes cluster agent pool. - * - * Delete the provided Kubernetes cluster agent pool. + * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the + * Kubernetes cluster agent pool. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1290,21 +842,20 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return agentPool represents the agent pool of Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String kubernetesClusterName, - String agentPoolName) { + public AgentPoolInner update(String resourceGroupName, String kubernetesClusterName, String agentPoolName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginDelete(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch) - .getFinalResult(); + final AgentPoolPatchParameters agentPoolUpdateParameters = null; + return beginUpdate(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch, + agentPoolUpdateParameters).getFinalResult(); } /** - * Delete the Kubernetes cluster agent pool. - * - * Delete the provided Kubernetes cluster agent pool. + * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the + * Kubernetes cluster agent pool. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1313,24 +864,22 @@ public OperationStatusResultInner delete(String resourceGroupName, String kubern * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param agentPoolUpdateParameters The request body. * @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. + * @return agentPool represents the agent pool of Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String kubernetesClusterName, - String agentPoolName, String ifMatch, String ifNoneMatch, Context context) { - return beginDelete(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch, context) - .getFinalResult(); + public AgentPoolInner update(String resourceGroupName, String kubernetesClusterName, String agentPoolName, + String ifMatch, String ifNoneMatch, AgentPoolPatchParameters agentPoolUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch, + agentPoolUpdateParameters, context).getFinalResult(); } /** - * Patch the Kubernetes cluster agent pool. - * - * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the - * Kubernetes cluster agent pool. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1339,52 +888,23 @@ public OperationStatusResultInner delete(String resourceGroupName, String kubern * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param agentPoolUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return agentPool represents the agent pool of Kubernetes cluster along with {@link Response} on successful - * completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String kubernetesClusterName, String agentPoolName, String ifMatch, String ifNoneMatch, - AgentPoolPatchParameters agentPoolUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (agentPoolName == null) { - return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - if (agentPoolUpdateParameters != null) { - agentPoolUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String kubernetesClusterName, String agentPoolName, String ifMatch, String ifNoneMatch) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, - ifNoneMatch, agentPoolUpdateParameters, accept, context)) + ifNoneMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Patch the Kubernetes cluster agent pool. - * - * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the - * Kubernetes cluster agent pool. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1393,51 +913,21 @@ private Mono>> updateWithResponseAsync(String resource * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param agentPoolUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return agentPool represents the agent pool of Kubernetes cluster along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String kubernetesClusterName, - String agentPoolName, String ifMatch, String ifNoneMatch, AgentPoolPatchParameters agentPoolUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (agentPoolName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - if (agentPoolUpdateParameters != null) { - agentPoolUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + private Response deleteWithResponse(String resourceGroupName, String kubernetesClusterName, + String agentPoolName, String ifMatch, String ifNoneMatch) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, - ifNoneMatch, agentPoolUpdateParameters, accept, Context.NONE); + ifNoneMatch, Context.NONE); } /** - * Patch the Kubernetes cluster agent pool. - * - * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the - * Kubernetes cluster agent pool. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1446,53 +936,22 @@ private Response updateWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param agentPoolUpdateParameters The request body. * @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 agentPool represents the agent pool of Kubernetes cluster along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String kubernetesClusterName, - String agentPoolName, String ifMatch, String ifNoneMatch, AgentPoolPatchParameters agentPoolUpdateParameters, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (agentPoolName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); - } - if (agentPoolUpdateParameters != null) { - agentPoolUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + private Response deleteWithResponse(String resourceGroupName, String kubernetesClusterName, + String agentPoolName, String ifMatch, String ifNoneMatch, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, - ifNoneMatch, agentPoolUpdateParameters, accept, context); + ifNoneMatch, context); } /** - * Patch the Kubernetes cluster agent pool. - * - * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the - * Kubernetes cluster agent pool. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1501,27 +960,22 @@ private Response updateWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param agentPoolUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 agentPool represents the agent pool of Kubernetes cluster. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AgentPoolInner> beginUpdateAsync(String resourceGroupName, - String kubernetesClusterName, String agentPoolName, String ifMatch, String ifNoneMatch, - AgentPoolPatchParameters agentPoolUpdateParameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, kubernetesClusterName, - agentPoolName, ifMatch, ifNoneMatch, agentPoolUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - AgentPoolInner.class, AgentPoolInner.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String kubernetesClusterName, + String agentPoolName, String ifMatch, String ifNoneMatch) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Patch the Kubernetes cluster agent pool. - * - * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the - * Kubernetes cluster agent pool. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1529,25 +983,21 @@ private PollerFlux, AgentPoolInner> beginUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 agentPool represents the agent pool of Kubernetes cluster. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AgentPoolInner> beginUpdateAsync(String resourceGroupName, - String kubernetesClusterName, String agentPoolName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String kubernetesClusterName, + String agentPoolName) { final String ifMatch = null; final String ifNoneMatch = null; - final AgentPoolPatchParameters agentPoolUpdateParameters = null; - Mono>> mono = updateWithResponseAsync(resourceGroupName, kubernetesClusterName, - agentPoolName, ifMatch, ifNoneMatch, agentPoolUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - AgentPoolInner.class, AgentPoolInner.class, this.client.getContext()); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Patch the Kubernetes cluster agent pool. - * - * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the - * Kubernetes cluster agent pool. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1556,27 +1006,21 @@ private PollerFlux, AgentPoolInner> beginUpdateAsync( * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param agentPoolUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 agentPool represents the agent pool of Kubernetes cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AgentPoolInner> beginUpdate(String resourceGroupName, - String kubernetesClusterName, String agentPoolName, String ifMatch, String ifNoneMatch, - AgentPoolPatchParameters agentPoolUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, kubernetesClusterName, agentPoolName, - ifMatch, ifNoneMatch, agentPoolUpdateParameters); - return this.client.getLroResult(response, AgentPoolInner.class, - AgentPoolInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String kubernetesClusterName, + String agentPoolName, String ifMatch, String ifNoneMatch) { + Response response + = deleteWithResponse(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Patch the Kubernetes cluster agent pool. - * - * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the - * Kubernetes cluster agent pool. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1584,25 +1028,20 @@ public SyncPoller, AgentPoolInner> beginUpdate(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of agentPool represents the agent pool of Kubernetes cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AgentPoolInner> beginUpdate(String resourceGroupName, - String kubernetesClusterName, String agentPoolName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String kubernetesClusterName, + String agentPoolName) { final String ifMatch = null; final String ifNoneMatch = null; - final AgentPoolPatchParameters agentPoolUpdateParameters = null; - Response response = updateWithResponse(resourceGroupName, kubernetesClusterName, agentPoolName, - ifMatch, ifNoneMatch, agentPoolUpdateParameters); - return this.client.getLroResult(response, AgentPoolInner.class, - AgentPoolInner.class, Context.NONE); + Response response + = deleteWithResponse(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Patch the Kubernetes cluster agent pool. - * - * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the - * Kubernetes cluster agent pool. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1611,28 +1050,22 @@ public SyncPoller, AgentPoolInner> beginUpdate(String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param agentPoolUpdateParameters The request body. * @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 agentPool represents the agent pool of Kubernetes cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AgentPoolInner> beginUpdate(String resourceGroupName, - String kubernetesClusterName, String agentPoolName, String ifMatch, String ifNoneMatch, - AgentPoolPatchParameters agentPoolUpdateParameters, Context context) { - Response response = updateWithResponse(resourceGroupName, kubernetesClusterName, agentPoolName, - ifMatch, ifNoneMatch, agentPoolUpdateParameters, context); - return this.client.getLroResult(response, AgentPoolInner.class, - AgentPoolInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String kubernetesClusterName, + String agentPoolName, String ifMatch, String ifNoneMatch, Context context) { + Response response = deleteWithResponse(resourceGroupName, kubernetesClusterName, agentPoolName, + ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Patch the Kubernetes cluster agent pool. - * - * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the - * Kubernetes cluster agent pool. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1641,24 +1074,20 @@ public SyncPoller, AgentPoolInner> beginUpdate(String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param agentPoolUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return agentPool represents the agent pool of Kubernetes cluster on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String kubernetesClusterName, - String agentPoolName, String ifMatch, String ifNoneMatch, AgentPoolPatchParameters agentPoolUpdateParameters) { - return beginUpdateAsync(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch, - agentPoolUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + private Mono deleteAsync(String resourceGroupName, String kubernetesClusterName, String agentPoolName, + String ifMatch, String ifNoneMatch) { + return beginDeleteAsync(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Patch the Kubernetes cluster agent pool. - * - * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the - * Kubernetes cluster agent pool. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1666,23 +1095,18 @@ private Mono updateAsync(String resourceGroupName, String kubern * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return agentPool represents the agent pool of Kubernetes cluster on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String kubernetesClusterName, - String agentPoolName) { + private Mono deleteAsync(String resourceGroupName, String kubernetesClusterName, String agentPoolName) { final String ifMatch = null; final String ifNoneMatch = null; - final AgentPoolPatchParameters agentPoolUpdateParameters = null; - return beginUpdateAsync(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch, - agentPoolUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + return beginDeleteAsync(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Patch the Kubernetes cluster agent pool. - * - * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the - * Kubernetes cluster agent pool. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1690,22 +1114,16 @@ private Mono updateAsync(String resourceGroupName, String kubern * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return agentPool represents the agent pool of Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AgentPoolInner update(String resourceGroupName, String kubernetesClusterName, String agentPoolName) { + public void delete(String resourceGroupName, String kubernetesClusterName, String agentPoolName) { final String ifMatch = null; final String ifNoneMatch = null; - final AgentPoolPatchParameters agentPoolUpdateParameters = null; - return beginUpdate(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch, - agentPoolUpdateParameters).getFinalResult(); + beginDelete(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch).getFinalResult(); } /** - * Patch the Kubernetes cluster agent pool. - * - * Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the - * Kubernetes cluster agent pool. Properties and tag updates can be done independently. + * Delete the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1714,23 +1132,180 @@ public AgentPoolInner update(String resourceGroupName, String kubernetesClusterN * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param agentPoolUpdateParameters The request body. * @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 agentPool represents the agent pool of Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AgentPoolInner update(String resourceGroupName, String kubernetesClusterName, String agentPoolName, - String ifMatch, String ifNoneMatch, AgentPoolPatchParameters agentPoolUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch, - agentPoolUpdateParameters, context).getFinalResult(); + public void delete(String resourceGroupName, String kubernetesClusterName, String agentPoolName, String ifMatch, + String ifNoneMatch, Context context) { + beginDelete(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch, context) + .getFinalResult(); + } + + /** + * Get a list of agent pools for the provided Kubernetes cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent pools for the provided Kubernetes cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByKubernetesClusterSinglePageAsync(String resourceGroupName, + String kubernetesClusterName, Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByKubernetesCluster(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, + top, skipToken, 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 a list of agent pools for the provided Kubernetes cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent pools for the provided Kubernetes cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByKubernetesClusterAsync(String resourceGroupName, + String kubernetesClusterName, Integer top, String skipToken) { + return new PagedFlux<>( + () -> listByKubernetesClusterSinglePageAsync(resourceGroupName, kubernetesClusterName, top, skipToken), + nextLink -> listByKubernetesClusterNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of agent pools for the provided Kubernetes cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent pools for the provided Kubernetes cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByKubernetesClusterAsync(String resourceGroupName, + String kubernetesClusterName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>( + () -> listByKubernetesClusterSinglePageAsync(resourceGroupName, kubernetesClusterName, top, skipToken), + nextLink -> listByKubernetesClusterNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of agent pools for the provided Kubernetes cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent pools for the provided Kubernetes cluster along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByKubernetesClusterSinglePage(String resourceGroupName, + String kubernetesClusterName, Integer top, String skipToken) { + final String accept = "application/json"; + Response res = service.listByKubernetesClusterSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, top, + skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List agent pools of the Kubernetes cluster. + * Get a list of agent pools for the provided Kubernetes cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 agent pools for the provided Kubernetes cluster along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByKubernetesClusterSinglePage(String resourceGroupName, + String kubernetesClusterName, Integer top, String skipToken, Context context) { + final String accept = "application/json"; + Response res = service.listByKubernetesClusterSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, top, + skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of agent pools for the provided Kubernetes cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent pools for the provided Kubernetes cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByKubernetesCluster(String resourceGroupName, + String kubernetesClusterName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>( + () -> listByKubernetesClusterSinglePage(resourceGroupName, kubernetesClusterName, top, skipToken), + nextLink -> listByKubernetesClusterNextSinglePage(nextLink)); + } + + /** + * Get a list of agent pools for the provided Kubernetes cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 agent pools for the provided Kubernetes cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByKubernetesCluster(String resourceGroupName, String kubernetesClusterName, + Integer top, String skipToken, Context context) { + return new PagedIterable<>( + () -> listByKubernetesClusterSinglePage(resourceGroupName, kubernetesClusterName, top, skipToken, context), + nextLink -> listByKubernetesClusterNextSinglePage(nextLink, context)); + } + + /** * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1742,13 +1317,6 @@ public AgentPoolInner update(String resourceGroupName, String kubernetesClusterN */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByKubernetesClusterNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1759,8 +1327,6 @@ private Mono> listByKubernetesClusterNextSinglePag } /** - * List agent pools of the Kubernetes cluster. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1771,15 +1337,6 @@ private Mono> listByKubernetesClusterNextSinglePag */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByKubernetesClusterNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByKubernetesClusterNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1788,8 +1345,6 @@ private PagedResponse listByKubernetesClusterNextSinglePage(Stri } /** - * List agent pools of the Kubernetes cluster. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1801,21 +1356,10 @@ private PagedResponse listByKubernetesClusterNextSinglePage(Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByKubernetesClusterNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByKubernetesClusterNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(AgentPoolsClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AgentPoolsImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AgentPoolsImpl.java index b63334564aae..1918b174ddad 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AgentPoolsImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/AgentPoolsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -11,10 +11,8 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.AgentPoolsClient; import com.azure.resourcemanager.networkcloud.fluent.models.AgentPoolInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.AgentPool; import com.azure.resourcemanager.networkcloud.models.AgentPools; -import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; public final class AgentPoolsImpl implements AgentPools { private static final ClientLogger LOGGER = new ClientLogger(AgentPoolsImpl.class); @@ -29,29 +27,12 @@ public AgentPoolsImpl(AgentPoolsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByKubernetesCluster(String resourceGroupName, String kubernetesClusterName) { - PagedIterable inner - = this.serviceClient().listByKubernetesCluster(resourceGroupName, kubernetesClusterName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AgentPoolImpl(inner1, this.manager())); - } - - public PagedIterable listByKubernetesCluster(String resourceGroupName, String kubernetesClusterName, - Integer top, String skipToken, Context context) { - PagedIterable inner = this.serviceClient() - .listByKubernetesCluster(resourceGroupName, kubernetesClusterName, top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AgentPoolImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String kubernetesClusterName, String agentPoolName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, kubernetesClusterName, agentPoolName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new AgentPoolImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AgentPoolImpl(inner.getValue(), this.manager())); } public AgentPool get(String resourceGroupName, String kubernetesClusterName, String agentPoolName) { @@ -63,25 +44,27 @@ public AgentPool get(String resourceGroupName, String kubernetesClusterName, Str } } - public OperationStatusResult delete(String resourceGroupName, String kubernetesClusterName, String agentPoolName) { - OperationStatusResultInner inner - = this.serviceClient().delete(resourceGroupName, kubernetesClusterName, agentPoolName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String kubernetesClusterName, String agentPoolName) { + this.serviceClient().delete(resourceGroupName, kubernetesClusterName, agentPoolName); } - public OperationStatusResult delete(String resourceGroupName, String kubernetesClusterName, String agentPoolName, - String ifMatch, String ifNoneMatch, Context context) { - OperationStatusResultInner inner = this.serviceClient() + public void delete(String resourceGroupName, String kubernetesClusterName, String agentPoolName, String ifMatch, + String ifNoneMatch, Context context) { + this.serviceClient() .delete(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + } + + public PagedIterable listByKubernetesCluster(String resourceGroupName, String kubernetesClusterName) { + PagedIterable inner + = this.serviceClient().listByKubernetesCluster(resourceGroupName, kubernetesClusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AgentPoolImpl(inner1, this.manager())); + } + + public PagedIterable listByKubernetesCluster(String resourceGroupName, String kubernetesClusterName, + Integer top, String skipToken, Context context) { + PagedIterable inner = this.serviceClient() + .listByKubernetesCluster(resourceGroupName, kubernetesClusterName, top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AgentPoolImpl(inner1, this.manager())); } public AgentPool getById(String id) { @@ -122,7 +105,7 @@ public Response getByIdWithResponse(String id, Context context) { return this.getWithResponse(resourceGroupName, kubernetesClusterName, agentPoolName, context); } - public OperationStatusResult deleteById(String id) { + public void deleteById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -140,12 +123,11 @@ public OperationStatusResult deleteById(String id) { } String localIfMatch = null; String localIfNoneMatch = null; - return this.delete(resourceGroupName, kubernetesClusterName, agentPoolName, localIfMatch, localIfNoneMatch, + this.delete(resourceGroupName, kubernetesClusterName, agentPoolName, localIfMatch, localIfNoneMatch, Context.NONE); } - public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, - Context context) { + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -161,7 +143,7 @@ public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'agentPools'.", id))); } - return this.delete(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch, context); + this.delete(resourceGroupName, kubernetesClusterName, agentPoolName, ifMatch, ifNoneMatch, context); } private AgentPoolsClient serviceClient() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineImpl.java index 44752879792c..ffea6bde8f83 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -14,11 +14,13 @@ import com.azure.resourcemanager.networkcloud.models.BareMetalMachineCordonParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineCordonStatus; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineDetailedStatus; +import com.azure.resourcemanager.networkcloud.models.BareMetalMachineMonitoringConfigurationStatus; import com.azure.resourcemanager.networkcloud.models.BareMetalMachinePatchParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachinePowerOffParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachinePowerState; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineProvisioningState; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReadyState; +import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReimageParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReplaceParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineRunCommandParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineRunDataExtractsParameters; @@ -77,6 +79,46 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public String bmcConnectionString() { + return this.innerModel().bmcConnectionString(); + } + + public AdministrativeCredentials bmcCredentials() { + return this.innerModel().bmcCredentials(); + } + + public String bmcMacAddress() { + return this.innerModel().bmcMacAddress(); + } + + public String bootMacAddress() { + return this.innerModel().bootMacAddress(); + } + + public String machineDetails() { + return this.innerModel().machineDetails(); + } + + public String machineName() { + return this.innerModel().machineName(); + } + + public String machineSkuId() { + return this.innerModel().machineSkuId(); + } + + public String rackId() { + return this.innerModel().rackId(); + } + + public long rackSlot() { + return this.innerModel().rackSlot(); + } + + public String serialNumber() { + return this.innerModel().serialNumber(); + } + public List actionStates() { List inner = this.innerModel().actionStates(); if (inner != null) { @@ -95,20 +137,12 @@ public List associatedResourceIds() { } } - public String bmcConnectionString() { - return this.innerModel().bmcConnectionString(); - } - - public AdministrativeCredentials bmcCredentials() { - return this.innerModel().bmcCredentials(); + public String bmcIpv4Address() { + return this.innerModel().bmcIpv4Address(); } - public String bmcMacAddress() { - return this.innerModel().bmcMacAddress(); - } - - public String bootMacAddress() { - return this.innerModel().bootMacAddress(); + public String bmcIpv6Address() { + return this.innerModel().bmcIpv6Address(); } public CertificateInfo caCertificate() { @@ -160,14 +194,6 @@ public String machineClusterVersion() { return this.innerModel().machineClusterVersion(); } - public String machineDetails() { - return this.innerModel().machineDetails(); - } - - public String machineName() { - return this.innerModel().machineName(); - } - public List machineRoles() { List inner = this.innerModel().machineRoles(); if (inner != null) { @@ -177,8 +203,8 @@ public List machineRoles() { } } - public String machineSkuId() { - return this.innerModel().machineSkuId(); + public BareMetalMachineMonitoringConfigurationStatus monitoringConfigurationStatus() { + return this.innerModel().monitoringConfigurationStatus(); } public String oamIpv4Address() { @@ -197,18 +223,6 @@ public BareMetalMachinePowerState powerState() { return this.innerModel().powerState(); } - public BareMetalMachineProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String rackId() { - return this.innerModel().rackId(); - } - - public long rackSlot() { - return this.innerModel().rackSlot(); - } - public BareMetalMachineReadyState readyState() { return this.innerModel().readyState(); } @@ -226,10 +240,6 @@ public List secretRotationStatus() { } } - public String serialNumber() { - return this.innerModel().serialNumber(); - } - public String serviceTag() { return this.innerModel().serviceTag(); } @@ -243,6 +253,10 @@ public List virtualMachinesAssociatedIds() { } } + public BareMetalMachineProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -377,8 +391,8 @@ public OperationStatusResult reimage() { return serviceManager.bareMetalMachines().reimage(resourceGroupName, bareMetalMachineName); } - public OperationStatusResult reimage(Context context) { - return serviceManager.bareMetalMachines().reimage(resourceGroupName, bareMetalMachineName, context); + public OperationStatusResult reimage(BareMetalMachineReimageParameters body, Context context) { + return serviceManager.bareMetalMachines().reimage(resourceGroupName, bareMetalMachineName, body, context); } public OperationStatusResult replace() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineKeySetImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineKeySetImpl.java index 70064788d5b6..6db4fe9e4da5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineKeySetImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineKeySetImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -68,14 +68,6 @@ public String azureGroupId() { return this.innerModel().azureGroupId(); } - public BareMetalMachineKeySetDetailedStatus detailedStatus() { - return this.innerModel().detailedStatus(); - } - - public String detailedStatusMessage() { - return this.innerModel().detailedStatusMessage(); - } - public OffsetDateTime expiration() { return this.innerModel().expiration(); } @@ -89,10 +81,6 @@ public List jumpHostsAllowed() { } } - public OffsetDateTime lastValidation() { - return this.innerModel().lastValidation(); - } - public String osGroupName() { return this.innerModel().osGroupName(); } @@ -105,10 +93,6 @@ public String privilegeLevelName() { return this.innerModel().privilegeLevelName(); } - public BareMetalMachineKeySetProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - public List userList() { List inner = this.innerModel().userList(); if (inner != null) { @@ -118,6 +102,18 @@ public List userList() { } } + public BareMetalMachineKeySetDetailedStatus detailedStatus() { + return this.innerModel().detailedStatus(); + } + + public String detailedStatusMessage() { + return this.innerModel().detailedStatusMessage(); + } + + public OffsetDateTime lastValidation() { + return this.innerModel().lastValidation(); + } + public List userListStatus() { List inner = this.innerModel().userListStatus(); if (inner != null) { @@ -127,6 +123,10 @@ public List userListStatus() { } } + public BareMetalMachineKeySetProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public Region region() { return Region.fromName(this.regionName()); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineKeySetsClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineKeySetsClientImpl.java index 9112e4c13353..d8b37951ea40 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineKeySetsClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineKeySetsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -31,13 +31,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.BareMetalMachineKeySetsClient; import com.azure.resourcemanager.networkcloud.fluent.models.BareMetalMachineKeySetInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; -import com.azure.resourcemanager.networkcloud.models.BareMetalMachineKeySetList; +import com.azure.resourcemanager.networkcloud.implementation.models.BareMetalMachineKeySetList; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineKeySetPatchParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,51 +53,31 @@ public final class BareMetalMachineKeySetsClientImpl implements BareMetalMachine /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of BareMetalMachineKeySetsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BareMetalMachineKeySetsClientImpl(NetworkCloudImpl client) { + BareMetalMachineKeySetsClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(BareMetalMachineKeySetsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudBareMetalMachineKeySets to be used by the proxy service - * to perform REST calls. + * The interface defining all the services for NetworkCloudManagementClientBareMetalMachineKeySets to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudBareMetalMachineKeySets") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientBareMetalMachineKeySets") public interface BareMetalMachineKeySetsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCluster(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByClusterSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("bareMetalMachineKeySetName") String bareMetalMachineKeySetName, @@ -109,80 +87,100 @@ Mono> get(@HostParam("$host") String endpo @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("bareMetalMachineKeySetName") String bareMetalMachineKeySetName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("bareMetalMachineKeySetName") String bareMetalMachineKeySetName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BareMetalMachineKeySetInner bareMetalMachineKeySetParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("bareMetalMachineKeySetName") String bareMetalMachineKeySetName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BareMetalMachineKeySetInner bareMetalMachineKeySetParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("bareMetalMachineKeySetName") String bareMetalMachineKeySetName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, + @BodyParam("application/json") BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters, + Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("bareMetalMachineKeySetName") String bareMetalMachineKeySetName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, + @BodyParam("application/json") BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters, + Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("bareMetalMachineKeySetName") String bareMetalMachineKeySetName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}") + @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("clusterName") String clusterName, + @PathParam("bareMetalMachineKeySetName") String bareMetalMachineKeySetName, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response listByClusterSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("bareMetalMachineKeySetName") String bareMetalMachineKeySetName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -190,7 +188,7 @@ Response updateSync(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByClusterNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -198,235 +196,11 @@ Mono> listByClusterNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByClusterNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List bare metal machine key sets of the cluster. - * - * Get a list of bare metal machine key sets for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 bare metal machine key sets for the provided cluster along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync(String resourceGroupName, - String clusterName, Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, top, skipToken, 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 bare metal machine key sets of the cluster. - * - * Get a list of bare metal machine key sets for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 bare metal machine key sets for the provided cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, - Integer top, String skipToken) { - return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, top, skipToken), - nextLink -> listByClusterNextSinglePageAsync(nextLink)); - } - - /** - * List bare metal machine key sets of the cluster. - * - * Get a list of bare metal machine key sets for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 bare metal machine key sets for the provided cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, top, skipToken), - nextLink -> listByClusterNextSinglePageAsync(nextLink)); - } - - /** - * List bare metal machine key sets of the cluster. - * - * Get a list of bare metal machine key sets for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 bare metal machine key sets for the provided cluster along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByClusterSinglePage(String resourceGroupName, - String clusterName, Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List bare metal machine key sets of the cluster. - * - * Get a list of bare metal machine key sets for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 bare metal machine key sets for the provided cluster along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByClusterSinglePage(String resourceGroupName, - String clusterName, Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List bare metal machine key sets of the cluster. - * - * Get a list of bare metal machine key sets for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 bare metal machine key sets for the provided cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCluster(String resourceGroupName, String clusterName) { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listByClusterSinglePage(resourceGroupName, clusterName, top, skipToken), - nextLink -> listByClusterNextSinglePage(nextLink)); - } - - /** - * List bare metal machine key sets of the cluster. - * - * Get a list of bare metal machine key sets for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 bare metal machine key sets for the provided cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCluster(String resourceGroupName, String clusterName, - Integer top, String skipToken, Context context) { - return new PagedIterable<>( - () -> listByClusterSinglePage(resourceGroupName, clusterName, top, skipToken, context), - nextLink -> listByClusterNextSinglePage(nextLink, context)); - } - - /** - * Retrieve the bare metal machine key set of the cluster. - * * Get bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -441,25 +215,6 @@ public PagedIterable listByCluster(String resourceG @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bareMetalMachineKeySetName == null) { - return Mono.error( - new IllegalArgumentException("Parameter bareMetalMachineKeySetName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -469,8 +224,6 @@ private Mono> getWithResponseAsync(String } /** - * Retrieve the bare metal machine key set of the cluster. - * * Get bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -489,8 +242,6 @@ private Mono getAsync(String resourceGroupName, Str } /** - * Retrieve the bare metal machine key set of the cluster. - * * Get bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -505,37 +256,12 @@ private Mono getAsync(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bareMetalMachineKeySetName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineKeySetName is required and cannot be null.")); - } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, bareMetalMachineKeySetName, accept, context); } /** - * Retrieve the bare metal machine key set of the cluster. - * * Get bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -553,8 +279,6 @@ public BareMetalMachineKeySetInner get(String resourceGroupName, String clusterN } /** - * Create or update the bare metal machine key set of the cluster. - * * Create a new bare metal machine key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -575,42 +299,16 @@ public BareMetalMachineKeySetInner get(String resourceGroupName, String clusterN private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, BareMetalMachineKeySetInner bareMetalMachineKeySetParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bareMetalMachineKeySetName == null) { - return Mono.error( - new IllegalArgumentException("Parameter bareMetalMachineKeySetName is required and cannot be null.")); - } - if (bareMetalMachineKeySetParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter bareMetalMachineKeySetParameters is required and cannot be null.")); - } else { - bareMetalMachineKeySetParameters.validate(); - } + 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, clusterName, bareMetalMachineKeySetName, ifMatch, - ifNoneMatch, bareMetalMachineKeySetParameters, accept, context)) + ifNoneMatch, contentType, accept, bareMetalMachineKeySetParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update the bare metal machine key set of the cluster. - * * Create a new bare metal machine key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -630,45 +328,14 @@ private Mono>> createOrUpdateWithResponseAsync(String private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, BareMetalMachineKeySetInner bareMetalMachineKeySetParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bareMetalMachineKeySetName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineKeySetName is required and cannot be null.")); - } - if (bareMetalMachineKeySetParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineKeySetParameters is required and cannot be null.")); - } else { - bareMetalMachineKeySetParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, - ifNoneMatch, bareMetalMachineKeySetParameters, accept, Context.NONE); + ifNoneMatch, contentType, accept, bareMetalMachineKeySetParameters, Context.NONE); } /** - * Create or update the bare metal machine key set of the cluster. - * * Create a new bare metal machine key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -689,45 +356,14 @@ private Response createOrUpdateWithResponse(String resourceGroupName private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, BareMetalMachineKeySetInner bareMetalMachineKeySetParameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bareMetalMachineKeySetName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineKeySetName is required and cannot be null.")); - } - if (bareMetalMachineKeySetParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineKeySetParameters is required and cannot be null.")); - } else { - bareMetalMachineKeySetParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, - ifNoneMatch, bareMetalMachineKeySetParameters, accept, context); + ifNoneMatch, contentType, accept, bareMetalMachineKeySetParameters, context); } /** - * Create or update the bare metal machine key set of the cluster. - * * Create a new bare metal machine key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -755,8 +391,6 @@ private PollerFlux, BareMetalMachineKeyS } /** - * Create or update the bare metal machine key set of the cluster. - * * Create a new bare metal machine key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -782,8 +416,6 @@ private PollerFlux, BareMetalMachineKeyS } /** - * Create or update the bare metal machine key set of the cluster. - * * Create a new bare metal machine key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -810,8 +442,6 @@ public SyncPoller, BareMetalMachineKeySe } /** - * Create or update the bare metal machine key set of the cluster. - * * Create a new bare metal machine key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -836,8 +466,6 @@ public SyncPoller, BareMetalMachineKeySe } /** - * Create or update the bare metal machine key set of the cluster. - * * Create a new bare metal machine key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -866,8 +494,6 @@ public SyncPoller, BareMetalMachineKeySe } /** - * Create or update the bare metal machine key set of the cluster. - * * Create a new bare metal machine key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -894,8 +520,6 @@ private Mono createOrUpdateAsync(String resourceGro } /** - * Create or update the bare metal machine key set of the cluster. - * * Create a new bare metal machine key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -919,8 +543,6 @@ private Mono createOrUpdateAsync(String resourceGro } /** - * Create or update the bare metal machine key set of the cluster. - * * Create a new bare metal machine key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -942,8 +564,6 @@ public BareMetalMachineKeySetInner createOrUpdate(String resourceGroupName, Stri } /** - * Create or update the bare metal machine key set of the cluster. - * * Create a new bare metal machine key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -969,9 +589,8 @@ public BareMetalMachineKeySetInner createOrUpdate(String resourceGroupName, Stri } /** - * Delete the bare metal machine key set of the cluster. - * - * Delete the bare metal machine key set of the provided cluster. + * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -980,46 +599,28 @@ public BareMetalMachineKeySetInner createOrUpdate(String resourceGroupName, Stri * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return bareMetalMachineKeySet represents the bare metal machine key set along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bareMetalMachineKeySetName == null) { - return Mono.error( - new IllegalArgumentException("Parameter bareMetalMachineKeySetName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch, + BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, - ifNoneMatch, accept, context)) + ifNoneMatch, accept, bareMetalMachineKeySetUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the bare metal machine key set of the cluster. - * - * Delete the bare metal machine key set of the provided cluster. + * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1028,47 +629,25 @@ private Mono>> deleteWithResponseAsync(String resource * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return bareMetalMachineKeySet represents the bare metal machine key set along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String clusterName, - String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bareMetalMachineKeySetName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineKeySetName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String clusterName, + String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch, + BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters) { final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, - ifNoneMatch, accept, Context.NONE); + ifNoneMatch, accept, bareMetalMachineKeySetUpdateParameters, Context.NONE); } /** - * Delete the bare metal machine key set of the cluster. - * - * Delete the bare metal machine key set of the provided cluster. + * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1077,48 +656,26 @@ private Response deleteWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineKeySetUpdateParameters The request body. * @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}. + * @return bareMetalMachineKeySet represents the bare metal machine key set along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String clusterName, - String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bareMetalMachineKeySetName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineKeySetName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String clusterName, + String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch, + BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters, Context context) { final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, - ifNoneMatch, accept, context); + ifNoneMatch, accept, bareMetalMachineKeySetUpdateParameters, context); } /** - * Delete the bare metal machine key set of the cluster. - * - * Delete the bare metal machine key set of the provided cluster. + * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1127,26 +684,26 @@ private Response deleteWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of bareMetalMachineKeySet represents the bare metal machine key set. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginDeleteAsync( + private PollerFlux, BareMetalMachineKeySetInner> beginUpdateAsync( String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, String ifMatch, - String ifNoneMatch) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + String ifNoneMatch, BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, + bareMetalMachineKeySetName, ifMatch, ifNoneMatch, bareMetalMachineKeySetUpdateParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), BareMetalMachineKeySetInner.class, BareMetalMachineKeySetInner.class, this.client.getContext()); } /** - * Delete the bare metal machine key set of the cluster. - * - * Delete the bare metal machine key set of the provided cluster. + * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1154,24 +711,24 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of bareMetalMachineKeySet represents the bare metal machine key set. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName) { + private PollerFlux, BareMetalMachineKeySetInner> + beginUpdateAsync(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName) { final String ifMatch = null; final String ifNoneMatch = null; - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + final BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters = null; + Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, + bareMetalMachineKeySetName, ifMatch, ifNoneMatch, bareMetalMachineKeySetUpdateParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), BareMetalMachineKeySetInner.class, BareMetalMachineKeySetInner.class, this.client.getContext()); } /** - * Delete the bare metal machine key set of the cluster. - * - * Delete the bare metal machine key set of the provided cluster. + * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1180,25 +737,25 @@ private PollerFlux, OperationStatusResult * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of bareMetalMachineKeySet represents the bare metal machine key set. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( + public SyncPoller, BareMetalMachineKeySetInner> beginUpdate( String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, String ifMatch, - String ifNoneMatch) { - Response response - = deleteWithResponse(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + String ifNoneMatch, BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, clusterName, bareMetalMachineKeySetName, + ifMatch, ifNoneMatch, bareMetalMachineKeySetUpdateParameters); + return this.client.getLroResult(response, + BareMetalMachineKeySetInner.class, BareMetalMachineKeySetInner.class, Context.NONE); } /** - * Delete the bare metal machine key set of the cluster. - * - * Delete the bare metal machine key set of the provided cluster. + * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1206,23 +763,23 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of bareMetalMachineKeySet represents the bare metal machine key set. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName) { + public SyncPoller, BareMetalMachineKeySetInner> + beginUpdate(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName) { final String ifMatch = null; final String ifNoneMatch = null; - Response response - = deleteWithResponse(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + final BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters = null; + Response response = updateWithResponse(resourceGroupName, clusterName, bareMetalMachineKeySetName, + ifMatch, ifNoneMatch, bareMetalMachineKeySetUpdateParameters); + return this.client.getLroResult(response, + BareMetalMachineKeySetInner.class, BareMetalMachineKeySetInner.class, Context.NONE); } /** - * Delete the bare metal machine key set of the cluster. - * - * Delete the bare metal machine key set of the provided cluster. + * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1231,26 +788,27 @@ public SyncPoller, OperationStatusResultI * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineKeySetUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of bareMetalMachineKeySet represents the bare metal machine key set. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( + public SyncPoller, BareMetalMachineKeySetInner> beginUpdate( String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, String ifMatch, - String ifNoneMatch, Context context) { - Response response = deleteWithResponse(resourceGroupName, clusterName, bareMetalMachineKeySetName, - ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + String ifNoneMatch, BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters, + Context context) { + Response response = updateWithResponse(resourceGroupName, clusterName, bareMetalMachineKeySetName, + ifMatch, ifNoneMatch, bareMetalMachineKeySetUpdateParameters, context); + return this.client.getLroResult(response, + BareMetalMachineKeySetInner.class, BareMetalMachineKeySetInner.class, context); } /** - * Delete the bare metal machine key set of the cluster. - * - * Delete the bare metal machine key set of the provided cluster. + * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1259,22 +817,24 @@ public SyncPoller, OperationStatusResultI * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return bareMetalMachineKeySet represents the bare metal machine key set on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName, - String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch) { - return beginDeleteAsync(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String clusterName, + String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch, + BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters) { + return beginUpdateAsync(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch, + bareMetalMachineKeySetUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the bare metal machine key set of the cluster. - * - * Delete the bare metal machine key set of the provided cluster. + * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1282,21 +842,22 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return bareMetalMachineKeySet represents the bare metal machine key set on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName, + private Mono updateAsync(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginDeleteAsync(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + final BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters = null; + return beginUpdateAsync(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch, + bareMetalMachineKeySetUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the bare metal machine key set of the cluster. - * - * Delete the bare metal machine key set of the provided cluster. + * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1304,21 +865,21 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return bareMetalMachineKeySet represents the bare metal machine key set. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String clusterName, + public BareMetalMachineKeySetInner update(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginDelete(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch) - .getFinalResult(); + final BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters = null; + return beginUpdate(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch, + bareMetalMachineKeySetUpdateParameters).getFinalResult(); } /** - * Delete the bare metal machine key set of the cluster. - * - * Delete the bare metal machine key set of the provided cluster. + * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1327,24 +888,23 @@ public OperationStatusResultInner delete(String resourceGroupName, String cluste * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineKeySetUpdateParameters The request body. * @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. + * @return bareMetalMachineKeySet represents the bare metal machine key set. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String clusterName, - String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch, Context context) { - return beginDelete(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch, context) - .getFinalResult(); + public BareMetalMachineKeySetInner update(String resourceGroupName, String clusterName, + String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch, + BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch, + bareMetalMachineKeySetUpdateParameters, context).getFinalResult(); } /** - * Patch bare metal machine key set of the cluster. - * - * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1353,52 +913,23 @@ public OperationStatusResultInner delete(String resourceGroupName, String cluste * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bareMetalMachineKeySet represents the bare metal machine key set along with {@link Response} on - * successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, - String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch, - BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bareMetalMachineKeySetName == null) { - return Mono.error( - new IllegalArgumentException("Parameter bareMetalMachineKeySetName is required and cannot be null.")); - } - if (bareMetalMachineKeySetUpdateParameters != null) { - bareMetalMachineKeySetUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, - ifNoneMatch, bareMetalMachineKeySetUpdateParameters, accept, context)) + ifNoneMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Patch bare metal machine key set of the cluster. - * - * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1407,53 +938,21 @@ private Mono>> updateWithResponseAsync(String resource * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bareMetalMachineKeySet represents the bare metal machine key set along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String clusterName, - String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch, - BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bareMetalMachineKeySetName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineKeySetName is required and cannot be null.")); - } - if (bareMetalMachineKeySetUpdateParameters != null) { - bareMetalMachineKeySetUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + private Response deleteWithResponse(String resourceGroupName, String clusterName, + String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, - ifNoneMatch, bareMetalMachineKeySetUpdateParameters, accept, Context.NONE); + ifNoneMatch, Context.NONE); } /** - * Patch bare metal machine key set of the cluster. - * - * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1462,54 +961,22 @@ private Response updateWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineKeySetUpdateParameters The request body. * @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 bareMetalMachineKeySet represents the bare metal machine key set along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String clusterName, - String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch, - BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bareMetalMachineKeySetName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineKeySetName is required and cannot be null.")); - } - if (bareMetalMachineKeySetUpdateParameters != null) { - bareMetalMachineKeySetUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + private Response deleteWithResponse(String resourceGroupName, String clusterName, + String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, - ifNoneMatch, bareMetalMachineKeySetUpdateParameters, accept, context); + ifNoneMatch, context); } /** - * Patch bare metal machine key set of the cluster. - * - * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1518,28 +985,22 @@ private Response updateWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 bareMetalMachineKeySet represents the bare metal machine key set. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BareMetalMachineKeySetInner> beginUpdateAsync( - String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, String ifMatch, - String ifNoneMatch, BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, - bareMetalMachineKeySetName, ifMatch, ifNoneMatch, bareMetalMachineKeySetUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), BareMetalMachineKeySetInner.class, BareMetalMachineKeySetInner.class, + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Patch bare metal machine key set of the cluster. - * - * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1547,26 +1008,21 @@ private PollerFlux, BareMetalMachineKeyS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 bareMetalMachineKeySet represents the bare metal machine key set. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BareMetalMachineKeySetInner> - beginUpdateAsync(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String bareMetalMachineKeySetName) { final String ifMatch = null; final String ifNoneMatch = null; - final BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters = null; - Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, - bareMetalMachineKeySetName, ifMatch, ifNoneMatch, bareMetalMachineKeySetUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), BareMetalMachineKeySetInner.class, BareMetalMachineKeySetInner.class, + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Patch bare metal machine key set of the cluster. - * - * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1575,27 +1031,21 @@ private PollerFlux, BareMetalMachineKeyS * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 bareMetalMachineKeySet represents the bare metal machine key set. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BareMetalMachineKeySetInner> beginUpdate( - String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, String ifMatch, - String ifNoneMatch, BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, clusterName, bareMetalMachineKeySetName, - ifMatch, ifNoneMatch, bareMetalMachineKeySetUpdateParameters); - return this.client.getLroResult(response, - BareMetalMachineKeySetInner.class, BareMetalMachineKeySetInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch) { + Response response + = deleteWithResponse(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Patch bare metal machine key set of the cluster. - * - * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1603,25 +1053,20 @@ public SyncPoller, BareMetalMachineKeySe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 bareMetalMachineKeySet represents the bare metal machine key set. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BareMetalMachineKeySetInner> - beginUpdate(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String bareMetalMachineKeySetName) { final String ifMatch = null; final String ifNoneMatch = null; - final BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters = null; - Response response = updateWithResponse(resourceGroupName, clusterName, bareMetalMachineKeySetName, - ifMatch, ifNoneMatch, bareMetalMachineKeySetUpdateParameters); - return this.client.getLroResult(response, - BareMetalMachineKeySetInner.class, BareMetalMachineKeySetInner.class, Context.NONE); + Response response + = deleteWithResponse(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Patch bare metal machine key set of the cluster. - * - * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1630,29 +1075,22 @@ public SyncPoller, BareMetalMachineKeySe * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineKeySetUpdateParameters The request body. * @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 bareMetalMachineKeySet represents the bare metal machine key set. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BareMetalMachineKeySetInner> beginUpdate( - String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, String ifMatch, - String ifNoneMatch, BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters, - Context context) { - Response response = updateWithResponse(resourceGroupName, clusterName, bareMetalMachineKeySetName, - ifMatch, ifNoneMatch, bareMetalMachineKeySetUpdateParameters, context); - return this.client.getLroResult(response, - BareMetalMachineKeySetInner.class, BareMetalMachineKeySetInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch, Context context) { + Response response = deleteWithResponse(resourceGroupName, clusterName, bareMetalMachineKeySetName, + ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Patch bare metal machine key set of the cluster. - * - * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1661,26 +1099,20 @@ public SyncPoller, BareMetalMachineKeySe * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bareMetalMachineKeySet represents the bare metal machine key set on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String clusterName, - String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch, - BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters) { - return beginUpdateAsync(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch, - bareMetalMachineKeySetUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + private Mono deleteAsync(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, + String ifMatch, String ifNoneMatch) { + return beginDeleteAsync(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Patch bare metal machine key set of the cluster. - * - * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1688,24 +1120,18 @@ private Mono updateAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bareMetalMachineKeySet represents the bare metal machine key set on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String clusterName, - String bareMetalMachineKeySetName) { + private Mono deleteAsync(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName) { final String ifMatch = null; final String ifNoneMatch = null; - final BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters = null; - return beginUpdateAsync(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch, - bareMetalMachineKeySetUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + return beginDeleteAsync(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Patch bare metal machine key set of the cluster. - * - * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1713,23 +1139,16 @@ private Mono updateAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bareMetalMachineKeySet represents the bare metal machine key set. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BareMetalMachineKeySetInner update(String resourceGroupName, String clusterName, - String bareMetalMachineKeySetName) { + public void delete(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName) { final String ifMatch = null; final String ifNoneMatch = null; - final BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters = null; - return beginUpdate(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch, - bareMetalMachineKeySetUpdateParameters).getFinalResult(); + beginDelete(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch).getFinalResult(); } /** - * Patch bare metal machine key set of the cluster. - * - * Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1738,24 +1157,176 @@ public BareMetalMachineKeySetInner update(String resourceGroupName, String clust * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineKeySetUpdateParameters The request body. * @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 bareMetalMachineKeySet represents the bare metal machine key set. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BareMetalMachineKeySetInner update(String resourceGroupName, String clusterName, - String bareMetalMachineKeySetName, String ifMatch, String ifNoneMatch, - BareMetalMachineKeySetPatchParameters bareMetalMachineKeySetUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch, - bareMetalMachineKeySetUpdateParameters, context).getFinalResult(); + public void delete(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, String ifMatch, + String ifNoneMatch, Context context) { + beginDelete(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch, context) + .getFinalResult(); + } + + /** + * Get a list of bare metal machine key sets for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 bare metal machine key sets for the provided cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClusterSinglePageAsync(String resourceGroupName, + String clusterName, Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, top, skipToken, 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 a list of bare metal machine key sets for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 bare metal machine key sets for the provided cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, + Integer top, String skipToken) { + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, top, skipToken), + nextLink -> listByClusterNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of bare metal machine key sets for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 bare metal machine key sets for the provided cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, top, skipToken), + nextLink -> listByClusterNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of bare metal machine key sets for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 bare metal machine key sets for the provided cluster along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByClusterSinglePage(String resourceGroupName, + String clusterName, Integer top, String skipToken) { + final String accept = "application/json"; + Response res + = service.listByClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of bare metal machine key sets for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 bare metal machine key sets for the provided cluster along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByClusterSinglePage(String resourceGroupName, + String clusterName, Integer top, String skipToken, Context context) { + final String accept = "application/json"; + Response res + = service.listByClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of bare metal machine key sets for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 bare metal machine key sets for the provided cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCluster(String resourceGroupName, String clusterName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listByClusterSinglePage(resourceGroupName, clusterName, top, skipToken), + nextLink -> listByClusterNextSinglePage(nextLink)); } /** - * List bare metal machine key sets of the cluster. + * Get a list of bare metal machine key sets for the provided cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 bare metal machine key sets for the provided cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCluster(String resourceGroupName, String clusterName, + Integer top, String skipToken, Context context) { + return new PagedIterable<>( + () -> listByClusterSinglePage(resourceGroupName, clusterName, top, skipToken, context), + nextLink -> listByClusterNextSinglePage(nextLink, context)); + } + + /** * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1767,13 +1338,6 @@ public BareMetalMachineKeySetInner update(String resourceGroupName, String clust */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1783,8 +1347,6 @@ private Mono> listByClusterNextSingle } /** - * List bare metal machine key sets of the cluster. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1795,15 +1357,6 @@ private Mono> listByClusterNextSingle */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByClusterNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByClusterNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1812,8 +1365,6 @@ private PagedResponse listByClusterNextSinglePage(S } /** - * List bare metal machine key sets of the cluster. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1825,21 +1376,10 @@ private PagedResponse listByClusterNextSinglePage(S */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByClusterNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByClusterNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(BareMetalMachineKeySetsClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineKeySetsImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineKeySetsImpl.java index d9c570d354f3..c2c53dbebd5e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineKeySetsImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineKeySetsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -11,10 +11,8 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.BareMetalMachineKeySetsClient; import com.azure.resourcemanager.networkcloud.fluent.models.BareMetalMachineKeySetInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineKeySet; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineKeySets; -import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; public final class BareMetalMachineKeySetsImpl implements BareMetalMachineKeySets { private static final ClientLogger LOGGER = new ClientLogger(BareMetalMachineKeySetsImpl.class); @@ -29,29 +27,12 @@ public BareMetalMachineKeySetsImpl(BareMetalMachineKeySetsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByCluster(String resourceGroupName, String clusterName) { - PagedIterable inner - = this.serviceClient().listByCluster(resourceGroupName, clusterName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BareMetalMachineKeySetImpl(inner1, this.manager())); - } - - public PagedIterable listByCluster(String resourceGroupName, String clusterName, - Integer top, String skipToken, Context context) { - PagedIterable inner - = this.serviceClient().listByCluster(resourceGroupName, clusterName, top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BareMetalMachineKeySetImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, clusterName, bareMetalMachineKeySetName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BareMetalMachineKeySetImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BareMetalMachineKeySetImpl(inner.getValue(), this.manager())); } public BareMetalMachineKeySet get(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName) { @@ -64,26 +45,27 @@ public BareMetalMachineKeySet get(String resourceGroupName, String clusterName, } } - public OperationStatusResult delete(String resourceGroupName, String clusterName, - String bareMetalMachineKeySetName) { - OperationStatusResultInner inner - = this.serviceClient().delete(resourceGroupName, clusterName, bareMetalMachineKeySetName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName) { + this.serviceClient().delete(resourceGroupName, clusterName, bareMetalMachineKeySetName); } - public OperationStatusResult delete(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, - String ifMatch, String ifNoneMatch, Context context) { - OperationStatusResultInner inner = this.serviceClient() + public void delete(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, String ifMatch, + String ifNoneMatch, Context context) { + this.serviceClient() .delete(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + } + + public PagedIterable listByCluster(String resourceGroupName, String clusterName) { + PagedIterable inner + = this.serviceClient().listByCluster(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BareMetalMachineKeySetImpl(inner1, this.manager())); + } + + public PagedIterable listByCluster(String resourceGroupName, String clusterName, + Integer top, String skipToken, Context context) { + PagedIterable inner + = this.serviceClient().listByCluster(resourceGroupName, clusterName, top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BareMetalMachineKeySetImpl(inner1, this.manager())); } public BareMetalMachineKeySet getById(String id) { @@ -125,7 +107,7 @@ public Response getByIdWithResponse(String id, Context c return this.getWithResponse(resourceGroupName, clusterName, bareMetalMachineKeySetName, context); } - public OperationStatusResult deleteById(String id) { + public void deleteById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -143,12 +125,11 @@ public OperationStatusResult deleteById(String id) { } String localIfMatch = null; String localIfNoneMatch = null; - return this.delete(resourceGroupName, clusterName, bareMetalMachineKeySetName, localIfMatch, localIfNoneMatch, + this.delete(resourceGroupName, clusterName, bareMetalMachineKeySetName, localIfMatch, localIfNoneMatch, Context.NONE); } - public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, - Context context) { + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -164,7 +145,7 @@ public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, S throw LOGGER.logExceptionAsError(new IllegalArgumentException(String .format("The resource ID '%s' is not valid. Missing path segment 'bareMetalMachineKeySets'.", id))); } - return this.delete(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch, context); + this.delete(resourceGroupName, clusterName, bareMetalMachineKeySetName, ifMatch, ifNoneMatch, context); } private BareMetalMachineKeySetsClient serviceClient() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachinesClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachinesClientImpl.java index 0819bf3d4240..b7aeec8b7fe2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachinesClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachinesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -32,20 +32,20 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient; import com.azure.resourcemanager.networkcloud.fluent.models.BareMetalMachineInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.networkcloud.implementation.models.BareMetalMachineList; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineCordonParameters; -import com.azure.resourcemanager.networkcloud.models.BareMetalMachineList; import com.azure.resourcemanager.networkcloud.models.BareMetalMachinePatchParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachinePowerOffParameters; +import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReimageParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReplaceParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineRunCommandParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineRunDataExtractsParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineRunReadCommandsParameters; +import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -62,67 +62,31 @@ public final class BareMetalMachinesClientImpl implements BareMetalMachinesClien /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of BareMetalMachinesClientImpl. * * @param client the instance of the service client containing this operation class. */ - BareMetalMachinesClientImpl(NetworkCloudImpl client) { + BareMetalMachinesClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(BareMetalMachinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudBareMetalMachines to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for NetworkCloudManagementClientBareMetalMachines to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudBareMetalMachines") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientBareMetalMachines") public interface BareMetalMachinesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/bareMetalMachines") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/bareMetalMachines") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, @HeaderParam("Accept") String accept, @@ -132,849 +96,764 @@ Mono> getByResourceGroup(@HostParam("$host") Str @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") BareMetalMachineInner bareMetalMachineParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") BareMetalMachineInner bareMetalMachineParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") BareMetalMachineInner bareMetalMachineParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") BareMetalMachineInner bareMetalMachineParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BareMetalMachinePatchParameters bareMetalMachineUpdateParameters, + Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BareMetalMachinePatchParameters bareMetalMachineUpdateParameters, + Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") BareMetalMachinePatchParameters bareMetalMachineUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") BareMetalMachinePatchParameters bareMetalMachineUpdateParameters, + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/bareMetalMachines") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/bareMetalMachines") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/cordon") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> cordon(@HostParam("$host") String endpoint, + Mono>> cordon(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, @BodyParam("application/json") BareMetalMachineCordonParameters bareMetalMachineCordonParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/cordon") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response cordonSync(@HostParam("$host") String endpoint, + Response cordonSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, @BodyParam("application/json") BareMetalMachineCordonParameters bareMetalMachineCordonParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/powerOff") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> powerOff(@HostParam("$host") String endpoint, + Mono>> powerOff(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, @BodyParam("application/json") BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/powerOff") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response powerOffSync(@HostParam("$host") String endpoint, + Response powerOffSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, @BodyParam("application/json") BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/reimage") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> reimage(@HostParam("$host") String endpoint, + Mono>> reimage(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("bareMetalMachineName") String bareMetalMachineName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("bareMetalMachineName") String bareMetalMachineName, + @BodyParam("application/json") BareMetalMachineReimageParameters body, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/reimage") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response reimageSync(@HostParam("$host") String endpoint, + Response reimageSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("bareMetalMachineName") String bareMetalMachineName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("bareMetalMachineName") String bareMetalMachineName, + @BodyParam("application/json") BareMetalMachineReimageParameters body, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/replace") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> replace(@HostParam("$host") String endpoint, + Mono>> replace(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, @BodyParam("application/json") BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/replace") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response replaceSync(@HostParam("$host") String endpoint, + Response replaceSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, @BodyParam("application/json") BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/restart") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restart(@HostParam("$host") String endpoint, + Mono>> restart(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("bareMetalMachineName") String bareMetalMachineName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("bareMetalMachineName") String bareMetalMachineName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/restart") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response restartSync(@HostParam("$host") String endpoint, + Response restartSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("bareMetalMachineName") String bareMetalMachineName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("bareMetalMachineName") String bareMetalMachineName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runCommand") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> runCommand(@HostParam("$host") String endpoint, + Mono>> runCommand(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runCommand") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response runCommandSync(@HostParam("$host") String endpoint, + Response runCommandSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runDataExtracts") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> runDataExtracts(@HostParam("$host") String endpoint, + Mono>> runDataExtracts(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runDataExtracts") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response runDataExtractsSync(@HostParam("$host") String endpoint, + Response runDataExtractsSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runDataExtractsRestricted") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> runDataExtractsRestricted(@HostParam("$host") String endpoint, + Mono>> runDataExtractsRestricted(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runDataExtractsRestricted") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response runDataExtractsRestrictedSync(@HostParam("$host") String endpoint, + Response runDataExtractsRestrictedSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runReadCommands") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> runReadCommands(@HostParam("$host") String endpoint, + Mono>> runReadCommands(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runReadCommands") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response runReadCommandsSync(@HostParam("$host") String endpoint, + Response runReadCommandsSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("bareMetalMachineName") String bareMetalMachineName, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/start") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start(@HostParam("$host") String endpoint, + Mono>> start(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("bareMetalMachineName") String bareMetalMachineName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("bareMetalMachineName") String bareMetalMachineName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/start") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response startSync(@HostParam("$host") String endpoint, + Response startSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("bareMetalMachineName") String bareMetalMachineName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("bareMetalMachineName") String bareMetalMachineName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/uncordon") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> uncordon(@HostParam("$host") String endpoint, + Mono>> uncordon(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("bareMetalMachineName") String bareMetalMachineName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("bareMetalMachineName") String bareMetalMachineName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/uncordon") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response uncordonSync(@HostParam("$host") String endpoint, + Response uncordonSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("bareMetalMachineName") String bareMetalMachineName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("bareMetalMachineName") String bareMetalMachineName, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + 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 listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + 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> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listBySubscriptionNext( + @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("$host") String endpoint, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List bare metal machines in the subscription. - * - * Get a list of bare metal machines in the provided subscription. + * Get properties of the provided bare metal machine. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param bareMetalMachineName The name of the bare metal machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 bare metal machines in the provided subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return properties of the provided bare metal machine along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String bareMetalMachineName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List bare metal machines in the subscription. - * - * Get a list of bare metal machines in the provided subscription. + * Get properties of the provided bare metal machine. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param bareMetalMachineName The name of the bare metal machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 bare metal machines in the provided subscription as paginated response with {@link PagedFlux}. + * @return properties of the provided bare metal machine on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer top, String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String bareMetalMachineName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, bareMetalMachineName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List bare metal machines in the subscription. - * - * Get a list of bare metal machines in the provided subscription. + * Get properties of the provided bare metal machine. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param bareMetalMachineName The name of the bare metal machine. + * @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 bare metal machines in the provided subscription as paginated response with {@link PagedFlux}. + * @return properties of the provided bare metal machine along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String bareMetalMachineName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, accept, context); } /** - * List bare metal machines in the subscription. - * - * Get a list of bare metal machines in the provided subscription. + * Get properties of the provided bare metal machine. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param bareMetalMachineName The name of the bare metal machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 bare metal machines in the provided subscription along with {@link PagedResponse}. + * @return properties of the provided bare metal machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + public BareMetalMachineInner getByResourceGroup(String resourceGroupName, String bareMetalMachineName) { + return getByResourceGroupWithResponse(resourceGroupName, bareMetalMachineName, Context.NONE).getValue(); } /** - * List bare metal machines in the subscription. - * - * Get a list of bare metal machines in the provided subscription. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param bareMetalMachineName The name of the bare metal machine. + * @param bareMetalMachineParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 bare metal machines in the provided subscription along with {@link PagedResponse}. + * @return bareMetalMachine represents the physical machine in the rack along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String bareMetalMachineName, BareMetalMachineInner bareMetalMachineParameters, String ifMatch, + String ifNoneMatch) { + final String contentType = "application/json"; final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List bare metal machines in the subscription. - * - * Get a list of bare metal machines in the provided subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of bare metal machines in the provided subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listSinglePage(top, skipToken), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); - } - - /** - * List bare metal machines in the subscription. - * - * Get a list of bare metal machines in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 bare metal machines in the provided subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Integer top, String skipToken, Context context) { - return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, + contentType, accept, bareMetalMachineParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List bare metal machines in the resource group. - * - * Get a list of bare metal machines in the provided resource group. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param bareMetalMachineName The name of the bare metal machine. + * @param bareMetalMachineParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 bare metal machines in the provided resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return bareMetalMachine represents the physical machine in the rack along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String bareMetalMachineName, + BareMetalMachineInner bareMetalMachineParameters, String ifMatch, String ifNoneMatch) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, contentType, + accept, bareMetalMachineParameters, Context.NONE); } /** - * List bare metal machines in the resource group. - * - * Get a list of bare metal machines in the provided resource group. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param bareMetalMachineName The name of the bare metal machine. + * @param bareMetalMachineParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 bare metal machines in the provided resource group as paginated response with - * {@link PagedFlux}. + * @return bareMetalMachine represents the physical machine in the rack along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, - String skipToken) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String bareMetalMachineName, + BareMetalMachineInner bareMetalMachineParameters, String ifMatch, String ifNoneMatch, 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, bareMetalMachineName, ifMatch, ifNoneMatch, contentType, + accept, bareMetalMachineParameters, context); } /** - * List bare metal machines in the resource group. - * - * Get a list of bare metal machines in the provided resource group. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param bareMetalMachineName The name of the bare metal machine. + * @param bareMetalMachineParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 bare metal machines in the provided resource group as paginated response with - * {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of bareMetalMachine represents the physical machine in the rack. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BareMetalMachineInner> beginCreateOrUpdateAsync( + String resourceGroupName, String bareMetalMachineName, BareMetalMachineInner bareMetalMachineParameters, + String ifMatch, String ifNoneMatch) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, bareMetalMachineName, + bareMetalMachineParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), BareMetalMachineInner.class, BareMetalMachineInner.class, + this.client.getContext()); } /** - * List bare metal machines in the resource group. - * - * Get a list of bare metal machines in the provided resource group. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param bareMetalMachineName The name of the bare metal machine. + * @param bareMetalMachineParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 bare metal machines in the provided resource group along with {@link PagedResponse}. + * @return the {@link PollerFlux} for polling of bareMetalMachine represents the physical machine in the rack. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BareMetalMachineInner> beginCreateOrUpdateAsync( + String resourceGroupName, String bareMetalMachineName, BareMetalMachineInner bareMetalMachineParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, bareMetalMachineName, + bareMetalMachineParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), BareMetalMachineInner.class, BareMetalMachineInner.class, + this.client.getContext()); } /** - * List bare metal machines in the resource group. - * - * Get a list of bare metal machines in the provided resource group. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param bareMetalMachineName The name of the bare metal machine. + * @param bareMetalMachineParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 bare metal machines in the provided resource group along with {@link PagedResponse}. + * @return the {@link SyncPoller} for polling of bareMetalMachine represents the physical machine in the rack. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BareMetalMachineInner> beginCreateOrUpdate( + String resourceGroupName, String bareMetalMachineName, BareMetalMachineInner bareMetalMachineParameters, + String ifMatch, String ifNoneMatch) { + Response response = createOrUpdateWithResponse(resourceGroupName, bareMetalMachineName, + bareMetalMachineParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, + BareMetalMachineInner.class, BareMetalMachineInner.class, Context.NONE); } /** - * List bare metal machines in the resource group. - * - * Get a list of bare metal machines in the provided resource group. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param bareMetalMachineName The name of the bare metal machine. + * @param bareMetalMachineParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 bare metal machines in the provided resource group as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of bareMetalMachine represents the physical machine in the rack. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BareMetalMachineInner> beginCreateOrUpdate( + String resourceGroupName, String bareMetalMachineName, BareMetalMachineInner bareMetalMachineParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Response response = createOrUpdateWithResponse(resourceGroupName, bareMetalMachineName, + bareMetalMachineParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, + BareMetalMachineInner.class, BareMetalMachineInner.class, Context.NONE); } /** - * List bare metal machines in the resource group. - * - * Get a list of bare metal machines in the provided resource group. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param bareMetalMachineName The name of the bare metal machine. + * @param bareMetalMachineParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 bare metal machines in the provided resource group as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of bareMetalMachine represents the physical machine in the rack. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, - String skipToken, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BareMetalMachineInner> beginCreateOrUpdate( + String resourceGroupName, String bareMetalMachineName, BareMetalMachineInner bareMetalMachineParameters, + String ifMatch, String ifNoneMatch, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, bareMetalMachineName, + bareMetalMachineParameters, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, + BareMetalMachineInner.class, BareMetalMachineInner.class, context); } /** - * Retrieve the bare metal machine. - * - * Get properties of the provided bare metal machine. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. + * @param bareMetalMachineParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided bare metal machine along with {@link Response} on successful completion of - * {@link Mono}. + * @return bareMetalMachine represents the physical machine in the rack on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String bareMetalMachineName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono createOrUpdateAsync(String resourceGroupName, String bareMetalMachineName, + BareMetalMachineInner bareMetalMachineParameters, String ifMatch, String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineParameters, ifMatch, + ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieve the bare metal machine. - * - * Get properties of the provided bare metal machine. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. + * @param bareMetalMachineParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided bare metal machine on successful completion of {@link Mono}. + * @return bareMetalMachine represents the physical machine in the rack on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String bareMetalMachineName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, bareMetalMachineName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, String bareMetalMachineName, + BareMetalMachineInner bareMetalMachineParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdateAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineParameters, ifMatch, + ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieve the bare metal machine. - * - * Get properties of the provided bare metal machine. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. - * @param context The context to associate with this operation. + * @param bareMetalMachineParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided bare metal machine along with {@link Response}. + * @return bareMetalMachine represents the physical machine in the rack. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String bareMetalMachineName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, accept, context); + public BareMetalMachineInner createOrUpdate(String resourceGroupName, String bareMetalMachineName, + BareMetalMachineInner bareMetalMachineParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdate(resourceGroupName, bareMetalMachineName, bareMetalMachineParameters, ifMatch, + ifNoneMatch).getFinalResult(); } /** - * Retrieve the bare metal machine. - * - * Get properties of the provided bare metal machine. + * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests + * will be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. + * @param bareMetalMachineParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 properties of the provided bare metal machine. + * @return bareMetalMachine represents the physical machine in the rack. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BareMetalMachineInner getByResourceGroup(String resourceGroupName, String bareMetalMachineName) { - return getByResourceGroupWithResponse(resourceGroupName, bareMetalMachineName, Context.NONE).getValue(); + public BareMetalMachineInner createOrUpdate(String resourceGroupName, String bareMetalMachineName, + BareMetalMachineInner bareMetalMachineParameters, String ifMatch, String ifNoneMatch, Context context) { + return beginCreateOrUpdate(resourceGroupName, bareMetalMachineName, bareMetalMachineParameters, ifMatch, + ifNoneMatch, context).getFinalResult(); } /** - * Create or update the bare metal machine. - * - * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests - * will be rejected as the life cycle of this resource is managed by the system. + * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -982,104 +861,53 @@ public BareMetalMachineInner getByResourceGroup(String resourceGroupName, String * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String bareMetalMachineName, BareMetalMachineInner bareMetalMachineParameters, String ifMatch, - String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter bareMetalMachineParameters is required and cannot be null.")); - } else { - bareMetalMachineParameters.validate(); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, + String bareMetalMachineName, String ifMatch, String ifNoneMatch, + BareMetalMachinePatchParameters bareMetalMachineUpdateParameters) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, - bareMetalMachineParameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, accept, + bareMetalMachineUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update the bare metal machine. - * - * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests - * will be rejected as the life cycle of this resource is managed by the system. + * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return bareMetalMachine represents the physical machine in the rack along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String bareMetalMachineName, - BareMetalMachineInner bareMetalMachineParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineParameters is required and cannot be null.")); - } else { - bareMetalMachineParameters.validate(); - } + private Response updateWithResponse(String resourceGroupName, String bareMetalMachineName, + String ifMatch, String ifNoneMatch, BareMetalMachinePatchParameters bareMetalMachineUpdateParameters) { final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, - bareMetalMachineParameters, accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, accept, + bareMetalMachineUpdateParameters, Context.NONE); } /** - * Create or update the bare metal machine. - * - * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests - * will be rejected as the life cycle of this resource is managed by the system. + * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineUpdateParameters The request body. * @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. @@ -1087,160 +915,126 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @return bareMetalMachine represents the physical machine in the rack along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String bareMetalMachineName, - BareMetalMachineInner bareMetalMachineParameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineParameters is required and cannot be null.")); - } else { - bareMetalMachineParameters.validate(); - } + private Response updateWithResponse(String resourceGroupName, String bareMetalMachineName, + String ifMatch, String ifNoneMatch, BareMetalMachinePatchParameters bareMetalMachineUpdateParameters, + Context context) { final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, - bareMetalMachineParameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, accept, + bareMetalMachineUpdateParameters, context); } /** - * Create or update the bare metal machine. - * - * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests - * will be rejected as the life cycle of this resource is managed by the system. + * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 bareMetalMachine represents the physical machine in the rack. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BareMetalMachineInner> beginCreateOrUpdateAsync( - String resourceGroupName, String bareMetalMachineName, BareMetalMachineInner bareMetalMachineParameters, - String ifMatch, String ifNoneMatch) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, bareMetalMachineName, - bareMetalMachineParameters, ifMatch, ifNoneMatch); + private PollerFlux, BareMetalMachineInner> beginUpdateAsync( + String resourceGroupName, String bareMetalMachineName, String ifMatch, String ifNoneMatch, + BareMetalMachinePatchParameters bareMetalMachineUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, bareMetalMachineName, + ifMatch, ifNoneMatch, bareMetalMachineUpdateParameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), BareMetalMachineInner.class, BareMetalMachineInner.class, this.client.getContext()); } /** - * Create or update the bare metal machine. - * - * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests - * will be rejected as the life cycle of this resource is managed by the system. + * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 bareMetalMachine represents the physical machine in the rack. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BareMetalMachineInner> beginCreateOrUpdateAsync( - String resourceGroupName, String bareMetalMachineName, BareMetalMachineInner bareMetalMachineParameters) { + private PollerFlux, BareMetalMachineInner> + beginUpdateAsync(String resourceGroupName, String bareMetalMachineName) { final String ifMatch = null; final String ifNoneMatch = null; - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, bareMetalMachineName, - bareMetalMachineParameters, ifMatch, ifNoneMatch); + final BareMetalMachinePatchParameters bareMetalMachineUpdateParameters = null; + Mono>> mono = updateWithResponseAsync(resourceGroupName, bareMetalMachineName, + ifMatch, ifNoneMatch, bareMetalMachineUpdateParameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), BareMetalMachineInner.class, BareMetalMachineInner.class, this.client.getContext()); } /** - * Create or update the bare metal machine. - * - * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests - * will be rejected as the life cycle of this resource is managed by the system. + * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 bareMetalMachine represents the physical machine in the rack. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BareMetalMachineInner> beginCreateOrUpdate( - String resourceGroupName, String bareMetalMachineName, BareMetalMachineInner bareMetalMachineParameters, - String ifMatch, String ifNoneMatch) { - Response response = createOrUpdateWithResponse(resourceGroupName, bareMetalMachineName, - bareMetalMachineParameters, ifMatch, ifNoneMatch); + public SyncPoller, BareMetalMachineInner> beginUpdate(String resourceGroupName, + String bareMetalMachineName, String ifMatch, String ifNoneMatch, + BareMetalMachinePatchParameters bareMetalMachineUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, bareMetalMachineName, ifMatch, + ifNoneMatch, bareMetalMachineUpdateParameters); return this.client.getLroResult(response, BareMetalMachineInner.class, BareMetalMachineInner.class, Context.NONE); } /** - * Create or update the bare metal machine. - * - * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests - * will be rejected as the life cycle of this resource is managed by the system. + * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 bareMetalMachine represents the physical machine in the rack. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BareMetalMachineInner> beginCreateOrUpdate( - String resourceGroupName, String bareMetalMachineName, BareMetalMachineInner bareMetalMachineParameters) { + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BareMetalMachineInner> beginUpdate(String resourceGroupName, + String bareMetalMachineName) { final String ifMatch = null; final String ifNoneMatch = null; - Response response = createOrUpdateWithResponse(resourceGroupName, bareMetalMachineName, - bareMetalMachineParameters, ifMatch, ifNoneMatch); + final BareMetalMachinePatchParameters bareMetalMachineUpdateParameters = null; + Response response = updateWithResponse(resourceGroupName, bareMetalMachineName, ifMatch, + ifNoneMatch, bareMetalMachineUpdateParameters); return this.client.getLroResult(response, BareMetalMachineInner.class, BareMetalMachineInner.class, Context.NONE); } /** - * Create or update the bare metal machine. - * - * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests - * will be rejected as the life cycle of this resource is managed by the system. + * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineUpdateParameters The request body. * @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. @@ -1248,99 +1042,89 @@ public SyncPoller, BareMetalMachineInner> begi * @return the {@link SyncPoller} for polling of bareMetalMachine represents the physical machine in the rack. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BareMetalMachineInner> beginCreateOrUpdate( - String resourceGroupName, String bareMetalMachineName, BareMetalMachineInner bareMetalMachineParameters, - String ifMatch, String ifNoneMatch, Context context) { - Response response = createOrUpdateWithResponse(resourceGroupName, bareMetalMachineName, - bareMetalMachineParameters, ifMatch, ifNoneMatch, context); + public SyncPoller, BareMetalMachineInner> beginUpdate(String resourceGroupName, + String bareMetalMachineName, String ifMatch, String ifNoneMatch, + BareMetalMachinePatchParameters bareMetalMachineUpdateParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, bareMetalMachineName, ifMatch, + ifNoneMatch, bareMetalMachineUpdateParameters, context); return this.client.getLroResult(response, BareMetalMachineInner.class, BareMetalMachineInner.class, context); } /** - * Create or update the bare metal machine. - * - * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests - * will be rejected as the life cycle of this resource is managed by the system. + * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return bareMetalMachine represents the physical machine in the rack on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String bareMetalMachineName, - BareMetalMachineInner bareMetalMachineParameters, String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineParameters, ifMatch, - ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String bareMetalMachineName, + String ifMatch, String ifNoneMatch, BareMetalMachinePatchParameters bareMetalMachineUpdateParameters) { + return beginUpdateAsync(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, + bareMetalMachineUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update the bare metal machine. - * - * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests - * will be rejected as the life cycle of this resource is managed by the system. + * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return bareMetalMachine represents the physical machine in the rack on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String bareMetalMachineName, - BareMetalMachineInner bareMetalMachineParameters) { + private Mono updateAsync(String resourceGroupName, String bareMetalMachineName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineParameters, ifMatch, - ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + final BareMetalMachinePatchParameters bareMetalMachineUpdateParameters = null; + return beginUpdateAsync(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, + bareMetalMachineUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update the bare metal machine. - * - * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests - * will be rejected as the life cycle of this resource is managed by the system. + * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return bareMetalMachine represents the physical machine in the rack. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BareMetalMachineInner createOrUpdate(String resourceGroupName, String bareMetalMachineName, - BareMetalMachineInner bareMetalMachineParameters) { + public BareMetalMachineInner update(String resourceGroupName, String bareMetalMachineName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateOrUpdate(resourceGroupName, bareMetalMachineName, bareMetalMachineParameters, ifMatch, - ifNoneMatch).getFinalResult(); + final BareMetalMachinePatchParameters bareMetalMachineUpdateParameters = null; + return beginUpdate(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, + bareMetalMachineUpdateParameters).getFinalResult(); } /** - * Create or update the bare metal machine. - * - * Create a new bare metal machine or update the properties of the existing one. All customer initiated requests - * will be rejected as the life cycle of this resource is managed by the system. + * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bareMetalMachineUpdateParameters The request body. * @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. @@ -1348,15 +1132,13 @@ public BareMetalMachineInner createOrUpdate(String resourceGroupName, String bar * @return bareMetalMachine represents the physical machine in the rack. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BareMetalMachineInner createOrUpdate(String resourceGroupName, String bareMetalMachineName, - BareMetalMachineInner bareMetalMachineParameters, String ifMatch, String ifNoneMatch, Context context) { - return beginCreateOrUpdate(resourceGroupName, bareMetalMachineName, bareMetalMachineParameters, ifMatch, - ifNoneMatch, context).getFinalResult(); + public BareMetalMachineInner update(String resourceGroupName, String bareMetalMachineName, String ifMatch, + String ifNoneMatch, BareMetalMachinePatchParameters bareMetalMachineUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, + bareMetalMachineUpdateParameters, context).getFinalResult(); } /** - * Delete the bare metal machine. - * * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of * this resource is managed by the system. * @@ -1369,39 +1151,17 @@ public BareMetalMachineInner createOrUpdate(String resourceGroupName, String bar * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String bareMetalMachineName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, accept, - context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the bare metal machine. - * * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of * this resource is managed by the system. * @@ -1414,38 +1174,17 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String bareMetalMachineName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, accept, + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, Context.NONE); } /** - * Delete the bare metal machine. - * * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of * this resource is managed by the system. * @@ -1459,38 +1198,16 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String bareMetalMachineName, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, accept, - context); + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, context); } /** - * Delete the bare metal machine. - * * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of * this resource is managed by the system. * @@ -1503,21 +1220,18 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String bareMetalMachineName, String ifMatch, String ifNoneMatch) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String bareMetalMachineName, + String ifMatch, String ifNoneMatch) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the bare metal machine. - * * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of * this resource is managed by the system. * @@ -1526,23 +1240,19 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String bareMetalMachineName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String bareMetalMachineName) { final String ifMatch = null; final String ifNoneMatch = null; Mono>> mono = deleteWithResponseAsync(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the bare metal machine. - * * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of * this resource is managed by the system. * @@ -1555,20 +1265,17 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String bareMetalMachineName, String ifMatch, String ifNoneMatch) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String bareMetalMachineName, + String ifMatch, String ifNoneMatch) { Response response = deleteWithResponse(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the bare metal machine. - * * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of * this resource is managed by the system. * @@ -1577,22 +1284,18 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String bareMetalMachineName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String bareMetalMachineName) { final String ifMatch = null; final String ifNoneMatch = null; Response response = deleteWithResponse(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the bare metal machine. - * * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of * this resource is managed by the system. * @@ -1606,20 +1309,17 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( - String resourceGroupName, String bareMetalMachineName, String ifMatch, String ifNoneMatch, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String bareMetalMachineName, + String ifMatch, String ifNoneMatch, Context context) { Response response = deleteWithResponse(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Delete the bare metal machine. - * * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of * this resource is managed by the system. * @@ -1632,18 +1332,16 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String bareMetalMachineName, - String ifMatch, String ifNoneMatch) { + private Mono deleteAsync(String resourceGroupName, String bareMetalMachineName, String ifMatch, + String ifNoneMatch) { return beginDeleteAsync(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the bare metal machine. - * * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of * this resource is managed by the system. * @@ -1652,10 +1350,10 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String bareMetalMachineName) { + private Mono deleteAsync(String resourceGroupName, String bareMetalMachineName) { final String ifMatch = null; final String ifNoneMatch = null; return beginDeleteAsync(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch).last() @@ -1663,8 +1361,6 @@ private Mono deleteAsync(String resourceGroupName, S } /** - * Delete the bare metal machine. - * * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of * this resource is managed by the system. * @@ -1673,18 +1369,15 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String bareMetalMachineName) { + public void delete(String resourceGroupName, String bareMetalMachineName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginDelete(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch).getFinalResult(); + beginDelete(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch).getFinalResult(); } /** - * Delete the bare metal machine. - * * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of * this resource is managed by the system. * @@ -1698,397 +1391,294 @@ public OperationStatusResultInner delete(String resourceGroupName, String bareMe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 delete(String resourceGroupName, String bareMetalMachineName, String ifMatch, - String ifNoneMatch, Context context) { - return beginDelete(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, context).getFinalResult(); + public void delete(String resourceGroupName, String bareMetalMachineName, String ifMatch, String ifNoneMatch, + Context context) { + beginDelete(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, context).getFinalResult(); } /** - * Patch the bare metal machine. - * - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. - * Properties and tag updates can be done independently. + * Get a list of bare metal machines in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bareMetalMachine represents the physical machine in the rack along with {@link Response} on successful - * completion of {@link Mono}. + * @return a list of bare metal machines in the provided resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String bareMetalMachineName, String ifMatch, String ifNoneMatch, - BareMetalMachinePatchParameters bareMetalMachineUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineUpdateParameters != null) { - bareMetalMachineUpdateParameters.validate(); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Integer top, String skipToken) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, - bareMetalMachineUpdateParameters, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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())); } /** - * Patch the bare metal machine. + * Get a list of bare metal machines in the provided resource group. * - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. - * Properties and tag updates can be done independently. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 bare metal machines in the provided resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, + String skipToken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of bare metal machines in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bareMetalMachine represents the physical machine in the rack along with {@link Response}. + * @return a list of bare metal machines in the provided resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of bare metal machines in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 bare metal machines in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String bareMetalMachineName, - String ifMatch, String ifNoneMatch, BareMetalMachinePatchParameters bareMetalMachineUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineUpdateParameters != null) { - bareMetalMachineUpdateParameters.validate(); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken) { final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, - bareMetalMachineUpdateParameters, accept, Context.NONE); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the bare metal machine. - * - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. - * Properties and tag updates can be done independently. + * Get a list of bare metal machines in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 bareMetalMachine represents the physical machine in the rack along with {@link Response}. + * @return a list of bare metal machines in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String bareMetalMachineName, - String ifMatch, String ifNoneMatch, BareMetalMachinePatchParameters bareMetalMachineUpdateParameters, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineUpdateParameters != null) { - bareMetalMachineUpdateParameters.validate(); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken, Context context) { final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, - bareMetalMachineUpdateParameters, accept, context); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the bare metal machine. - * - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. - * Properties and tag updates can be done independently. + * Get a list of bare metal machines in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 bareMetalMachine represents the physical machine in the rack. + * @return a list of bare metal machines in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BareMetalMachineInner> beginUpdateAsync( - String resourceGroupName, String bareMetalMachineName, String ifMatch, String ifNoneMatch, - BareMetalMachinePatchParameters bareMetalMachineUpdateParameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, bareMetalMachineName, - ifMatch, ifNoneMatch, bareMetalMachineUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), BareMetalMachineInner.class, BareMetalMachineInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Patch the bare metal machine. - * - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. - * Properties and tag updates can be done independently. + * Get a list of bare metal machines in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of bareMetalMachine represents the physical machine in the rack. + * @return a list of bare metal machines in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BareMetalMachineInner> - beginUpdateAsync(String resourceGroupName, String bareMetalMachineName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final BareMetalMachinePatchParameters bareMetalMachineUpdateParameters = null; - Mono>> mono = updateWithResponseAsync(resourceGroupName, bareMetalMachineName, - ifMatch, ifNoneMatch, bareMetalMachineUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), BareMetalMachineInner.class, BareMetalMachineInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, + String skipToken, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Patch the bare metal machine. - * - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. - * Properties and tag updates can be done independently. + * Get a list of bare metal machines in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 bareMetalMachine represents the physical machine in the rack. + * @return a list of bare metal machines in the provided subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BareMetalMachineInner> beginUpdate(String resourceGroupName, - String bareMetalMachineName, String ifMatch, String ifNoneMatch, - BareMetalMachinePatchParameters bareMetalMachineUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, bareMetalMachineName, ifMatch, - ifNoneMatch, bareMetalMachineUpdateParameters); - return this.client.getLroResult(response, - BareMetalMachineInner.class, BareMetalMachineInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, 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())); } /** - * Patch the bare metal machine. - * - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. - * Properties and tag updates can be done independently. + * Get a list of bare metal machines in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 bareMetalMachine represents the physical machine in the rack. + * @return a list of bare metal machines in the provided subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BareMetalMachineInner> beginUpdate(String resourceGroupName, - String bareMetalMachineName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final BareMetalMachinePatchParameters bareMetalMachineUpdateParameters = null; - Response response = updateWithResponse(resourceGroupName, bareMetalMachineName, ifMatch, - ifNoneMatch, bareMetalMachineUpdateParameters); - return this.client.getLroResult(response, - BareMetalMachineInner.class, BareMetalMachineInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Integer top, String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Patch the bare metal machine. - * - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. - * Properties and tag updates can be done independently. + * Get a list of bare metal machines in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineUpdateParameters The request body. - * @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 bareMetalMachine represents the physical machine in the rack. + * @return a list of bare metal machines in the provided subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BareMetalMachineInner> beginUpdate(String resourceGroupName, - String bareMetalMachineName, String ifMatch, String ifNoneMatch, - BareMetalMachinePatchParameters bareMetalMachineUpdateParameters, Context context) { - Response response = updateWithResponse(resourceGroupName, bareMetalMachineName, ifMatch, - ifNoneMatch, bareMetalMachineUpdateParameters, context); - return this.client.getLroResult(response, - BareMetalMachineInner.class, BareMetalMachineInner.class, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Patch the bare metal machine. - * - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. - * Properties and tag updates can be done independently. + * Get a list of bare metal machines in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bareMetalMachine represents the physical machine in the rack on successful completion of {@link Mono}. + * @return a list of bare metal machines in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String bareMetalMachineName, - String ifMatch, String ifNoneMatch, BareMetalMachinePatchParameters bareMetalMachineUpdateParameters) { - return beginUpdateAsync(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, - bareMetalMachineUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(Integer top, String skipToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the bare metal machine. - * - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. - * Properties and tag updates can be done independently. + * Get a list of bare metal machines in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 bareMetalMachine represents the physical machine in the rack on successful completion of {@link Mono}. + * @return a list of bare metal machines in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String bareMetalMachineName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final BareMetalMachinePatchParameters bareMetalMachineUpdateParameters = null; - return beginUpdateAsync(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, - bareMetalMachineUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the bare metal machine. - * - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. - * Properties and tag updates can be done independently. + * Get a list of bare metal machines in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bareMetalMachine represents the physical machine in the rack. + * @return a list of bare metal machines in the provided subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BareMetalMachineInner update(String resourceGroupName, String bareMetalMachineName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final BareMetalMachinePatchParameters bareMetalMachineUpdateParameters = null; - return beginUpdate(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, - bareMetalMachineUpdateParameters).getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listSinglePage(top, skipToken), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * Patch the bare metal machine. - * - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. - * Properties and tag updates can be done independently. + * Get a list of bare metal machines in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param bareMetalMachineUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 bareMetalMachine represents the physical machine in the rack. + * @return a list of bare metal machines in the provided subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BareMetalMachineInner update(String resourceGroupName, String bareMetalMachineName, String ifMatch, - String ifNoneMatch, BareMetalMachinePatchParameters bareMetalMachineUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, - bareMetalMachineUpdateParameters, context).getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Integer top, String skipToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2097,42 +1687,19 @@ public BareMetalMachineInner update(String resourceGroupName, String bareMetalMa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> cordonWithResponseAsync(String resourceGroupName, String bareMetalMachineName, BareMetalMachineCordonParameters bareMetalMachineCordonParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineCordonParameters != null) { - bareMetalMachineCordonParameters.validate(); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.cordon(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, - bareMetalMachineCordonParameters, accept, context)) + bareMetalMachineCordonParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2141,41 +1708,17 @@ private Mono>> cordonWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response cordonWithResponse(String resourceGroupName, String bareMetalMachineName, BareMetalMachineCordonParameters bareMetalMachineCordonParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineCordonParameters != null) { - bareMetalMachineCordonParameters.validate(); - } - final String accept = "application/json"; return service.cordonSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, bareMetalMachineCordonParameters, - accept, Context.NONE); + Context.NONE); } /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2185,41 +1728,17 @@ private Response cordonWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response cordonWithResponse(String resourceGroupName, String bareMetalMachineName, BareMetalMachineCordonParameters bareMetalMachineCordonParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineCordonParameters != null) { - bareMetalMachineCordonParameters.validate(); - } - final String accept = "application/json"; return service.cordonSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, bareMetalMachineCordonParameters, - accept, context); + context); } /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2228,22 +1747,20 @@ private Response cordonWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginCordonAsync( + private PollerFlux, OperationStatusResult> beginCordonAsync( String resourceGroupName, String bareMetalMachineName, BareMetalMachineCordonParameters bareMetalMachineCordonParameters) { Mono>> mono = cordonWithResponseAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineCordonParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2251,22 +1768,20 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> + private PollerFlux, OperationStatusResult> beginCordonAsync(String resourceGroupName, String bareMetalMachineName) { final BareMetalMachineCordonParameters bareMetalMachineCordonParameters = null; Mono>> mono = cordonWithResponseAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineCordonParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2275,21 +1790,18 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginCordon( - String resourceGroupName, String bareMetalMachineName, - BareMetalMachineCordonParameters bareMetalMachineCordonParameters) { + public SyncPoller, OperationStatusResult> beginCordon(String resourceGroupName, + String bareMetalMachineName, BareMetalMachineCordonParameters bareMetalMachineCordonParameters) { Response response = cordonWithResponse(resourceGroupName, bareMetalMachineName, bareMetalMachineCordonParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2297,21 +1809,19 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginCordon(String resourceGroupName, String bareMetalMachineName) { + public SyncPoller, OperationStatusResult> beginCordon(String resourceGroupName, + String bareMetalMachineName) { final BareMetalMachineCordonParameters bareMetalMachineCordonParameters = null; Response response = cordonWithResponse(resourceGroupName, bareMetalMachineName, bareMetalMachineCordonParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2321,21 +1831,19 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginCordon( - String resourceGroupName, String bareMetalMachineName, - BareMetalMachineCordonParameters bareMetalMachineCordonParameters, Context context) { + public SyncPoller, OperationStatusResult> beginCordon(String resourceGroupName, + String bareMetalMachineName, BareMetalMachineCordonParameters bareMetalMachineCordonParameters, + Context context) { Response response = cordonWithResponse(resourceGroupName, bareMetalMachineName, bareMetalMachineCordonParameters, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2344,18 +1852,16 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cordonAsync(String resourceGroupName, String bareMetalMachineName, + private Mono cordonAsync(String resourceGroupName, String bareMetalMachineName, BareMetalMachineCordonParameters bareMetalMachineCordonParameters) { return beginCordonAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineCordonParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2363,18 +1869,16 @@ private Mono cordonAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cordonAsync(String resourceGroupName, String bareMetalMachineName) { + private Mono cordonAsync(String resourceGroupName, String bareMetalMachineName) { final BareMetalMachineCordonParameters bareMetalMachineCordonParameters = null; return beginCordonAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineCordonParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2382,17 +1886,15 @@ private Mono cordonAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner cordon(String resourceGroupName, String bareMetalMachineName) { + public OperationStatusResult cordon(String resourceGroupName, String bareMetalMachineName) { final BareMetalMachineCordonParameters bareMetalMachineCordonParameters = null; return beginCordon(resourceGroupName, bareMetalMachineName, bareMetalMachineCordonParameters).getFinalResult(); } /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2402,18 +1904,16 @@ public OperationStatusResultInner cordon(String resourceGroupName, String bareMe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner cordon(String resourceGroupName, String bareMetalMachineName, + public OperationStatusResult cordon(String resourceGroupName, String bareMetalMachineName, BareMetalMachineCordonParameters bareMetalMachineCordonParameters, Context context) { return beginCordon(resourceGroupName, bareMetalMachineName, bareMetalMachineCordonParameters, context) .getFinalResult(); } /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2422,42 +1922,19 @@ public OperationStatusResultInner cordon(String resourceGroupName, String bareMe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> powerOffWithResponseAsync(String resourceGroupName, String bareMetalMachineName, BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachinePowerOffParameters != null) { - bareMetalMachinePowerOffParameters.validate(); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.powerOff(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, - bareMetalMachinePowerOffParameters, accept, context)) + bareMetalMachinePowerOffParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2466,41 +1943,17 @@ private Mono>> powerOffWithResponseAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response powerOffWithResponse(String resourceGroupName, String bareMetalMachineName, BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachinePowerOffParameters != null) { - bareMetalMachinePowerOffParameters.validate(); - } - final String accept = "application/json"; return service.powerOffSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, - bareMetalMachinePowerOffParameters, accept, Context.NONE); + bareMetalMachinePowerOffParameters, Context.NONE); } /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2510,41 +1963,17 @@ private Response powerOffWithResponse(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response powerOffWithResponse(String resourceGroupName, String bareMetalMachineName, BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachinePowerOffParameters != null) { - bareMetalMachinePowerOffParameters.validate(); - } - final String accept = "application/json"; return service.powerOffSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, - bareMetalMachinePowerOffParameters, accept, context); + bareMetalMachinePowerOffParameters, context); } /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2553,22 +1982,20 @@ private Response powerOffWithResponse(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginPowerOffAsync( + private PollerFlux, OperationStatusResult> beginPowerOffAsync( String resourceGroupName, String bareMetalMachineName, BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters) { Mono>> mono = powerOffWithResponseAsync(resourceGroupName, bareMetalMachineName, bareMetalMachinePowerOffParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2576,22 +2003,20 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> + private PollerFlux, OperationStatusResult> beginPowerOffAsync(String resourceGroupName, String bareMetalMachineName) { final BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters = null; Mono>> mono = powerOffWithResponseAsync(resourceGroupName, bareMetalMachineName, bareMetalMachinePowerOffParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2600,21 +2025,18 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginPowerOff( - String resourceGroupName, String bareMetalMachineName, - BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters) { + public SyncPoller, OperationStatusResult> beginPowerOff(String resourceGroupName, + String bareMetalMachineName, BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters) { Response response = powerOffWithResponse(resourceGroupName, bareMetalMachineName, bareMetalMachinePowerOffParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2622,21 +2044,19 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginPowerOff(String resourceGroupName, String bareMetalMachineName) { + public SyncPoller, OperationStatusResult> beginPowerOff(String resourceGroupName, + String bareMetalMachineName) { final BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters = null; Response response = powerOffWithResponse(resourceGroupName, bareMetalMachineName, bareMetalMachinePowerOffParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2646,21 +2066,19 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginPowerOff( - String resourceGroupName, String bareMetalMachineName, - BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters, Context context) { + public SyncPoller, OperationStatusResult> beginPowerOff(String resourceGroupName, + String bareMetalMachineName, BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters, + Context context) { Response response = powerOffWithResponse(resourceGroupName, bareMetalMachineName, bareMetalMachinePowerOffParameters, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2669,18 +2087,16 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono powerOffAsync(String resourceGroupName, String bareMetalMachineName, + private Mono powerOffAsync(String resourceGroupName, String bareMetalMachineName, BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters) { return beginPowerOffAsync(resourceGroupName, bareMetalMachineName, bareMetalMachinePowerOffParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2688,18 +2104,16 @@ private Mono powerOffAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono powerOffAsync(String resourceGroupName, String bareMetalMachineName) { + private Mono powerOffAsync(String resourceGroupName, String bareMetalMachineName) { final BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters = null; return beginPowerOffAsync(resourceGroupName, bareMetalMachineName, bareMetalMachinePowerOffParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2707,18 +2121,16 @@ private Mono powerOffAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner powerOff(String resourceGroupName, String bareMetalMachineName) { + public OperationStatusResult powerOff(String resourceGroupName, String bareMetalMachineName) { final BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters = null; return beginPowerOff(resourceGroupName, bareMetalMachineName, bareMetalMachinePowerOffParameters) .getFinalResult(); } /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2728,133 +2140,93 @@ public OperationStatusResultInner powerOff(String resourceGroupName, String bare * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner powerOff(String resourceGroupName, String bareMetalMachineName, + public OperationStatusResult powerOff(String resourceGroupName, String bareMetalMachineName, BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters, Context context) { return beginPowerOff(resourceGroupName, bareMetalMachineName, bareMetalMachinePowerOffParameters, context) .getFinalResult(); } /** - * Reimage the bare metal machine. - * * Reimage the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. + * @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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> reimageWithResponseAsync(String resourceGroupName, - String bareMetalMachineName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - final String accept = "application/json"; + String bareMetalMachineName, BareMetalMachineReimageParameters body) { return FluxUtil .withContext(context -> service.reimage(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Reimage the bare metal machine. - * * Reimage the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. + * @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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response reimageWithResponse(String resourceGroupName, String bareMetalMachineName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - final String accept = "application/json"; + private Response reimageWithResponse(String resourceGroupName, String bareMetalMachineName, + BareMetalMachineReimageParameters body) { return service.reimageSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, body, Context.NONE); } /** - * Reimage the bare metal machine. - * * Reimage the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. + * @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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response reimageWithResponse(String resourceGroupName, String bareMetalMachineName, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - final String accept = "application/json"; + BareMetalMachineReimageParameters body, Context context) { return service.reimageSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, accept, context); + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, body, context); } /** - * Reimage the bare metal machine. + * Reimage the provided bare metal machine. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param bareMetalMachineName The name of the bare metal machine. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResult> beginReimageAsync( + String resourceGroupName, String bareMetalMachineName, BareMetalMachineReimageParameters body) { + Mono>> mono = reimageWithResponseAsync(resourceGroupName, bareMetalMachineName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, + this.client.getContext()); + } + + /** * Reimage the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2862,79 +2234,95 @@ private Response reimageWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> + private PollerFlux, OperationStatusResult> beginReimageAsync(String resourceGroupName, String bareMetalMachineName) { - Mono>> mono = reimageWithResponseAsync(resourceGroupName, bareMetalMachineName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + final BareMetalMachineReimageParameters body = null; + Mono>> mono = reimageWithResponseAsync(resourceGroupName, bareMetalMachineName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Reimage the bare metal machine. - * * Reimage the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. + * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginReimage(String resourceGroupName, String bareMetalMachineName) { - Response response = reimageWithResponse(resourceGroupName, bareMetalMachineName); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + public SyncPoller, OperationStatusResult> beginReimage(String resourceGroupName, + String bareMetalMachineName, BareMetalMachineReimageParameters body) { + Response response = reimageWithResponse(resourceGroupName, bareMetalMachineName, body); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Reimage the bare metal machine. + * Reimage the provided bare metal machine. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param bareMetalMachineName The name of the bare metal machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, OperationStatusResult> beginReimage(String resourceGroupName, + String bareMetalMachineName) { + final BareMetalMachineReimageParameters body = null; + Response response = reimageWithResponse(resourceGroupName, bareMetalMachineName, body); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); + } + + /** * Reimage the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. + * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginReimage(String resourceGroupName, String bareMetalMachineName, Context context) { - Response response = reimageWithResponse(resourceGroupName, bareMetalMachineName, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + public SyncPoller, OperationStatusResult> beginReimage(String resourceGroupName, + String bareMetalMachineName, BareMetalMachineReimageParameters body, Context context) { + Response response = reimageWithResponse(resourceGroupName, bareMetalMachineName, body, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Reimage the bare metal machine. - * * Reimage the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. + * @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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reimageAsync(String resourceGroupName, String bareMetalMachineName) { - return beginReimageAsync(resourceGroupName, bareMetalMachineName).last() + private Mono reimageAsync(String resourceGroupName, String bareMetalMachineName, + BareMetalMachineReimageParameters body) { + return beginReimageAsync(resourceGroupName, bareMetalMachineName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Reimage the bare metal machine. - * * Reimage the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2942,34 +2330,50 @@ private Mono reimageAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner reimage(String resourceGroupName, String bareMetalMachineName) { - return beginReimage(resourceGroupName, bareMetalMachineName).getFinalResult(); + private Mono reimageAsync(String resourceGroupName, String bareMetalMachineName) { + final BareMetalMachineReimageParameters body = null; + return beginReimageAsync(resourceGroupName, bareMetalMachineName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Reimage the bare metal machine. + * Reimage the provided bare metal machine. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param bareMetalMachineName The name of the bare metal machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResult reimage(String resourceGroupName, String bareMetalMachineName) { + final BareMetalMachineReimageParameters body = null; + return beginReimage(resourceGroupName, bareMetalMachineName, body).getFinalResult(); + } + + /** * Reimage the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. + * @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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner reimage(String resourceGroupName, String bareMetalMachineName, Context context) { - return beginReimage(resourceGroupName, bareMetalMachineName, context).getFinalResult(); + public OperationStatusResult reimage(String resourceGroupName, String bareMetalMachineName, + BareMetalMachineReimageParameters body, Context context) { + return beginReimage(resourceGroupName, bareMetalMachineName, body, context).getFinalResult(); } /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2978,42 +2382,19 @@ public OperationStatusResultInner reimage(String resourceGroupName, String bareM * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> replaceWithResponseAsync(String resourceGroupName, String bareMetalMachineName, BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineReplaceParameters != null) { - bareMetalMachineReplaceParameters.validate(); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.replace(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, - bareMetalMachineReplaceParameters, accept, context)) + bareMetalMachineReplaceParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3022,41 +2403,17 @@ private Mono>> replaceWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response replaceWithResponse(String resourceGroupName, String bareMetalMachineName, BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineReplaceParameters != null) { - bareMetalMachineReplaceParameters.validate(); - } - final String accept = "application/json"; return service.replaceSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, bareMetalMachineReplaceParameters, - accept, Context.NONE); + Context.NONE); } /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3066,41 +2423,17 @@ private Response replaceWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response replaceWithResponse(String resourceGroupName, String bareMetalMachineName, BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineReplaceParameters != null) { - bareMetalMachineReplaceParameters.validate(); - } - final String accept = "application/json"; return service.replaceSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, bareMetalMachineReplaceParameters, - accept, context); + context); } /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3109,22 +2442,20 @@ private Response replaceWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginReplaceAsync( + private PollerFlux, OperationStatusResult> beginReplaceAsync( String resourceGroupName, String bareMetalMachineName, BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters) { Mono>> mono = replaceWithResponseAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineReplaceParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3132,22 +2463,20 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> + private PollerFlux, OperationStatusResult> beginReplaceAsync(String resourceGroupName, String bareMetalMachineName) { final BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters = null; Mono>> mono = replaceWithResponseAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineReplaceParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3156,21 +2485,18 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginReplace( - String resourceGroupName, String bareMetalMachineName, - BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters) { + public SyncPoller, OperationStatusResult> beginReplace(String resourceGroupName, + String bareMetalMachineName, BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters) { Response response = replaceWithResponse(resourceGroupName, bareMetalMachineName, bareMetalMachineReplaceParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3178,21 +2504,19 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginReplace(String resourceGroupName, String bareMetalMachineName) { + public SyncPoller, OperationStatusResult> beginReplace(String resourceGroupName, + String bareMetalMachineName) { final BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters = null; Response response = replaceWithResponse(resourceGroupName, bareMetalMachineName, bareMetalMachineReplaceParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3202,21 +2526,19 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginReplace( - String resourceGroupName, String bareMetalMachineName, - BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters, Context context) { + public SyncPoller, OperationStatusResult> beginReplace(String resourceGroupName, + String bareMetalMachineName, BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters, + Context context) { Response response = replaceWithResponse(resourceGroupName, bareMetalMachineName, bareMetalMachineReplaceParameters, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3225,18 +2547,16 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono replaceAsync(String resourceGroupName, String bareMetalMachineName, + private Mono replaceAsync(String resourceGroupName, String bareMetalMachineName, BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters) { return beginReplaceAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineReplaceParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3244,18 +2564,16 @@ private Mono replaceAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono replaceAsync(String resourceGroupName, String bareMetalMachineName) { + private Mono replaceAsync(String resourceGroupName, String bareMetalMachineName) { final BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters = null; return beginReplaceAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineReplaceParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3263,18 +2581,16 @@ private Mono replaceAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner replace(String resourceGroupName, String bareMetalMachineName) { + public OperationStatusResult replace(String resourceGroupName, String bareMetalMachineName) { final BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters = null; return beginReplace(resourceGroupName, bareMetalMachineName, bareMetalMachineReplaceParameters) .getFinalResult(); } /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3284,18 +2600,16 @@ public OperationStatusResultInner replace(String resourceGroupName, String bareM * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner replace(String resourceGroupName, String bareMetalMachineName, + public OperationStatusResult replace(String resourceGroupName, String bareMetalMachineName, BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters, Context context) { return beginReplace(resourceGroupName, bareMetalMachineName, bareMetalMachineReplaceParameters, context) .getFinalResult(); } /** - * Restart the bare metal machine. - * * Restart the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3303,38 +2617,18 @@ public OperationStatusResultInner replace(String resourceGroupName, String bareM * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> restartWithResponseAsync(String resourceGroupName, String bareMetalMachineName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Restart the bare metal machine. - * * Restart the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3342,36 +2636,15 @@ private Mono>> restartWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response restartWithResponse(String resourceGroupName, String bareMetalMachineName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return service.restartSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, Context.NONE); } /** - * Restart the bare metal machine. - * * Restart the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3380,37 +2653,16 @@ private Response restartWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response restartWithResponse(String resourceGroupName, String bareMetalMachineName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return service.restartSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, accept, context); + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, context); } /** - * Restart the bare metal machine. - * * Restart the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3418,20 +2670,18 @@ private Response restartWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> + private PollerFlux, OperationStatusResult> beginRestartAsync(String resourceGroupName, String bareMetalMachineName) { Mono>> mono = restartWithResponseAsync(resourceGroupName, bareMetalMachineName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Restart the bare metal machine. - * * Restart the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3439,19 +2689,17 @@ private Response restartWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginRestart(String resourceGroupName, String bareMetalMachineName) { + public SyncPoller, OperationStatusResult> beginRestart(String resourceGroupName, + String bareMetalMachineName) { Response response = restartWithResponse(resourceGroupName, bareMetalMachineName); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Restart the bare metal machine. - * * Restart the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3460,19 +2708,17 @@ private Response restartWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginRestart(String resourceGroupName, String bareMetalMachineName, Context context) { + public SyncPoller, OperationStatusResult> beginRestart(String resourceGroupName, + String bareMetalMachineName, Context context) { Response response = restartWithResponse(resourceGroupName, bareMetalMachineName, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Restart the bare metal machine. - * * Restart the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3480,17 +2726,15 @@ private Response restartWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restartAsync(String resourceGroupName, String bareMetalMachineName) { + private Mono restartAsync(String resourceGroupName, String bareMetalMachineName) { return beginRestartAsync(resourceGroupName, bareMetalMachineName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Restart the bare metal machine. - * * Restart the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3498,16 +2742,14 @@ private Mono restartAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner restart(String resourceGroupName, String bareMetalMachineName) { + public OperationStatusResult restart(String resourceGroupName, String bareMetalMachineName) { return beginRestart(resourceGroupName, bareMetalMachineName).getFinalResult(); } /** - * Restart the bare metal machine. - * * Restart the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3516,16 +2758,14 @@ public OperationStatusResultInner restart(String resourceGroupName, String bareM * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner restart(String resourceGroupName, String bareMetalMachineName, Context context) { + public OperationStatusResult restart(String resourceGroupName, String bareMetalMachineName, Context context) { return beginRestart(resourceGroupName, bareMetalMachineName, context).getFinalResult(); } /** - * Run the command on the bare metal machine. - * * Run the command or the script on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -3535,45 +2775,20 @@ public OperationStatusResultInner restart(String resourceGroupName, String bareM * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> runCommandWithResponseAsync(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineRunCommandParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter bareMetalMachineRunCommandParameters is required and cannot be null.")); - } else { - bareMetalMachineRunCommandParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.runCommand(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, - bareMetalMachineRunCommandParameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, contentType, + bareMetalMachineRunCommandParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Run the command on the bare metal machine. - * * Run the command or the script on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -3583,45 +2798,18 @@ private Mono>> runCommandWithResponseAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response runCommandWithResponse(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineRunCommandParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineRunCommandParameters is required and cannot be null.")); - } else { - bareMetalMachineRunCommandParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.runCommandSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, - bareMetalMachineRunCommandParameters, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, contentType, + bareMetalMachineRunCommandParameters, Context.NONE); } /** - * Run the command on the bare metal machine. - * * Run the command or the script on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -3632,45 +2820,18 @@ private Response runCommandWithResponse(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response runCommandWithResponse(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineRunCommandParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineRunCommandParameters is required and cannot be null.")); - } else { - bareMetalMachineRunCommandParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.runCommandSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, - bareMetalMachineRunCommandParameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, contentType, + bareMetalMachineRunCommandParameters, context); } /** - * Run the command on the bare metal machine. - * * Run the command or the script on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -3680,22 +2841,20 @@ private Response runCommandWithResponse(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginRunCommandAsync( + private PollerFlux, OperationStatusResult> beginRunCommandAsync( String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters) { Mono>> mono = runCommandWithResponseAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineRunCommandParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Run the command on the bare metal machine. - * * Run the command or the script on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -3705,21 +2864,19 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginRunCommand( + public SyncPoller, OperationStatusResult> beginRunCommand( String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters) { Response response = runCommandWithResponse(resourceGroupName, bareMetalMachineName, bareMetalMachineRunCommandParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Run the command on the bare metal machine. - * * Run the command or the script on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -3730,21 +2887,19 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginRunCommand( + public SyncPoller, OperationStatusResult> beginRunCommand( String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters, Context context) { Response response = runCommandWithResponse(resourceGroupName, bareMetalMachineName, bareMetalMachineRunCommandParameters, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Run the command on the bare metal machine. - * * Run the command or the script on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -3754,10 +2909,10 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono runCommandAsync(String resourceGroupName, String bareMetalMachineName, + private Mono runCommandAsync(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters) { return beginRunCommandAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineRunCommandParameters) .last() @@ -3765,8 +2920,6 @@ private Mono runCommandAsync(String resourceGroupNam } /** - * Run the command on the bare metal machine. - * * Run the command or the script on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -3776,18 +2929,16 @@ private Mono runCommandAsync(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner runCommand(String resourceGroupName, String bareMetalMachineName, + public OperationStatusResult runCommand(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters) { return beginRunCommand(resourceGroupName, bareMetalMachineName, bareMetalMachineRunCommandParameters) .getFinalResult(); } /** - * Run the command on the bare metal machine. - * * Run the command or the script on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -3798,18 +2949,16 @@ public OperationStatusResultInner runCommand(String resourceGroupName, String ba * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner runCommand(String resourceGroupName, String bareMetalMachineName, + public OperationStatusResult runCommand(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters, Context context) { return beginRunCommand(resourceGroupName, bareMetalMachineName, bareMetalMachineRunCommandParameters, context) .getFinalResult(); } /** - * Run data extraction for a bare metal machine. - * * Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -3819,46 +2968,21 @@ public OperationStatusResultInner runCommand(String resourceGroupName, String ba * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> runDataExtractsWithResponseAsync(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineRunDataExtractsParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter bareMetalMachineRunDataExtractsParameters is required and cannot be null.")); - } else { - bareMetalMachineRunDataExtractsParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.runDataExtracts(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, - bareMetalMachineRunDataExtractsParameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, contentType, + bareMetalMachineRunDataExtractsParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Run data extraction for a bare metal machine. - * * Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -3868,45 +2992,18 @@ private Mono>> runDataExtractsWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response runDataExtractsWithResponse(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineRunDataExtractsParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineRunDataExtractsParameters is required and cannot be null.")); - } else { - bareMetalMachineRunDataExtractsParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.runDataExtractsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, - bareMetalMachineRunDataExtractsParameters, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, contentType, + bareMetalMachineRunDataExtractsParameters, Context.NONE); } /** - * Run data extraction for a bare metal machine. - * * Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -3917,45 +3014,18 @@ private Response runDataExtractsWithResponse(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response runDataExtractsWithResponse(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineRunDataExtractsParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineRunDataExtractsParameters is required and cannot be null.")); - } else { - bareMetalMachineRunDataExtractsParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.runDataExtractsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, - bareMetalMachineRunDataExtractsParameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, contentType, + bareMetalMachineRunDataExtractsParameters, context); } /** - * Run data extraction for a bare metal machine. - * * Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -3965,22 +3035,20 @@ private Response runDataExtractsWithResponse(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginRunDataExtractsAsync( + private PollerFlux, OperationStatusResult> beginRunDataExtractsAsync( String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters) { Mono>> mono = runDataExtractsWithResponseAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineRunDataExtractsParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Run data extraction for a bare metal machine. - * * Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -3990,21 +3058,19 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginRunDataExtracts( + public SyncPoller, OperationStatusResult> beginRunDataExtracts( String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters) { Response response = runDataExtractsWithResponse(resourceGroupName, bareMetalMachineName, bareMetalMachineRunDataExtractsParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Run data extraction for a bare metal machine. - * * Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -4015,21 +3081,19 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginRunDataExtracts( + public SyncPoller, OperationStatusResult> beginRunDataExtracts( String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters, Context context) { Response response = runDataExtractsWithResponse(resourceGroupName, bareMetalMachineName, bareMetalMachineRunDataExtractsParameters, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Run data extraction for a bare metal machine. - * * Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -4039,18 +3103,16 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono runDataExtractsAsync(String resourceGroupName, String bareMetalMachineName, + private Mono runDataExtractsAsync(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters) { return beginRunDataExtractsAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineRunDataExtractsParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Run data extraction for a bare metal machine. - * * Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -4060,18 +3122,16 @@ private Mono runDataExtractsAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner runDataExtracts(String resourceGroupName, String bareMetalMachineName, + public OperationStatusResult runDataExtracts(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters) { return beginRunDataExtracts(resourceGroupName, bareMetalMachineName, bareMetalMachineRunDataExtractsParameters) .getFinalResult(); } /** - * Run data extraction for a bare metal machine. - * * Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -4082,18 +3142,16 @@ public OperationStatusResultInner runDataExtracts(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner runDataExtracts(String resourceGroupName, String bareMetalMachineName, + public OperationStatusResult runDataExtracts(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters, Context context) { return beginRunDataExtracts(resourceGroupName, bareMetalMachineName, bareMetalMachineRunDataExtractsParameters, context).getFinalResult(); } /** - * Run restricted data extraction for a bare metal machine. - * * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with * the command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -4104,46 +3162,21 @@ public OperationStatusResultInner runDataExtracts(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> runDataExtractsRestrictedWithResponseAsync(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineRunDataExtractsRestrictedParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter bareMetalMachineRunDataExtractsRestrictedParameters is required and cannot be null.")); - } else { - bareMetalMachineRunDataExtractsRestrictedParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.runDataExtractsRestricted(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, - bareMetalMachineRunDataExtractsRestrictedParameters, accept, context)) + contentType, bareMetalMachineRunDataExtractsRestrictedParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Run restricted data extraction for a bare metal machine. - * * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with * the command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -4154,46 +3187,19 @@ private Mono>> runDataExtractsRestrictedWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response runDataExtractsRestrictedWithResponse(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineRunDataExtractsRestrictedParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineRunDataExtractsRestrictedParameters is required and cannot be null.")); - } else { - bareMetalMachineRunDataExtractsRestrictedParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.runDataExtractsRestrictedSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, - bareMetalMachineRunDataExtractsRestrictedParameters, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, contentType, + bareMetalMachineRunDataExtractsRestrictedParameters, Context.NONE); } /** - * Run restricted data extraction for a bare metal machine. - * * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with * the command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -4205,47 +3211,20 @@ private Response runDataExtractsRestrictedWithResponse(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response runDataExtractsRestrictedWithResponse(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineRunDataExtractsRestrictedParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineRunDataExtractsRestrictedParameters is required and cannot be null.")); - } else { - bareMetalMachineRunDataExtractsRestrictedParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.runDataExtractsRestrictedSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, - bareMetalMachineRunDataExtractsRestrictedParameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, contentType, + bareMetalMachineRunDataExtractsRestrictedParameters, context); } /** - * Run restricted data extraction for a bare metal machine. - * * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with * the command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -4256,22 +3235,20 @@ private Response runDataExtractsRestrictedWithResponse(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginRunDataExtractsRestrictedAsync(String resourceGroupName, String bareMetalMachineName, - BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters) { + private PollerFlux, OperationStatusResult> beginRunDataExtractsRestrictedAsync( + String resourceGroupName, String bareMetalMachineName, + BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters) { Mono>> mono = runDataExtractsRestrictedWithResponseAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineRunDataExtractsRestrictedParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Run restricted data extraction for a bare metal machine. - * * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with * the command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -4282,21 +3259,19 @@ private Response runDataExtractsRestrictedWithResponse(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginRunDataExtractsRestricted(String resourceGroupName, String bareMetalMachineName, - BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters) { + public SyncPoller, OperationStatusResult> beginRunDataExtractsRestricted( + String resourceGroupName, String bareMetalMachineName, + BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters) { Response response = runDataExtractsRestrictedWithResponse(resourceGroupName, bareMetalMachineName, bareMetalMachineRunDataExtractsRestrictedParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Run restricted data extraction for a bare metal machine. - * * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with * the command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -4308,22 +3283,20 @@ private Response runDataExtractsRestrictedWithResponse(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginRunDataExtractsRestricted(String resourceGroupName, String bareMetalMachineName, - BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters, - Context context) { + public SyncPoller, OperationStatusResult> beginRunDataExtractsRestricted( + String resourceGroupName, String bareMetalMachineName, + BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters, + Context context) { Response response = runDataExtractsRestrictedWithResponse(resourceGroupName, bareMetalMachineName, bareMetalMachineRunDataExtractsRestrictedParameters, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Run restricted data extraction for a bare metal machine. - * * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with * the command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -4334,10 +3307,10 @@ private Response runDataExtractsRestrictedWithResponse(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono runDataExtractsRestrictedAsync(String resourceGroupName, + private Mono runDataExtractsRestrictedAsync(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters) { return beginRunDataExtractsRestrictedAsync(resourceGroupName, bareMetalMachineName, @@ -4345,8 +3318,6 @@ private Mono runDataExtractsRestrictedAsync(String r } /** - * Run restricted data extraction for a bare metal machine. - * * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with * the command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -4357,18 +3328,16 @@ private Mono runDataExtractsRestrictedAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner runDataExtractsRestricted(String resourceGroupName, String bareMetalMachineName, + public OperationStatusResult runDataExtractsRestricted(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters) { return beginRunDataExtractsRestricted(resourceGroupName, bareMetalMachineName, bareMetalMachineRunDataExtractsRestrictedParameters).getFinalResult(); } /** - * Run restricted data extraction for a bare metal machine. - * * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with * the command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -4380,10 +3349,10 @@ public OperationStatusResultInner runDataExtractsRestricted(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner runDataExtractsRestricted(String resourceGroupName, String bareMetalMachineName, + public OperationStatusResult runDataExtractsRestricted(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters, Context context) { return beginRunDataExtractsRestricted(resourceGroupName, bareMetalMachineName, @@ -4391,8 +3360,6 @@ public OperationStatusResultInner runDataExtractsRestricted(String resourceGroup } /** - * Run read-only commands against a bare metal machine. - * * Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the * command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -4403,46 +3370,21 @@ public OperationStatusResultInner runDataExtractsRestricted(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> runReadCommandsWithResponseAsync(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineRunReadCommandsParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter bareMetalMachineRunReadCommandsParameters is required and cannot be null.")); - } else { - bareMetalMachineRunReadCommandsParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.runReadCommands(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, - bareMetalMachineRunReadCommandsParameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, contentType, + bareMetalMachineRunReadCommandsParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Run read-only commands against a bare metal machine. - * * Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the * command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -4453,45 +3395,18 @@ private Mono>> runReadCommandsWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response runReadCommandsWithResponse(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineRunReadCommandsParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineRunReadCommandsParameters is required and cannot be null.")); - } else { - bareMetalMachineRunReadCommandsParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.runReadCommandsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, - bareMetalMachineRunReadCommandsParameters, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, contentType, + bareMetalMachineRunReadCommandsParameters, Context.NONE); } /** - * Run read-only commands against a bare metal machine. - * * Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the * command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -4503,45 +3418,18 @@ private Response runReadCommandsWithResponse(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response runReadCommandsWithResponse(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - if (bareMetalMachineRunReadCommandsParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter bareMetalMachineRunReadCommandsParameters is required and cannot be null.")); - } else { - bareMetalMachineRunReadCommandsParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.runReadCommandsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, - bareMetalMachineRunReadCommandsParameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, contentType, + bareMetalMachineRunReadCommandsParameters, context); } /** - * Run read-only commands against a bare metal machine. - * * Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the * command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -4552,22 +3440,20 @@ private Response runReadCommandsWithResponse(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginRunReadCommandsAsync( + private PollerFlux, OperationStatusResult> beginRunReadCommandsAsync( String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters) { Mono>> mono = runReadCommandsWithResponseAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineRunReadCommandsParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Run read-only commands against a bare metal machine. - * * Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the * command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -4578,21 +3464,19 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginRunReadCommands( + public SyncPoller, OperationStatusResult> beginRunReadCommands( String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters) { Response response = runReadCommandsWithResponse(resourceGroupName, bareMetalMachineName, bareMetalMachineRunReadCommandsParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Run read-only commands against a bare metal machine. - * * Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the * command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -4604,21 +3488,19 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginRunReadCommands( + public SyncPoller, OperationStatusResult> beginRunReadCommands( String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters, Context context) { Response response = runReadCommandsWithResponse(resourceGroupName, bareMetalMachineName, bareMetalMachineRunReadCommandsParameters, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Run read-only commands against a bare metal machine. - * * Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the * command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -4629,18 +3511,16 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono runReadCommandsAsync(String resourceGroupName, String bareMetalMachineName, + private Mono runReadCommandsAsync(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters) { return beginRunReadCommandsAsync(resourceGroupName, bareMetalMachineName, bareMetalMachineRunReadCommandsParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Run read-only commands against a bare metal machine. - * * Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the * command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -4651,18 +3531,16 @@ private Mono runReadCommandsAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner runReadCommands(String resourceGroupName, String bareMetalMachineName, + public OperationStatusResult runReadCommands(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters) { return beginRunReadCommands(resourceGroupName, bareMetalMachineName, bareMetalMachineRunReadCommandsParameters) .getFinalResult(); } /** - * Run read-only commands against a bare metal machine. - * * Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the * command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -4674,18 +3552,16 @@ public OperationStatusResultInner runReadCommands(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner runReadCommands(String resourceGroupName, String bareMetalMachineName, + public OperationStatusResult runReadCommands(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters, Context context) { return beginRunReadCommands(resourceGroupName, bareMetalMachineName, bareMetalMachineRunReadCommandsParameters, context).getFinalResult(); } /** - * Start the bare metal machine. - * * Start the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -4693,38 +3569,18 @@ public OperationStatusResultInner runReadCommands(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync(String resourceGroupName, String bareMetalMachineName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Start the bare metal machine. - * * Start the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -4732,36 +3588,15 @@ private Mono>> startWithResponseAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response startWithResponse(String resourceGroupName, String bareMetalMachineName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, Context.NONE); } /** - * Start the bare metal machine. - * * Start the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -4770,37 +3605,16 @@ private Response startWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response startWithResponse(String resourceGroupName, String bareMetalMachineName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, accept, context); + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, context); } /** - * Start the bare metal machine. - * * Start the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -4808,20 +3622,18 @@ private Response startWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> + private PollerFlux, OperationStatusResult> beginStartAsync(String resourceGroupName, String bareMetalMachineName) { Mono>> mono = startWithResponseAsync(resourceGroupName, bareMetalMachineName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Start the bare metal machine. - * * Start the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -4829,19 +3641,17 @@ private Response startWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginStart(String resourceGroupName, String bareMetalMachineName) { + public SyncPoller, OperationStatusResult> beginStart(String resourceGroupName, + String bareMetalMachineName) { Response response = startWithResponse(resourceGroupName, bareMetalMachineName); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Start the bare metal machine. - * * Start the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -4850,19 +3660,17 @@ private Response startWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginStart(String resourceGroupName, String bareMetalMachineName, Context context) { + public SyncPoller, OperationStatusResult> beginStart(String resourceGroupName, + String bareMetalMachineName, Context context) { Response response = startWithResponse(resourceGroupName, bareMetalMachineName, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Start the bare metal machine. - * * Start the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -4870,17 +3678,15 @@ private Response startWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String bareMetalMachineName) { + private Mono startAsync(String resourceGroupName, String bareMetalMachineName) { return beginStartAsync(resourceGroupName, bareMetalMachineName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Start the bare metal machine. - * * Start the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -4888,16 +3694,14 @@ private Mono startAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner start(String resourceGroupName, String bareMetalMachineName) { + public OperationStatusResult start(String resourceGroupName, String bareMetalMachineName) { return beginStart(resourceGroupName, bareMetalMachineName).getFinalResult(); } /** - * Start the bare metal machine. - * * Start the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -4906,16 +3710,14 @@ public OperationStatusResultInner start(String resourceGroupName, String bareMet * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner start(String resourceGroupName, String bareMetalMachineName, Context context) { + public OperationStatusResult start(String resourceGroupName, String bareMetalMachineName, Context context) { return beginStart(resourceGroupName, bareMetalMachineName, context).getFinalResult(); } /** - * Uncordon the bare metal machine. - * * Uncordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -4923,38 +3725,18 @@ public OperationStatusResultInner start(String resourceGroupName, String bareMet * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> uncordonWithResponseAsync(String resourceGroupName, String bareMetalMachineName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.uncordon(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Uncordon the bare metal machine. - * * Uncordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -4962,36 +3744,15 @@ private Mono>> uncordonWithResponseAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response uncordonWithResponse(String resourceGroupName, String bareMetalMachineName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return service.uncordonSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, Context.NONE); } /** - * Uncordon the bare metal machine. - * * Uncordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -5000,37 +3761,16 @@ private Response uncordonWithResponse(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response uncordonWithResponse(String resourceGroupName, String bareMetalMachineName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (bareMetalMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bareMetalMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return service.uncordonSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, accept, context); + this.client.getSubscriptionId(), resourceGroupName, bareMetalMachineName, context); } /** - * Uncordon the bare metal machine. - * * Uncordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -5038,20 +3778,18 @@ private Response uncordonWithResponse(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> + private PollerFlux, OperationStatusResult> beginUncordonAsync(String resourceGroupName, String bareMetalMachineName) { Mono>> mono = uncordonWithResponseAsync(resourceGroupName, bareMetalMachineName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Uncordon the bare metal machine. - * * Uncordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -5059,19 +3797,17 @@ private Response uncordonWithResponse(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginUncordon(String resourceGroupName, String bareMetalMachineName) { + public SyncPoller, OperationStatusResult> beginUncordon(String resourceGroupName, + String bareMetalMachineName) { Response response = uncordonWithResponse(resourceGroupName, bareMetalMachineName); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Uncordon the bare metal machine. - * * Uncordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -5080,19 +3816,17 @@ private Response uncordonWithResponse(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginUncordon(String resourceGroupName, String bareMetalMachineName, Context context) { + public SyncPoller, OperationStatusResult> beginUncordon(String resourceGroupName, + String bareMetalMachineName, Context context) { Response response = uncordonWithResponse(resourceGroupName, bareMetalMachineName, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Uncordon the bare metal machine. - * * Uncordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -5100,17 +3834,15 @@ private Response uncordonWithResponse(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono uncordonAsync(String resourceGroupName, String bareMetalMachineName) { + private Mono uncordonAsync(String resourceGroupName, String bareMetalMachineName) { return beginUncordonAsync(resourceGroupName, bareMetalMachineName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Uncordon the bare metal machine. - * * Uncordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -5118,16 +3850,14 @@ private Mono uncordonAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner uncordon(String resourceGroupName, String bareMetalMachineName) { + public OperationStatusResult uncordon(String resourceGroupName, String bareMetalMachineName) { return beginUncordon(resourceGroupName, bareMetalMachineName).getFinalResult(); } /** - * Uncordon the bare metal machine. - * * Uncordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -5136,75 +3866,53 @@ public OperationStatusResultInner uncordon(String resourceGroupName, String bare * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner uncordon(String resourceGroupName, String bareMetalMachineName, Context context) { + public OperationStatusResult uncordon(String resourceGroupName, String bareMetalMachineName, Context context) { return beginUncordon(resourceGroupName, bareMetalMachineName, context).getFinalResult(); } /** - * List bare metal machines in the subscription. - * * 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 bare metal machines in the provided subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of bare metal machines in the provided resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); } /** - * List bare metal machines in the subscription. - * * 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 bare metal machines in the provided subscription along with {@link PagedResponse}. + * @return a list of bare metal machines in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = 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); } /** - * List bare metal machines in the subscription. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -5212,88 +3920,57 @@ private PagedResponse listBySubscriptionNextSinglePage(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of bare metal machines in the provided subscription along with {@link PagedResponse}. + * @return a list of bare metal machines in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List bare metal machines in the resource group. - * * 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 bare metal machines in the provided resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of bare metal machines in the provided subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(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())); } /** - * List bare metal machines in the resource group. - * * 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 bare metal machines in the provided resource group along with {@link PagedResponse}. + * @return a list of bare metal machines in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List bare metal machines in the resource group. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -5301,25 +3978,14 @@ private PagedResponse listByResourceGroupNextSinglePage(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of bare metal machines in the provided resource group along with {@link PagedResponse}. + * @return a list of bare metal machines in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(BareMetalMachinesClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachinesImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachinesImpl.java index 247b86ddb7c8..1fd2e9ea1b71 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachinesImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachinesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -11,10 +11,10 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient; import com.azure.resourcemanager.networkcloud.fluent.models.BareMetalMachineInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.BareMetalMachine; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineCordonParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachinePowerOffParameters; +import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReimageParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReplaceParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineRunCommandParameters; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineRunDataExtractsParameters; @@ -35,14 +35,30 @@ public BareMetalMachinesImpl(BareMetalMachinesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BareMetalMachineImpl(inner1, this.manager())); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String bareMetalMachineName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, bareMetalMachineName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BareMetalMachineImpl(inner.getValue(), this.manager())); } - public PagedIterable list(Integer top, String skipToken, Context context) { - PagedIterable inner = this.serviceClient().list(top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BareMetalMachineImpl(inner1, this.manager())); + public BareMetalMachine getByResourceGroup(String resourceGroupName, String bareMetalMachineName) { + BareMetalMachineInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, bareMetalMachineName); + if (inner != null) { + return new BareMetalMachineImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String bareMetalMachineName) { + this.serviceClient().delete(resourceGroupName, bareMetalMachineName); + } + + public void delete(String resourceGroupName, String bareMetalMachineName, String ifMatch, String ifNoneMatch, + Context context) { + this.serviceClient().delete(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, context); } public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -57,273 +73,130 @@ public PagedIterable listByResourceGroup(String resourceGroupN return ResourceManagerUtils.mapPage(inner, inner1 -> new BareMetalMachineImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse(String resourceGroupName, - String bareMetalMachineName, Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, bareMetalMachineName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BareMetalMachineImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BareMetalMachine getByResourceGroup(String resourceGroupName, String bareMetalMachineName) { - BareMetalMachineInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, bareMetalMachineName); - if (inner != null) { - return new BareMetalMachineImpl(inner, this.manager()); - } else { - return null; - } - } - - public OperationStatusResult deleteByResourceGroup(String resourceGroupName, String bareMetalMachineName) { - OperationStatusResultInner inner = this.serviceClient().delete(resourceGroupName, bareMetalMachineName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BareMetalMachineImpl(inner1, this.manager())); } - public OperationStatusResult delete(String resourceGroupName, String bareMetalMachineName, String ifMatch, - String ifNoneMatch, Context context) { - OperationStatusResultInner inner - = this.serviceClient().delete(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(Integer top, String skipToken, Context context) { + PagedIterable inner = this.serviceClient().list(top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BareMetalMachineImpl(inner1, this.manager())); } public OperationStatusResult cordon(String resourceGroupName, String bareMetalMachineName) { - OperationStatusResultInner inner = this.serviceClient().cordon(resourceGroupName, bareMetalMachineName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().cordon(resourceGroupName, bareMetalMachineName); } public OperationStatusResult cordon(String resourceGroupName, String bareMetalMachineName, BareMetalMachineCordonParameters bareMetalMachineCordonParameters, Context context) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .cordon(resourceGroupName, bareMetalMachineName, bareMetalMachineCordonParameters, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public OperationStatusResult powerOff(String resourceGroupName, String bareMetalMachineName) { - OperationStatusResultInner inner = this.serviceClient().powerOff(resourceGroupName, bareMetalMachineName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().powerOff(resourceGroupName, bareMetalMachineName); } public OperationStatusResult powerOff(String resourceGroupName, String bareMetalMachineName, BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters, Context context) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .powerOff(resourceGroupName, bareMetalMachineName, bareMetalMachinePowerOffParameters, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public OperationStatusResult reimage(String resourceGroupName, String bareMetalMachineName) { - OperationStatusResultInner inner = this.serviceClient().reimage(resourceGroupName, bareMetalMachineName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().reimage(resourceGroupName, bareMetalMachineName); } - public OperationStatusResult reimage(String resourceGroupName, String bareMetalMachineName, Context context) { - OperationStatusResultInner inner - = this.serviceClient().reimage(resourceGroupName, bareMetalMachineName, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public OperationStatusResult reimage(String resourceGroupName, String bareMetalMachineName, + BareMetalMachineReimageParameters body, Context context) { + return this.serviceClient().reimage(resourceGroupName, bareMetalMachineName, body, context); } public OperationStatusResult replace(String resourceGroupName, String bareMetalMachineName) { - OperationStatusResultInner inner = this.serviceClient().replace(resourceGroupName, bareMetalMachineName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().replace(resourceGroupName, bareMetalMachineName); } public OperationStatusResult replace(String resourceGroupName, String bareMetalMachineName, BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters, Context context) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .replace(resourceGroupName, bareMetalMachineName, bareMetalMachineReplaceParameters, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public OperationStatusResult restart(String resourceGroupName, String bareMetalMachineName) { - OperationStatusResultInner inner = this.serviceClient().restart(resourceGroupName, bareMetalMachineName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().restart(resourceGroupName, bareMetalMachineName); } public OperationStatusResult restart(String resourceGroupName, String bareMetalMachineName, Context context) { - OperationStatusResultInner inner - = this.serviceClient().restart(resourceGroupName, bareMetalMachineName, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().restart(resourceGroupName, bareMetalMachineName, context); } public OperationStatusResult runCommand(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .runCommand(resourceGroupName, bareMetalMachineName, bareMetalMachineRunCommandParameters); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public OperationStatusResult runCommand(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters, Context context) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .runCommand(resourceGroupName, bareMetalMachineName, bareMetalMachineRunCommandParameters, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public OperationStatusResult runDataExtracts(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .runDataExtracts(resourceGroupName, bareMetalMachineName, bareMetalMachineRunDataExtractsParameters); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public OperationStatusResult runDataExtracts(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters, Context context) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .runDataExtracts(resourceGroupName, bareMetalMachineName, bareMetalMachineRunDataExtractsParameters, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public OperationStatusResult runDataExtractsRestricted(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .runDataExtractsRestricted(resourceGroupName, bareMetalMachineName, bareMetalMachineRunDataExtractsRestrictedParameters); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public OperationStatusResult runDataExtractsRestricted(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters, Context context) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .runDataExtractsRestricted(resourceGroupName, bareMetalMachineName, bareMetalMachineRunDataExtractsRestrictedParameters, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public OperationStatusResult runReadCommands(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .runReadCommands(resourceGroupName, bareMetalMachineName, bareMetalMachineRunReadCommandsParameters); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public OperationStatusResult runReadCommands(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters, Context context) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .runReadCommands(resourceGroupName, bareMetalMachineName, bareMetalMachineRunReadCommandsParameters, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public OperationStatusResult start(String resourceGroupName, String bareMetalMachineName) { - OperationStatusResultInner inner = this.serviceClient().start(resourceGroupName, bareMetalMachineName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().start(resourceGroupName, bareMetalMachineName); } public OperationStatusResult start(String resourceGroupName, String bareMetalMachineName, Context context) { - OperationStatusResultInner inner = this.serviceClient().start(resourceGroupName, bareMetalMachineName, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().start(resourceGroupName, bareMetalMachineName, context); } public OperationStatusResult uncordon(String resourceGroupName, String bareMetalMachineName) { - OperationStatusResultInner inner = this.serviceClient().uncordon(resourceGroupName, bareMetalMachineName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().uncordon(resourceGroupName, bareMetalMachineName); } public OperationStatusResult uncordon(String resourceGroupName, String bareMetalMachineName, Context context) { - OperationStatusResultInner inner - = this.serviceClient().uncordon(resourceGroupName, bareMetalMachineName, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().uncordon(resourceGroupName, bareMetalMachineName, context); } public BareMetalMachine getById(String id) { @@ -354,7 +227,7 @@ public Response getByIdWithResponse(String id, Context context return this.getByResourceGroupWithResponse(resourceGroupName, bareMetalMachineName, context); } - public OperationStatusResult deleteById(String id) { + public void deleteById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -367,11 +240,10 @@ public OperationStatusResult deleteById(String id) { } String localIfMatch = null; String localIfNoneMatch = null; - return this.delete(resourceGroupName, bareMetalMachineName, localIfMatch, localIfNoneMatch, Context.NONE); + this.delete(resourceGroupName, bareMetalMachineName, localIfMatch, localIfNoneMatch, Context.NONE); } - public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, - Context context) { + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -382,7 +254,7 @@ public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'bareMetalMachines'.", id))); } - return this.delete(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, context); + this.delete(resourceGroupName, bareMetalMachineName, ifMatch, ifNoneMatch, context); } private BareMetalMachinesClient serviceClient() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BmcKeySetImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BmcKeySetImpl.java index b13f6b571b2b..22ae7869c8bb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BmcKeySetImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BmcKeySetImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -67,30 +67,14 @@ public String azureGroupId() { return this.innerModel().azureGroupId(); } - public BmcKeySetDetailedStatus detailedStatus() { - return this.innerModel().detailedStatus(); - } - - public String detailedStatusMessage() { - return this.innerModel().detailedStatusMessage(); - } - public OffsetDateTime expiration() { return this.innerModel().expiration(); } - public OffsetDateTime lastValidation() { - return this.innerModel().lastValidation(); - } - public BmcKeySetPrivilegeLevel privilegeLevel() { return this.innerModel().privilegeLevel(); } - public BmcKeySetProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - public List userList() { List inner = this.innerModel().userList(); if (inner != null) { @@ -100,6 +84,18 @@ public List userList() { } } + public BmcKeySetDetailedStatus detailedStatus() { + return this.innerModel().detailedStatus(); + } + + public String detailedStatusMessage() { + return this.innerModel().detailedStatusMessage(); + } + + public OffsetDateTime lastValidation() { + return this.innerModel().lastValidation(); + } + public List userListStatus() { List inner = this.innerModel().userListStatus(); if (inner != null) { @@ -109,6 +105,10 @@ public List userListStatus() { } } + public BmcKeySetProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public Region region() { return Region.fromName(this.regionName()); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BmcKeySetsClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BmcKeySetsClientImpl.java index a060d6136924..458993a0a2f8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BmcKeySetsClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BmcKeySetsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -31,13 +31,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.BmcKeySetsClient; import com.azure.resourcemanager.networkcloud.fluent.models.BmcKeySetInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; -import com.azure.resourcemanager.networkcloud.models.BmcKeySetList; +import com.azure.resourcemanager.networkcloud.implementation.models.BmcKeySetList; import com.azure.resourcemanager.networkcloud.models.BmcKeySetPatchParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,51 +53,31 @@ public final class BmcKeySetsClientImpl implements BmcKeySetsClient { /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of BmcKeySetsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BmcKeySetsClientImpl(NetworkCloudImpl client) { + BmcKeySetsClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(BmcKeySetsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudBmcKeySets to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for NetworkCloudManagementClientBmcKeySets to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudBmcKeySets") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientBmcKeySets") public interface BmcKeySetsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCluster(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByClusterSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("bmcKeySetName") String bmcKeySetName, @HeaderParam("Accept") String accept, Context context); @@ -108,77 +86,93 @@ Mono> get(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("bmcKeySetName") String bmcKeySetName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("bmcKeySetName") String bmcKeySetName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") BmcKeySetInner bmcKeySetParameters, @HeaderParam("Accept") String accept, + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BmcKeySetInner bmcKeySetParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("bmcKeySetName") String bmcKeySetName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") BmcKeySetInner bmcKeySetParameters, @HeaderParam("Accept") String accept, + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BmcKeySetInner bmcKeySetParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("bmcKeySetName") String bmcKeySetName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BmcKeySetPatchParameters bmcKeySetUpdateParameters, Context context); @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}") + @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("clusterName") String clusterName, + @PathParam("bmcKeySetName") String bmcKeySetName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BmcKeySetPatchParameters bmcKeySetUpdateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("bmcKeySetName") String bmcKeySetName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("bmcKeySetName") String bmcKeySetName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") BmcKeySetPatchParameters bmcKeySetUpdateParameters, + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response listByClusterSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("bmcKeySetName") String bmcKeySetName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") BmcKeySetPatchParameters bmcKeySetUpdateParameters, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -186,241 +180,17 @@ Response updateSync(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByClusterNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByClusterNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List baseboard management controller key sets of the cluster. - * - * Get a list of baseboard management controller key sets for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 baseboard management controller key sets for the provided cluster along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync(String resourceGroupName, - String clusterName, Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, top, skipToken, 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 baseboard management controller key sets of the cluster. - * - * Get a list of baseboard management controller key sets for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 baseboard management controller key sets for the provided cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, Integer top, - String skipToken) { - return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, top, skipToken), - nextLink -> listByClusterNextSinglePageAsync(nextLink)); - } - - /** - * List baseboard management controller key sets of the cluster. - * - * Get a list of baseboard management controller key sets for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 baseboard management controller key sets for the provided cluster as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, top, skipToken), - nextLink -> listByClusterNextSinglePageAsync(nextLink)); - } - - /** - * List baseboard management controller key sets of the cluster. - * - * Get a list of baseboard management controller key sets for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 baseboard management controller key sets for the provided cluster along with - * {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByClusterSinglePage(String resourceGroupName, String clusterName, - Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listByClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List baseboard management controller key sets of the cluster. - * - * Get a list of baseboard management controller key sets for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 baseboard management controller key sets for the provided cluster along with - * {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByClusterSinglePage(String resourceGroupName, String clusterName, - Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listByClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List baseboard management controller key sets of the cluster. - * - * Get a list of baseboard management controller key sets for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 baseboard management controller key sets for the provided cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCluster(String resourceGroupName, String clusterName) { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listByClusterSinglePage(resourceGroupName, clusterName, top, skipToken), - nextLink -> listByClusterNextSinglePage(nextLink)); - } - - /** - * List baseboard management controller key sets of the cluster. - * - * Get a list of baseboard management controller key sets for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 baseboard management controller key sets for the provided cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCluster(String resourceGroupName, String clusterName, Integer top, - String skipToken, Context context) { - return new PagedIterable<>( - () -> listByClusterSinglePage(resourceGroupName, clusterName, top, skipToken, context), - nextLink -> listByClusterNextSinglePage(nextLink, context)); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Retrieve the baseboard management controller key set of the cluster. - * * Get baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -435,24 +205,6 @@ public PagedIterable listByCluster(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String bmcKeySetName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bmcKeySetName == null) { - return Mono.error(new IllegalArgumentException("Parameter bmcKeySetName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -461,8 +213,6 @@ private Mono> getWithResponseAsync(String resourceGroup } /** - * Retrieve the baseboard management controller key set of the cluster. - * * Get baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -480,8 +230,6 @@ private Mono getAsync(String resourceGroupName, String clusterNa } /** - * Retrieve the baseboard management controller key set of the cluster. - * * Get baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -496,36 +244,12 @@ private Mono getAsync(String resourceGroupName, String clusterNa @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String clusterName, String bmcKeySetName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bmcKeySetName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bmcKeySetName is required and cannot be null.")); - } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, bmcKeySetName, accept, context); } /** - * Retrieve the baseboard management controller key set of the cluster. - * * Get baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -542,8 +266,6 @@ public BmcKeySetInner get(String resourceGroupName, String clusterName, String b } /** - * Create or update the baseboard management controller key set of the cluster. - * * Create a new baseboard management controller key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -564,41 +286,16 @@ public BmcKeySetInner get(String resourceGroupName, String clusterName, String b private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String clusterName, String bmcKeySetName, BmcKeySetInner bmcKeySetParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bmcKeySetName == null) { - return Mono.error(new IllegalArgumentException("Parameter bmcKeySetName is required and cannot be null.")); - } - if (bmcKeySetParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter bmcKeySetParameters is required and cannot be null.")); - } else { - bmcKeySetParameters.validate(); - } + 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, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, - bmcKeySetParameters, accept, context)) + contentType, accept, bmcKeySetParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update the baseboard management controller key set of the cluster. - * * Create a new baseboard management controller key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -617,43 +314,14 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, String bmcKeySetName, BmcKeySetInner bmcKeySetParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bmcKeySetName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bmcKeySetName is required and cannot be null.")); - } - if (bmcKeySetParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bmcKeySetParameters is required and cannot be null.")); - } else { - bmcKeySetParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, - bmcKeySetParameters, accept, Context.NONE); + contentType, accept, bmcKeySetParameters, Context.NONE); } /** - * Create or update the baseboard management controller key set of the cluster. - * * Create a new baseboard management controller key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -673,43 +341,14 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, String bmcKeySetName, BmcKeySetInner bmcKeySetParameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bmcKeySetName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bmcKeySetName is required and cannot be null.")); - } - if (bmcKeySetParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bmcKeySetParameters is required and cannot be null.")); - } else { - bmcKeySetParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, - bmcKeySetParameters, accept, context); + contentType, accept, bmcKeySetParameters, context); } /** - * Create or update the baseboard management controller key set of the cluster. - * * Create a new baseboard management controller key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -736,8 +375,6 @@ private PollerFlux, BmcKeySetInner> beginCreateOrUpda } /** - * Create or update the baseboard management controller key set of the cluster. - * * Create a new baseboard management controller key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -761,8 +398,6 @@ private PollerFlux, BmcKeySetInner> beginCreateOrUpda } /** - * Create or update the baseboard management controller key set of the cluster. - * * Create a new baseboard management controller key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -789,8 +424,6 @@ public SyncPoller, BmcKeySetInner> beginCreateOrUpdat } /** - * Create or update the baseboard management controller key set of the cluster. - * * Create a new baseboard management controller key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -814,8 +447,6 @@ public SyncPoller, BmcKeySetInner> beginCreateOrUpdat } /** - * Create or update the baseboard management controller key set of the cluster. - * * Create a new baseboard management controller key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -843,8 +474,6 @@ public SyncPoller, BmcKeySetInner> beginCreateOrUpdat } /** - * Create or update the baseboard management controller key set of the cluster. - * * Create a new baseboard management controller key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -869,8 +498,6 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin } /** - * Create or update the baseboard management controller key set of the cluster. - * * Create a new baseboard management controller key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -893,8 +520,6 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin } /** - * Create or update the baseboard management controller key set of the cluster. - * * Create a new baseboard management controller key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -916,8 +541,6 @@ public BmcKeySetInner createOrUpdate(String resourceGroupName, String clusterNam } /** - * Create or update the baseboard management controller key set of the cluster. - * * Create a new baseboard management controller key set or update the existing one for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -942,9 +565,8 @@ public BmcKeySetInner createOrUpdate(String resourceGroupName, String clusterNam } /** - * Delete the baseboard management controller key set of the cluster. - * - * Delete the baseboard management controller key set of the provided cluster. + * Patch properties of baseboard management controller key set for the provided cluster, or update the tags + * associated with it. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -953,45 +575,27 @@ public BmcKeySetInner createOrUpdate(String resourceGroupName, String clusterNam * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bmcKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return bmcKeySet represents the baseboard management controller key set along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - String bmcKeySetName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bmcKeySetName == null) { - return Mono.error(new IllegalArgumentException("Parameter bmcKeySetName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + String bmcKeySetName, String ifMatch, String ifNoneMatch, BmcKeySetPatchParameters bmcKeySetUpdateParameters) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, - accept, context)) + accept, bmcKeySetUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the baseboard management controller key set of the cluster. - * - * Delete the baseboard management controller key set of the provided cluster. + * Patch properties of baseboard management controller key set for the provided cluster, or update the tags + * associated with it. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1000,46 +604,24 @@ private Mono>> deleteWithResponseAsync(String resource * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bmcKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return bmcKeySet represents the baseboard management controller key set along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String clusterName, String bmcKeySetName, - String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bmcKeySetName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bmcKeySetName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String clusterName, String bmcKeySetName, + String ifMatch, String ifNoneMatch, BmcKeySetPatchParameters bmcKeySetUpdateParameters) { final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, - accept, Context.NONE); + accept, bmcKeySetUpdateParameters, Context.NONE); } /** - * Delete the baseboard management controller key set of the cluster. - * - * Delete the baseboard management controller key set of the provided cluster. + * Patch properties of baseboard management controller key set for the provided cluster, or update the tags + * associated with it. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1048,47 +630,25 @@ private Response deleteWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bmcKeySetUpdateParameters The request body. * @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}. + * @return bmcKeySet represents the baseboard management controller key set along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String clusterName, String bmcKeySetName, - String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bmcKeySetName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bmcKeySetName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String clusterName, String bmcKeySetName, + String ifMatch, String ifNoneMatch, BmcKeySetPatchParameters bmcKeySetUpdateParameters, Context context) { final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, - accept, context); + accept, bmcKeySetUpdateParameters, context); } /** - * Delete the baseboard management controller key set of the cluster. - * - * Delete the baseboard management controller key set of the provided cluster. + * Patch properties of baseboard management controller key set for the provided cluster, or update the tags + * associated with it. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1097,25 +657,25 @@ private Response deleteWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bmcKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of bmcKeySet represents the baseboard management controller key set. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginDeleteAsync( - String resourceGroupName, String clusterName, String bmcKeySetName, String ifMatch, String ifNoneMatch) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, - this.client.getContext()); + private PollerFlux, BmcKeySetInner> beginUpdateAsync(String resourceGroupName, + String clusterName, String bmcKeySetName, String ifMatch, String ifNoneMatch, + BmcKeySetPatchParameters bmcKeySetUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, bmcKeySetName, + ifMatch, ifNoneMatch, bmcKeySetUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BmcKeySetInner.class, BmcKeySetInner.class, this.client.getContext()); } /** - * Delete the baseboard management controller key set of the cluster. - * - * Delete the baseboard management controller key set of the provided cluster. + * Patch properties of baseboard management controller key set for the provided cluster, or update the tags + * associated with it. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1123,24 +683,23 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of bmcKeySet represents the baseboard management controller key set. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String clusterName, String bmcKeySetName) { + private PollerFlux, BmcKeySetInner> beginUpdateAsync(String resourceGroupName, + String clusterName, String bmcKeySetName) { final String ifMatch = null; final String ifNoneMatch = null; - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, - this.client.getContext()); + final BmcKeySetPatchParameters bmcKeySetUpdateParameters = null; + Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, bmcKeySetName, + ifMatch, ifNoneMatch, bmcKeySetUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BmcKeySetInner.class, BmcKeySetInner.class, this.client.getContext()); } /** - * Delete the baseboard management controller key set of the cluster. - * - * Delete the baseboard management controller key set of the provided cluster. + * Patch properties of baseboard management controller key set for the provided cluster, or update the tags + * associated with it. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1149,24 +708,25 @@ private PollerFlux, OperationStatusResult * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bmcKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of bmcKeySet represents the baseboard management controller key set. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( - String resourceGroupName, String clusterName, String bmcKeySetName, String ifMatch, String ifNoneMatch) { - Response response - = deleteWithResponse(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + public SyncPoller, BmcKeySetInner> beginUpdate(String resourceGroupName, + String clusterName, String bmcKeySetName, String ifMatch, String ifNoneMatch, + BmcKeySetPatchParameters bmcKeySetUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, clusterName, bmcKeySetName, ifMatch, + ifNoneMatch, bmcKeySetUpdateParameters); + return this.client.getLroResult(response, BmcKeySetInner.class, + BmcKeySetInner.class, Context.NONE); } /** - * Delete the baseboard management controller key set of the cluster. - * - * Delete the baseboard management controller key set of the provided cluster. + * Patch properties of baseboard management controller key set for the provided cluster, or update the tags + * associated with it. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1174,23 +734,23 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of bmcKeySet represents the baseboard management controller key set. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String clusterName, String bmcKeySetName) { + public SyncPoller, BmcKeySetInner> beginUpdate(String resourceGroupName, + String clusterName, String bmcKeySetName) { final String ifMatch = null; final String ifNoneMatch = null; - Response response - = deleteWithResponse(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + final BmcKeySetPatchParameters bmcKeySetUpdateParameters = null; + Response response = updateWithResponse(resourceGroupName, clusterName, bmcKeySetName, ifMatch, + ifNoneMatch, bmcKeySetUpdateParameters); + return this.client.getLroResult(response, BmcKeySetInner.class, + BmcKeySetInner.class, Context.NONE); } /** - * Delete the baseboard management controller key set of the cluster. - * - * Delete the baseboard management controller key set of the provided cluster. + * Patch properties of baseboard management controller key set for the provided cluster, or update the tags + * associated with it. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1199,26 +759,26 @@ public SyncPoller, OperationStatusResultI * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bmcKeySetUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of bmcKeySet represents the baseboard management controller key set. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( - String resourceGroupName, String clusterName, String bmcKeySetName, String ifMatch, String ifNoneMatch, - Context context) { - Response response - = deleteWithResponse(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + public SyncPoller, BmcKeySetInner> beginUpdate(String resourceGroupName, + String clusterName, String bmcKeySetName, String ifMatch, String ifNoneMatch, + BmcKeySetPatchParameters bmcKeySetUpdateParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, clusterName, bmcKeySetName, ifMatch, + ifNoneMatch, bmcKeySetUpdateParameters, context); + return this.client.getLroResult(response, BmcKeySetInner.class, + BmcKeySetInner.class, context); } /** - * Delete the baseboard management controller key set of the cluster. - * - * Delete the baseboard management controller key set of the provided cluster. + * Patch properties of baseboard management controller key set for the provided cluster, or update the tags + * associated with it. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1227,22 +787,23 @@ public SyncPoller, OperationStatusResultI * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bmcKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return bmcKeySet represents the baseboard management controller key set on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName, - String bmcKeySetName, String ifMatch, String ifNoneMatch) { - return beginDeleteAsync(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String clusterName, String bmcKeySetName, + String ifMatch, String ifNoneMatch, BmcKeySetPatchParameters bmcKeySetUpdateParameters) { + return beginUpdateAsync(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, + bmcKeySetUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the baseboard management controller key set of the cluster. - * - * Delete the baseboard management controller key set of the provided cluster. + * Patch properties of baseboard management controller key set for the provided cluster, or update the tags + * associated with it. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1250,21 +811,21 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return bmcKeySet represents the baseboard management controller key set on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName, - String bmcKeySetName) { + private Mono updateAsync(String resourceGroupName, String clusterName, String bmcKeySetName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginDeleteAsync(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + final BmcKeySetPatchParameters bmcKeySetUpdateParameters = null; + return beginUpdateAsync(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, + bmcKeySetUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the baseboard management controller key set of the cluster. - * - * Delete the baseboard management controller key set of the provided cluster. + * Patch properties of baseboard management controller key set for the provided cluster, or update the tags + * associated with it. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1272,19 +833,20 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return bmcKeySet represents the baseboard management controller key set. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String clusterName, String bmcKeySetName) { + public BmcKeySetInner update(String resourceGroupName, String clusterName, String bmcKeySetName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginDelete(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch).getFinalResult(); + final BmcKeySetPatchParameters bmcKeySetUpdateParameters = null; + return beginUpdate(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, + bmcKeySetUpdateParameters).getFinalResult(); } /** - * Delete the baseboard management controller key set of the cluster. - * - * Delete the baseboard management controller key set of the provided cluster. + * Patch properties of baseboard management controller key set for the provided cluster, or update the tags + * associated with it. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1293,24 +855,22 @@ public OperationStatusResultInner delete(String resourceGroupName, String cluste * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param bmcKeySetUpdateParameters The request body. * @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. + * @return bmcKeySet represents the baseboard management controller key set. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String clusterName, String bmcKeySetName, - String ifMatch, String ifNoneMatch, Context context) { - return beginDelete(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, context) - .getFinalResult(); + public BmcKeySetInner update(String resourceGroupName, String clusterName, String bmcKeySetName, String ifMatch, + String ifNoneMatch, BmcKeySetPatchParameters bmcKeySetUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, + bmcKeySetUpdateParameters, context).getFinalResult(); } /** - * Patch baseboard management controller key set of the cluster. - * - * Patch properties of baseboard management controller key set for the provided cluster, or update the tags - * associated with it. Properties and tag updates can be done independently. + * Delete the baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1319,50 +879,23 @@ public OperationStatusResultInner delete(String resourceGroupName, String cluste * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bmcKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bmcKeySet represents the baseboard management controller key set along with {@link Response} on - * successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, - String bmcKeySetName, String ifMatch, String ifNoneMatch, BmcKeySetPatchParameters bmcKeySetUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bmcKeySetName == null) { - return Mono.error(new IllegalArgumentException("Parameter bmcKeySetName is required and cannot be null.")); - } - if (bmcKeySetUpdateParameters != null) { - bmcKeySetUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String bmcKeySetName, String ifMatch, String ifNoneMatch) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, - bmcKeySetUpdateParameters, accept, context)) + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Patch baseboard management controller key set of the cluster. - * - * Patch properties of baseboard management controller key set for the provided cluster, or update the tags - * associated with it. Properties and tag updates can be done independently. + * Delete the baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1371,51 +904,21 @@ private Mono>> updateWithResponseAsync(String resource * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bmcKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bmcKeySet represents the baseboard management controller key set along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String clusterName, String bmcKeySetName, - String ifMatch, String ifNoneMatch, BmcKeySetPatchParameters bmcKeySetUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bmcKeySetName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bmcKeySetName is required and cannot be null.")); - } - if (bmcKeySetUpdateParameters != null) { - bmcKeySetUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + private Response deleteWithResponse(String resourceGroupName, String clusterName, String bmcKeySetName, + String ifMatch, String ifNoneMatch) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, - bmcKeySetUpdateParameters, accept, Context.NONE); + Context.NONE); } /** - * Patch baseboard management controller key set of the cluster. - * - * Patch properties of baseboard management controller key set for the provided cluster, or update the tags - * associated with it. Properties and tag updates can be done independently. + * Delete the baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1424,52 +927,22 @@ private Response updateWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bmcKeySetUpdateParameters The request body. * @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 bmcKeySet represents the baseboard management controller key set along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String clusterName, String bmcKeySetName, - String ifMatch, String ifNoneMatch, BmcKeySetPatchParameters bmcKeySetUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (bmcKeySetName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter bmcKeySetName is required and cannot be null.")); - } - if (bmcKeySetUpdateParameters != null) { - bmcKeySetUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + private Response deleteWithResponse(String resourceGroupName, String clusterName, String bmcKeySetName, + String ifMatch, String ifNoneMatch, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, - bmcKeySetUpdateParameters, accept, context); + context); } /** - * Patch baseboard management controller key set of the cluster. - * - * Patch properties of baseboard management controller key set for the provided cluster, or update the tags - * associated with it. Properties and tag updates can be done independently. + * Delete the baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1478,27 +951,22 @@ private Response updateWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bmcKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 bmcKeySet represents the baseboard management controller key set. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BmcKeySetInner> beginUpdateAsync(String resourceGroupName, - String clusterName, String bmcKeySetName, String ifMatch, String ifNoneMatch, - BmcKeySetPatchParameters bmcKeySetUpdateParameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, bmcKeySetName, - ifMatch, ifNoneMatch, bmcKeySetUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BmcKeySetInner.class, BmcKeySetInner.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String bmcKeySetName, String ifMatch, String ifNoneMatch) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Patch baseboard management controller key set of the cluster. - * - * Patch properties of baseboard management controller key set for the provided cluster, or update the tags - * associated with it. Properties and tag updates can be done independently. + * Delete the baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1506,25 +974,21 @@ private PollerFlux, BmcKeySetInner> beginUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 bmcKeySet represents the baseboard management controller key set. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BmcKeySetInner> beginUpdateAsync(String resourceGroupName, - String clusterName, String bmcKeySetName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String bmcKeySetName) { final String ifMatch = null; final String ifNoneMatch = null; - final BmcKeySetPatchParameters bmcKeySetUpdateParameters = null; - Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, bmcKeySetName, - ifMatch, ifNoneMatch, bmcKeySetUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BmcKeySetInner.class, BmcKeySetInner.class, this.client.getContext()); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Patch baseboard management controller key set of the cluster. - * - * Patch properties of baseboard management controller key set for the provided cluster, or update the tags - * associated with it. Properties and tag updates can be done independently. + * Delete the baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1533,27 +997,21 @@ private PollerFlux, BmcKeySetInner> beginUpdateAsync( * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bmcKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 bmcKeySet represents the baseboard management controller key set. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BmcKeySetInner> beginUpdate(String resourceGroupName, - String clusterName, String bmcKeySetName, String ifMatch, String ifNoneMatch, - BmcKeySetPatchParameters bmcKeySetUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, clusterName, bmcKeySetName, ifMatch, - ifNoneMatch, bmcKeySetUpdateParameters); - return this.client.getLroResult(response, BmcKeySetInner.class, - BmcKeySetInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String bmcKeySetName, String ifMatch, String ifNoneMatch) { + Response response + = deleteWithResponse(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Patch baseboard management controller key set of the cluster. - * - * Patch properties of baseboard management controller key set for the provided cluster, or update the tags - * associated with it. Properties and tag updates can be done independently. + * Delete the baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1561,25 +1019,20 @@ public SyncPoller, BmcKeySetInner> beginUpdate(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of bmcKeySet represents the baseboard management controller key set. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BmcKeySetInner> beginUpdate(String resourceGroupName, - String clusterName, String bmcKeySetName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String bmcKeySetName) { final String ifMatch = null; final String ifNoneMatch = null; - final BmcKeySetPatchParameters bmcKeySetUpdateParameters = null; - Response response = updateWithResponse(resourceGroupName, clusterName, bmcKeySetName, ifMatch, - ifNoneMatch, bmcKeySetUpdateParameters); - return this.client.getLroResult(response, BmcKeySetInner.class, - BmcKeySetInner.class, Context.NONE); + Response response + = deleteWithResponse(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Patch baseboard management controller key set of the cluster. - * - * Patch properties of baseboard management controller key set for the provided cluster, or update the tags - * associated with it. Properties and tag updates can be done independently. + * Delete the baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1588,28 +1041,22 @@ public SyncPoller, BmcKeySetInner> beginUpdate(String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bmcKeySetUpdateParameters The request body. * @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 bmcKeySet represents the baseboard management controller key set. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BmcKeySetInner> beginUpdate(String resourceGroupName, - String clusterName, String bmcKeySetName, String ifMatch, String ifNoneMatch, - BmcKeySetPatchParameters bmcKeySetUpdateParameters, Context context) { - Response response = updateWithResponse(resourceGroupName, clusterName, bmcKeySetName, ifMatch, - ifNoneMatch, bmcKeySetUpdateParameters, context); - return this.client.getLroResult(response, BmcKeySetInner.class, - BmcKeySetInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String bmcKeySetName, String ifMatch, String ifNoneMatch, Context context) { + Response response + = deleteWithResponse(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Patch baseboard management controller key set of the cluster. - * - * Patch properties of baseboard management controller key set for the provided cluster, or update the tags - * associated with it. Properties and tag updates can be done independently. + * Delete the baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1618,25 +1065,20 @@ public SyncPoller, BmcKeySetInner> beginUpdate(String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bmcKeySetUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bmcKeySet represents the baseboard management controller key set on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String clusterName, String bmcKeySetName, - String ifMatch, String ifNoneMatch, BmcKeySetPatchParameters bmcKeySetUpdateParameters) { - return beginUpdateAsync(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, - bmcKeySetUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + private Mono deleteAsync(String resourceGroupName, String clusterName, String bmcKeySetName, String ifMatch, + String ifNoneMatch) { + return beginDeleteAsync(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Patch baseboard management controller key set of the cluster. - * - * Patch properties of baseboard management controller key set for the provided cluster, or update the tags - * associated with it. Properties and tag updates can be done independently. + * Delete the baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1644,23 +1086,18 @@ private Mono updateAsync(String resourceGroupName, String cluste * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bmcKeySet represents the baseboard management controller key set on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String clusterName, String bmcKeySetName) { + private Mono deleteAsync(String resourceGroupName, String clusterName, String bmcKeySetName) { final String ifMatch = null; final String ifNoneMatch = null; - final BmcKeySetPatchParameters bmcKeySetUpdateParameters = null; - return beginUpdateAsync(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, - bmcKeySetUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + return beginDeleteAsync(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Patch baseboard management controller key set of the cluster. - * - * Patch properties of baseboard management controller key set for the provided cluster, or update the tags - * associated with it. Properties and tag updates can be done independently. + * Delete the baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1668,22 +1105,16 @@ private Mono updateAsync(String resourceGroupName, String cluste * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bmcKeySet represents the baseboard management controller key set. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BmcKeySetInner update(String resourceGroupName, String clusterName, String bmcKeySetName) { + public void delete(String resourceGroupName, String clusterName, String bmcKeySetName) { final String ifMatch = null; final String ifNoneMatch = null; - final BmcKeySetPatchParameters bmcKeySetUpdateParameters = null; - return beginUpdate(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, - bmcKeySetUpdateParameters).getFinalResult(); + beginDelete(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch).getFinalResult(); } /** - * Patch baseboard management controller key set of the cluster. - * - * Patch properties of baseboard management controller key set for the provided cluster, or update the tags - * associated with it. Properties and tag updates can be done independently. + * Delete the baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1692,23 +1123,175 @@ public BmcKeySetInner update(String resourceGroupName, String clusterName, Strin * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param bmcKeySetUpdateParameters The request body. * @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 bmcKeySet represents the baseboard management controller key set. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BmcKeySetInner update(String resourceGroupName, String clusterName, String bmcKeySetName, String ifMatch, - String ifNoneMatch, BmcKeySetPatchParameters bmcKeySetUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, - bmcKeySetUpdateParameters, context).getFinalResult(); + public void delete(String resourceGroupName, String clusterName, String bmcKeySetName, String ifMatch, + String ifNoneMatch, Context context) { + beginDelete(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, context).getFinalResult(); + } + + /** + * Get a list of baseboard management controller key sets for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 baseboard management controller key sets for the provided cluster along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClusterSinglePageAsync(String resourceGroupName, + String clusterName, Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, top, skipToken, 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 a list of baseboard management controller key sets for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 baseboard management controller key sets for the provided cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, Integer top, + String skipToken) { + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, top, skipToken), + nextLink -> listByClusterNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of baseboard management controller key sets for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 baseboard management controller key sets for the provided cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, top, skipToken), + nextLink -> listByClusterNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of baseboard management controller key sets for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 baseboard management controller key sets for the provided cluster along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByClusterSinglePage(String resourceGroupName, String clusterName, + Integer top, String skipToken) { + final String accept = "application/json"; + Response res = service.listByClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of baseboard management controller key sets for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 baseboard management controller key sets for the provided cluster along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByClusterSinglePage(String resourceGroupName, String clusterName, + Integer top, String skipToken, Context context) { + final String accept = "application/json"; + Response res = service.listByClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List baseboard management controller key sets of the cluster. + * Get a list of baseboard management controller key sets for the provided cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 baseboard management controller key sets for the provided cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCluster(String resourceGroupName, String clusterName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listByClusterSinglePage(resourceGroupName, clusterName, top, skipToken), + nextLink -> listByClusterNextSinglePage(nextLink)); + } + + /** + * Get a list of baseboard management controller key sets for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 baseboard management controller key sets for the provided cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCluster(String resourceGroupName, String clusterName, Integer top, + String skipToken, Context context) { + return new PagedIterable<>( + () -> listByClusterSinglePage(resourceGroupName, clusterName, top, skipToken, context), + nextLink -> listByClusterNextSinglePage(nextLink, context)); + } + + /** * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1720,13 +1303,6 @@ public BmcKeySetInner update(String resourceGroupName, String clusterName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1736,8 +1312,6 @@ private Mono> listByClusterNextSinglePageAsync(Str } /** - * List baseboard management controller key sets of the cluster. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1749,15 +1323,6 @@ private Mono> listByClusterNextSinglePageAsync(Str */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByClusterNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByClusterNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1766,8 +1331,6 @@ private PagedResponse listByClusterNextSinglePage(String nextLin } /** - * List baseboard management controller key sets of the cluster. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1780,21 +1343,10 @@ private PagedResponse listByClusterNextSinglePage(String nextLin */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByClusterNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByClusterNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(BmcKeySetsClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BmcKeySetsImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BmcKeySetsImpl.java index 5be514b3105f..ec5ee11428c5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BmcKeySetsImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/BmcKeySetsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -11,10 +11,8 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.BmcKeySetsClient; import com.azure.resourcemanager.networkcloud.fluent.models.BmcKeySetInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.BmcKeySet; import com.azure.resourcemanager.networkcloud.models.BmcKeySets; -import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; public final class BmcKeySetsImpl implements BmcKeySets { private static final ClientLogger LOGGER = new ClientLogger(BmcKeySetsImpl.class); @@ -29,28 +27,12 @@ public BmcKeySetsImpl(BmcKeySetsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByCluster(String resourceGroupName, String clusterName) { - PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BmcKeySetImpl(inner1, this.manager())); - } - - public PagedIterable listByCluster(String resourceGroupName, String clusterName, Integer top, - String skipToken, Context context) { - PagedIterable inner - = this.serviceClient().listByCluster(resourceGroupName, clusterName, top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BmcKeySetImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String clusterName, String bmcKeySetName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, clusterName, bmcKeySetName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BmcKeySetImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BmcKeySetImpl(inner.getValue(), this.manager())); } public BmcKeySet get(String resourceGroupName, String clusterName, String bmcKeySetName) { @@ -62,24 +44,25 @@ public BmcKeySet get(String resourceGroupName, String clusterName, String bmcKey } } - public OperationStatusResult delete(String resourceGroupName, String clusterName, String bmcKeySetName) { - OperationStatusResultInner inner = this.serviceClient().delete(resourceGroupName, clusterName, bmcKeySetName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String clusterName, String bmcKeySetName) { + this.serviceClient().delete(resourceGroupName, clusterName, bmcKeySetName); } - public OperationStatusResult delete(String resourceGroupName, String clusterName, String bmcKeySetName, - String ifMatch, String ifNoneMatch, Context context) { - OperationStatusResultInner inner - = this.serviceClient().delete(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String clusterName, String bmcKeySetName, String ifMatch, + String ifNoneMatch, Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, context); + } + + public PagedIterable listByCluster(String resourceGroupName, String clusterName) { + PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BmcKeySetImpl(inner1, this.manager())); + } + + public PagedIterable listByCluster(String resourceGroupName, String clusterName, Integer top, + String skipToken, Context context) { + PagedIterable inner + = this.serviceClient().listByCluster(resourceGroupName, clusterName, top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BmcKeySetImpl(inner1, this.manager())); } public BmcKeySet getById(String id) { @@ -120,7 +103,7 @@ public Response getByIdWithResponse(String id, Context context) { return this.getWithResponse(resourceGroupName, clusterName, bmcKeySetName, context); } - public OperationStatusResult deleteById(String id) { + public void deleteById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -138,11 +121,10 @@ public OperationStatusResult deleteById(String id) { } String localIfMatch = null; String localIfNoneMatch = null; - return this.delete(resourceGroupName, clusterName, bmcKeySetName, localIfMatch, localIfNoneMatch, Context.NONE); + this.delete(resourceGroupName, clusterName, bmcKeySetName, localIfMatch, localIfNoneMatch, Context.NONE); } - public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, - Context context) { + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -158,7 +140,7 @@ public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'bmcKeySets'.", id))); } - return this.delete(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, context); + this.delete(resourceGroupName, clusterName, bmcKeySetName, ifMatch, ifNoneMatch, context); } private BmcKeySetsClient serviceClient() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/CloudServicesNetworkImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/CloudServicesNetworkImpl.java index 949f7cad2e03..219950ef9fc7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/CloudServicesNetworkImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/CloudServicesNetworkImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -74,6 +74,14 @@ public List additionalEgressEndpoints() { } } + public CloudServicesNetworkEnableDefaultEgressEndpoints enableDefaultEgressEndpoints() { + return this.innerModel().enableDefaultEgressEndpoints(); + } + + public CloudServicesNetworkStorageOptions storageOptions() { + return this.innerModel().storageOptions(); + } + public List associatedResourceIds() { List inner = this.innerModel().associatedResourceIds(); if (inner != null) { @@ -95,10 +103,6 @@ public String detailedStatusMessage() { return this.innerModel().detailedStatusMessage(); } - public CloudServicesNetworkEnableDefaultEgressEndpoints enableDefaultEgressEndpoints() { - return this.innerModel().enableDefaultEgressEndpoints(); - } - public List enabledEgressEndpoints() { List inner = this.innerModel().enabledEgressEndpoints(); if (inner != null) { @@ -121,14 +125,6 @@ public String interfaceName() { return this.innerModel().interfaceName(); } - public CloudServicesNetworkProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public CloudServicesNetworkStorageOptions storageOptions() { - return this.innerModel().storageOptions(); - } - public CloudServicesNetworkStorageStatus storageStatus() { return this.innerModel().storageStatus(); } @@ -142,6 +138,10 @@ public List virtualMachinesAssociatedIds() { } } + public CloudServicesNetworkProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public Region region() { return Region.fromName(this.regionName()); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/CloudServicesNetworksClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/CloudServicesNetworksClientImpl.java index e6bdf5b8dfae..47ed1abe8d19 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/CloudServicesNetworksClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/CloudServicesNetworksClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -31,13 +31,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.CloudServicesNetworksClient; import com.azure.resourcemanager.networkcloud.fluent.models.CloudServicesNetworkInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; -import com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkList; +import com.azure.resourcemanager.networkcloud.implementation.models.CloudServicesNetworkList; import com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkPatchParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,67 +53,31 @@ public final class CloudServicesNetworksClientImpl implements CloudServicesNetwo /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of CloudServicesNetworksClientImpl. * * @param client the instance of the service client containing this operation class. */ - CloudServicesNetworksClientImpl(NetworkCloudImpl client) { + CloudServicesNetworksClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(CloudServicesNetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudCloudServicesNetworks to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for NetworkCloudManagementClientCloudServicesNetworks to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudCloudServicesNetworks") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientCloudServicesNetworks") public interface CloudServicesNetworksService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/cloudServicesNetworks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/cloudServicesNetworks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudServicesNetworkName") String cloudServicesNetworkName, @@ -125,1007 +87,829 @@ Mono> getByResourceGroup(@HostParam("$host") @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudServicesNetworkName") String cloudServicesNetworkName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudServicesNetworkName") String cloudServicesNetworkName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") CloudServicesNetworkInner cloudServicesNetworkParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CloudServicesNetworkInner cloudServicesNetworkParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudServicesNetworkName") String cloudServicesNetworkName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") CloudServicesNetworkInner cloudServicesNetworkParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CloudServicesNetworkInner cloudServicesNetworkParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudServicesNetworkName") String cloudServicesNetworkName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters, + Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudServicesNetworkName") String cloudServicesNetworkName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters, + Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudServicesNetworkName") String cloudServicesNetworkName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudServicesNetworkName") String cloudServicesNetworkName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/cloudServicesNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/cloudServicesNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + 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 listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + 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> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listBySubscriptionNext( + @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("$host") String endpoint, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List cloud services networks in the subscription. - * - * Get a list of cloud services networks in the provided subscription. + * Get properties of the provided cloud services network. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudServicesNetworkName The name of the cloud services 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 list of cloud services networks in the provided subscription along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return properties of the provided cloud services network along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String cloudServicesNetworkName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudServicesNetworkName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List cloud services networks in the subscription. - * - * Get a list of cloud services networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 cloud services networks in the provided subscription as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer top, String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List cloud services networks in the subscription. - * - * Get a list of cloud services networks in the provided subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of cloud services networks in the provided subscription as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List cloud services networks in the subscription. - * - * Get a list of cloud services networks in the provided subscription. + * Get properties of the provided cloud services network. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudServicesNetworkName The name of the cloud services 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 list of cloud services networks in the provided subscription along with {@link PagedResponse}. + * @return properties of the provided cloud services network on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + private Mono getByResourceGroupAsync(String resourceGroupName, + String cloudServicesNetworkName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, cloudServicesNetworkName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List cloud services networks in the subscription. - * - * Get a list of cloud services networks in the provided subscription. + * Get properties of the provided cloud services network. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudServicesNetworkName The name of the cloud services 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 a list of cloud services networks in the provided subscription along with {@link PagedResponse}. + * @return properties of the provided cloud services network along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + public Response getByResourceGroupWithResponse(String resourceGroupName, + String cloudServicesNetworkName, Context context) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudServicesNetworkName, accept, context); } /** - * List cloud services networks in the subscription. - * - * Get a list of cloud services networks in the provided subscription. + * Get properties of the provided cloud services network. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudServicesNetworkName The name of the cloud services 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 list of cloud services networks in the provided subscription as paginated response with - * {@link PagedIterable}. + * @return properties of the provided cloud services network. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listSinglePage(top, skipToken), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudServicesNetworkInner getByResourceGroup(String resourceGroupName, String cloudServicesNetworkName) { + return getByResourceGroupWithResponse(resourceGroupName, cloudServicesNetworkName, Context.NONE).getValue(); } /** - * List cloud services networks in the subscription. - * - * Get a list of cloud services networks in the provided subscription. + * Create a new cloud services network or update the properties of the existing cloud services network. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudServicesNetworkName The name of the cloud services network. + * @param cloudServicesNetworkParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cloud services networks in the provided subscription as paginated response with - * {@link PagedIterable}. + * @return upon creation, the additional services that are provided by the platform will be allocated and + * represented in the status of this resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Integer top, String skipToken, Context context) { - return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String cloudServicesNetworkName, CloudServicesNetworkInner cloudServicesNetworkParameters, String ifMatch, + String ifNoneMatch) { + 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, cloudServicesNetworkName, ifMatch, ifNoneMatch, + contentType, accept, cloudServicesNetworkParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List cloud services networks in the resource group. - * - * Get a list of cloud services networks in the provided resource group. + * Create a new cloud services network or update the properties of the existing cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param cloudServicesNetworkName The name of the cloud services network. + * @param cloudServicesNetworkParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cloud services networks in the provided resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return upon creation, the additional services that are provided by the platform will be allocated and + * represented in the status of this resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String cloudServicesNetworkName, + CloudServicesNetworkInner cloudServicesNetworkParameters, String ifMatch, String ifNoneMatch) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, + contentType, accept, cloudServicesNetworkParameters, Context.NONE); } /** - * List cloud services networks in the resource group. - * - * Get a list of cloud services networks in the provided resource group. + * Create a new cloud services network or update the properties of the existing cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param cloudServicesNetworkName The name of the cloud services network. + * @param cloudServicesNetworkParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 cloud services networks in the provided resource group as paginated response with - * {@link PagedFlux}. + * @return upon creation, the additional services that are provided by the platform will be allocated and + * represented in the status of this resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, - String skipToken) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String cloudServicesNetworkName, + CloudServicesNetworkInner cloudServicesNetworkParameters, String ifMatch, String ifNoneMatch, 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, cloudServicesNetworkName, ifMatch, ifNoneMatch, + contentType, accept, cloudServicesNetworkParameters, context); } /** - * List cloud services networks in the resource group. - * - * Get a list of cloud services networks in the provided resource group. + * Create a new cloud services network or update the properties of the existing cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudServicesNetworkName The name of the cloud services network. + * @param cloudServicesNetworkParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cloud services networks in the provided resource group as paginated response with - * {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of upon creation, the additional services that are provided by the + * platform will be allocated and represented in the status of this resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudServicesNetworkInner> beginCreateOrUpdateAsync( + String resourceGroupName, String cloudServicesNetworkName, + CloudServicesNetworkInner cloudServicesNetworkParameters, String ifMatch, String ifNoneMatch) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + cloudServicesNetworkName, cloudServicesNetworkParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), CloudServicesNetworkInner.class, CloudServicesNetworkInner.class, + this.client.getContext()); } /** - * List cloud services networks in the resource group. - * - * Get a list of cloud services networks in the provided resource group. + * Create a new cloud services network or update the properties of the existing cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param cloudServicesNetworkName The name of the cloud services network. + * @param cloudServicesNetworkParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cloud services networks in the provided resource group along with {@link PagedResponse}. + * @return the {@link PollerFlux} for polling of upon creation, the additional services that are provided by the + * platform will be allocated and represented in the status of this resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, - Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudServicesNetworkInner> beginCreateOrUpdateAsync( + String resourceGroupName, String cloudServicesNetworkName, + CloudServicesNetworkInner cloudServicesNetworkParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + cloudServicesNetworkName, cloudServicesNetworkParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), CloudServicesNetworkInner.class, CloudServicesNetworkInner.class, + this.client.getContext()); } /** - * List cloud services networks in the resource group. - * - * Get a list of cloud services networks in the provided resource group. + * Create a new cloud services network or update the properties of the existing cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param cloudServicesNetworkName The name of the cloud services network. + * @param cloudServicesNetworkParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cloud services networks in the provided resource group along with {@link PagedResponse}. + * @return the {@link SyncPoller} for polling of upon creation, the additional services that are provided by the + * platform will be allocated and represented in the status of this resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, - Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudServicesNetworkInner> beginCreateOrUpdate( + String resourceGroupName, String cloudServicesNetworkName, + CloudServicesNetworkInner cloudServicesNetworkParameters, String ifMatch, String ifNoneMatch) { + Response response = createOrUpdateWithResponse(resourceGroupName, cloudServicesNetworkName, + cloudServicesNetworkParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, + CloudServicesNetworkInner.class, CloudServicesNetworkInner.class, Context.NONE); } /** - * List cloud services networks in the resource group. - * - * Get a list of cloud services networks in the provided resource group. + * Create a new cloud services network or update the properties of the existing cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudServicesNetworkName The name of the cloud services network. + * @param cloudServicesNetworkParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cloud services networks in the provided resource group as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of upon creation, the additional services that are provided by the + * platform will be allocated and represented in the status of this resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudServicesNetworkInner> beginCreateOrUpdate( + String resourceGroupName, String cloudServicesNetworkName, + CloudServicesNetworkInner cloudServicesNetworkParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Response response = createOrUpdateWithResponse(resourceGroupName, cloudServicesNetworkName, + cloudServicesNetworkParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, + CloudServicesNetworkInner.class, CloudServicesNetworkInner.class, Context.NONE); } /** - * List cloud services networks in the resource group. - * - * Get a list of cloud services networks in the provided resource group. + * Create a new cloud services network or update the properties of the existing cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param cloudServicesNetworkName The name of the cloud services network. + * @param cloudServicesNetworkParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 cloud services networks in the provided resource group as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of upon creation, the additional services that are provided by the + * platform will be allocated and represented in the status of this resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, - String skipToken, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudServicesNetworkInner> beginCreateOrUpdate( + String resourceGroupName, String cloudServicesNetworkName, + CloudServicesNetworkInner cloudServicesNetworkParameters, String ifMatch, String ifNoneMatch, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, cloudServicesNetworkName, + cloudServicesNetworkParameters, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, + CloudServicesNetworkInner.class, CloudServicesNetworkInner.class, context); } /** - * Retrieve the cloud services network. - * - * Get properties of the provided cloud services network. + * Create a new cloud services network or update the properties of the existing cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. + * @param cloudServicesNetworkParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided cloud services network along with {@link Response} on successful completion of - * {@link Mono}. + * @return upon creation, the additional services that are provided by the platform will be allocated and + * represented in the status of this resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String cloudServicesNetworkName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudServicesNetworkName == null) { - return Mono.error( - new IllegalArgumentException("Parameter cloudServicesNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudServicesNetworkName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono createOrUpdateAsync(String resourceGroupName, + String cloudServicesNetworkName, CloudServicesNetworkInner cloudServicesNetworkParameters, String ifMatch, + String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, cloudServicesNetworkName, cloudServicesNetworkParameters, + ifMatch, ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieve the cloud services network. - * - * Get properties of the provided cloud services network. + * Create a new cloud services network or update the properties of the existing cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. + * @param cloudServicesNetworkParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided cloud services network on successful completion of {@link Mono}. + * @return upon creation, the additional services that are provided by the platform will be allocated and + * represented in the status of this resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String cloudServicesNetworkName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, cloudServicesNetworkName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, + String cloudServicesNetworkName, CloudServicesNetworkInner cloudServicesNetworkParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdateAsync(resourceGroupName, cloudServicesNetworkName, cloudServicesNetworkParameters, + ifMatch, ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieve the cloud services network. - * - * Get properties of the provided cloud services network. + * Create a new cloud services network or update the properties of the existing cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. - * @param context The context to associate with this operation. + * @param cloudServicesNetworkParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided cloud services network along with {@link Response}. + * @return upon creation, the additional services that are provided by the platform will be allocated and + * represented in the status of this resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String cloudServicesNetworkName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudServicesNetworkName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter cloudServicesNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudServicesNetworkName, accept, context); + public CloudServicesNetworkInner createOrUpdate(String resourceGroupName, String cloudServicesNetworkName, + CloudServicesNetworkInner cloudServicesNetworkParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdate(resourceGroupName, cloudServicesNetworkName, cloudServicesNetworkParameters, ifMatch, + ifNoneMatch).getFinalResult(); } /** - * Retrieve the cloud services network. - * - * Get properties of the provided cloud services network. + * Create a new cloud services network or update the properties of the existing cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. + * @param cloudServicesNetworkParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 properties of the provided cloud services network. + * @return upon creation, the additional services that are provided by the platform will be allocated and + * represented in the status of this resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudServicesNetworkInner getByResourceGroup(String resourceGroupName, String cloudServicesNetworkName) { - return getByResourceGroupWithResponse(resourceGroupName, cloudServicesNetworkName, Context.NONE).getValue(); + public CloudServicesNetworkInner createOrUpdate(String resourceGroupName, String cloudServicesNetworkName, + CloudServicesNetworkInner cloudServicesNetworkParameters, String ifMatch, String ifNoneMatch, Context context) { + return beginCreateOrUpdate(resourceGroupName, cloudServicesNetworkName, cloudServicesNetworkParameters, ifMatch, + ifNoneMatch, context).getFinalResult(); } /** - * Create or update the cloud services network. - * - * Create a new cloud services network or update the properties of the existing cloud services network. + * Update properties of the provided cloud services network, or update the tags associated with it. Properties and + * tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. - * @param cloudServicesNetworkParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param cloudServicesNetworkUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudServicesNetwork represents additional egress information that will be used by associated virtual - * machines or hybrid AKS clusters along with {@link Response} on successful completion of {@link Mono}. + * @return upon creation, the additional services that are provided by the platform will be allocated and + * represented in the status of this resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String cloudServicesNetworkName, CloudServicesNetworkInner cloudServicesNetworkParameters, String ifMatch, - String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudServicesNetworkName == null) { - return Mono.error( - new IllegalArgumentException("Parameter cloudServicesNetworkName is required and cannot be null.")); - } - if (cloudServicesNetworkParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter cloudServicesNetworkParameters is required and cannot be null.")); - } else { - cloudServicesNetworkParameters.validate(); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, + String cloudServicesNetworkName, String ifMatch, String ifNoneMatch, + CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, - cloudServicesNetworkParameters, accept, context)) + accept, cloudServicesNetworkUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update the cloud services network. - * - * Create a new cloud services network or update the properties of the existing cloud services network. + * Update properties of the provided cloud services network, or update the tags associated with it. Properties and + * tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. - * @param cloudServicesNetworkParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param cloudServicesNetworkUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudServicesNetwork represents additional egress information that will be used by associated virtual - * machines or hybrid AKS clusters along with {@link Response}. + * @return upon creation, the additional services that are provided by the platform will be allocated and + * represented in the status of this resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String cloudServicesNetworkName, - CloudServicesNetworkInner cloudServicesNetworkParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudServicesNetworkName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter cloudServicesNetworkName is required and cannot be null.")); - } - if (cloudServicesNetworkParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter cloudServicesNetworkParameters is required and cannot be null.")); - } else { - cloudServicesNetworkParameters.validate(); - } + private Response updateWithResponse(String resourceGroupName, String cloudServicesNetworkName, + String ifMatch, String ifNoneMatch, CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters) { final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, - cloudServicesNetworkParameters, accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, accept, + cloudServicesNetworkUpdateParameters, Context.NONE); } /** - * Create or update the cloud services network. - * - * Create a new cloud services network or update the properties of the existing cloud services network. + * Update properties of the provided cloud services network, or update the tags associated with it. Properties and + * tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. - * @param cloudServicesNetworkParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param cloudServicesNetworkUpdateParameters The request body. * @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 cloudServicesNetwork represents additional egress information that will be used by associated virtual - * machines or hybrid AKS clusters along with {@link Response}. + * @return upon creation, the additional services that are provided by the platform will be allocated and + * represented in the status of this resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String cloudServicesNetworkName, - CloudServicesNetworkInner cloudServicesNetworkParameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudServicesNetworkName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter cloudServicesNetworkName is required and cannot be null.")); - } - if (cloudServicesNetworkParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter cloudServicesNetworkParameters is required and cannot be null.")); - } else { - cloudServicesNetworkParameters.validate(); - } + private Response updateWithResponse(String resourceGroupName, String cloudServicesNetworkName, + String ifMatch, String ifNoneMatch, CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters, + Context context) { final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, - cloudServicesNetworkParameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, accept, + cloudServicesNetworkUpdateParameters, context); } /** - * Create or update the cloud services network. - * - * Create a new cloud services network or update the properties of the existing cloud services network. + * Update properties of the provided cloud services network, or update the tags associated with it. Properties and + * tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. - * @param cloudServicesNetworkParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param cloudServicesNetworkUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 cloudServicesNetwork represents additional egress information that - * will be used by associated virtual machines or hybrid AKS clusters. + * @return the {@link PollerFlux} for polling of upon creation, the additional services that are provided by the + * platform will be allocated and represented in the status of this resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudServicesNetworkInner> beginCreateOrUpdateAsync( - String resourceGroupName, String cloudServicesNetworkName, - CloudServicesNetworkInner cloudServicesNetworkParameters, String ifMatch, String ifNoneMatch) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, - cloudServicesNetworkName, cloudServicesNetworkParameters, ifMatch, ifNoneMatch); + private PollerFlux, CloudServicesNetworkInner> beginUpdateAsync( + String resourceGroupName, String cloudServicesNetworkName, String ifMatch, String ifNoneMatch, + CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, cloudServicesNetworkName, + ifMatch, ifNoneMatch, cloudServicesNetworkUpdateParameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), CloudServicesNetworkInner.class, CloudServicesNetworkInner.class, this.client.getContext()); } /** - * Create or update the cloud services network. - * - * Create a new cloud services network or update the properties of the existing cloud services network. + * Update properties of the provided cloud services network, or update the tags associated with it. Properties and + * tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. - * @param cloudServicesNetworkParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 cloudServicesNetwork represents additional egress information that - * will be used by associated virtual machines or hybrid AKS clusters. + * @return the {@link PollerFlux} for polling of upon creation, the additional services that are provided by the + * platform will be allocated and represented in the status of this resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudServicesNetworkInner> beginCreateOrUpdateAsync( - String resourceGroupName, String cloudServicesNetworkName, - CloudServicesNetworkInner cloudServicesNetworkParameters) { + private PollerFlux, CloudServicesNetworkInner> + beginUpdateAsync(String resourceGroupName, String cloudServicesNetworkName) { final String ifMatch = null; final String ifNoneMatch = null; - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, - cloudServicesNetworkName, cloudServicesNetworkParameters, ifMatch, ifNoneMatch); + final CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters = null; + Mono>> mono = updateWithResponseAsync(resourceGroupName, cloudServicesNetworkName, + ifMatch, ifNoneMatch, cloudServicesNetworkUpdateParameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), CloudServicesNetworkInner.class, CloudServicesNetworkInner.class, this.client.getContext()); } /** - * Create or update the cloud services network. - * - * Create a new cloud services network or update the properties of the existing cloud services network. + * Update properties of the provided cloud services network, or update the tags associated with it. Properties and + * tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. - * @param cloudServicesNetworkParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param cloudServicesNetworkUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 cloudServicesNetwork represents additional egress information that - * will be used by associated virtual machines or hybrid AKS clusters. + * @return the {@link SyncPoller} for polling of upon creation, the additional services that are provided by the + * platform will be allocated and represented in the status of this resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudServicesNetworkInner> beginCreateOrUpdate( - String resourceGroupName, String cloudServicesNetworkName, - CloudServicesNetworkInner cloudServicesNetworkParameters, String ifMatch, String ifNoneMatch) { - Response response = createOrUpdateWithResponse(resourceGroupName, cloudServicesNetworkName, - cloudServicesNetworkParameters, ifMatch, ifNoneMatch); + public SyncPoller, CloudServicesNetworkInner> beginUpdate( + String resourceGroupName, String cloudServicesNetworkName, String ifMatch, String ifNoneMatch, + CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, cloudServicesNetworkName, ifMatch, + ifNoneMatch, cloudServicesNetworkUpdateParameters); return this.client.getLroResult(response, CloudServicesNetworkInner.class, CloudServicesNetworkInner.class, Context.NONE); } /** - * Create or update the cloud services network. - * - * Create a new cloud services network or update the properties of the existing cloud services network. + * Update properties of the provided cloud services network, or update the tags associated with it. Properties and + * tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. - * @param cloudServicesNetworkParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 cloudServicesNetwork represents additional egress information that - * will be used by associated virtual machines or hybrid AKS clusters. + * @return the {@link SyncPoller} for polling of upon creation, the additional services that are provided by the + * platform will be allocated and represented in the status of this resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudServicesNetworkInner> beginCreateOrUpdate( - String resourceGroupName, String cloudServicesNetworkName, - CloudServicesNetworkInner cloudServicesNetworkParameters) { + public SyncPoller, CloudServicesNetworkInner> + beginUpdate(String resourceGroupName, String cloudServicesNetworkName) { final String ifMatch = null; final String ifNoneMatch = null; - Response response = createOrUpdateWithResponse(resourceGroupName, cloudServicesNetworkName, - cloudServicesNetworkParameters, ifMatch, ifNoneMatch); + final CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters = null; + Response response = updateWithResponse(resourceGroupName, cloudServicesNetworkName, ifMatch, + ifNoneMatch, cloudServicesNetworkUpdateParameters); return this.client.getLroResult(response, CloudServicesNetworkInner.class, CloudServicesNetworkInner.class, Context.NONE); } /** - * Create or update the cloud services network. - * - * Create a new cloud services network or update the properties of the existing cloud services network. + * Update properties of the provided cloud services network, or update the tags associated with it. Properties and + * tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. - * @param cloudServicesNetworkParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param cloudServicesNetworkUpdateParameters The request body. * @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 cloudServicesNetwork represents additional egress information that - * will be used by associated virtual machines or hybrid AKS clusters. + * @return the {@link SyncPoller} for polling of upon creation, the additional services that are provided by the + * platform will be allocated and represented in the status of this resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudServicesNetworkInner> beginCreateOrUpdate( - String resourceGroupName, String cloudServicesNetworkName, - CloudServicesNetworkInner cloudServicesNetworkParameters, String ifMatch, String ifNoneMatch, Context context) { - Response response = createOrUpdateWithResponse(resourceGroupName, cloudServicesNetworkName, - cloudServicesNetworkParameters, ifMatch, ifNoneMatch, context); + public SyncPoller, CloudServicesNetworkInner> beginUpdate( + String resourceGroupName, String cloudServicesNetworkName, String ifMatch, String ifNoneMatch, + CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, cloudServicesNetworkName, ifMatch, + ifNoneMatch, cloudServicesNetworkUpdateParameters, context); return this.client.getLroResult(response, CloudServicesNetworkInner.class, CloudServicesNetworkInner.class, context); } /** - * Create or update the cloud services network. - * - * Create a new cloud services network or update the properties of the existing cloud services network. + * Update properties of the provided cloud services network, or update the tags associated with it. Properties and + * tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. - * @param cloudServicesNetworkParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param cloudServicesNetworkUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudServicesNetwork represents additional egress information that will be used by associated virtual - * machines or hybrid AKS clusters on successful completion of {@link Mono}. + * @return upon creation, the additional services that are provided by the platform will be allocated and + * represented in the status of this resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String cloudServicesNetworkName, CloudServicesNetworkInner cloudServicesNetworkParameters, String ifMatch, - String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, cloudServicesNetworkName, cloudServicesNetworkParameters, - ifMatch, ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String cloudServicesNetworkName, + String ifMatch, String ifNoneMatch, CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters) { + return beginUpdateAsync(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, + cloudServicesNetworkUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update the cloud services network. - * - * Create a new cloud services network or update the properties of the existing cloud services network. + * Update properties of the provided cloud services network, or update the tags associated with it. Properties and + * tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. - * @param cloudServicesNetworkParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudServicesNetwork represents additional egress information that will be used by associated virtual - * machines or hybrid AKS clusters on successful completion of {@link Mono}. + * @return upon creation, the additional services that are provided by the platform will be allocated and + * represented in the status of this resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String cloudServicesNetworkName, CloudServicesNetworkInner cloudServicesNetworkParameters) { + private Mono updateAsync(String resourceGroupName, String cloudServicesNetworkName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, cloudServicesNetworkName, cloudServicesNetworkParameters, - ifMatch, ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + final CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters = null; + return beginUpdateAsync(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, + cloudServicesNetworkUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update the cloud services network. - * - * Create a new cloud services network or update the properties of the existing cloud services network. + * Update properties of the provided cloud services network, or update the tags associated with it. Properties and + * tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. - * @param cloudServicesNetworkParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudServicesNetwork represents additional egress information that will be used by associated virtual - * machines or hybrid AKS clusters. + * @return upon creation, the additional services that are provided by the platform will be allocated and + * represented in the status of this resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudServicesNetworkInner createOrUpdate(String resourceGroupName, String cloudServicesNetworkName, - CloudServicesNetworkInner cloudServicesNetworkParameters) { + public CloudServicesNetworkInner update(String resourceGroupName, String cloudServicesNetworkName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateOrUpdate(resourceGroupName, cloudServicesNetworkName, cloudServicesNetworkParameters, ifMatch, - ifNoneMatch).getFinalResult(); + final CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters = null; + return beginUpdate(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, + cloudServicesNetworkUpdateParameters).getFinalResult(); } /** - * Create or update the cloud services network. - * - * Create a new cloud services network or update the properties of the existing cloud services network. + * Update properties of the provided cloud services network, or update the tags associated with it. Properties and + * tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudServicesNetworkName The name of the cloud services network. - * @param cloudServicesNetworkParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param cloudServicesNetworkUpdateParameters The request body. * @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 cloudServicesNetwork represents additional egress information that will be used by associated virtual - * machines or hybrid AKS clusters. + * @return upon creation, the additional services that are provided by the platform will be allocated and + * represented in the status of this resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudServicesNetworkInner createOrUpdate(String resourceGroupName, String cloudServicesNetworkName, - CloudServicesNetworkInner cloudServicesNetworkParameters, String ifMatch, String ifNoneMatch, Context context) { - return beginCreateOrUpdate(resourceGroupName, cloudServicesNetworkName, cloudServicesNetworkParameters, ifMatch, - ifNoneMatch, context).getFinalResult(); + public CloudServicesNetworkInner update(String resourceGroupName, String cloudServicesNetworkName, String ifMatch, + String ifNoneMatch, CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, + cloudServicesNetworkUpdateParameters, context).getFinalResult(); } /** - * Delete the cloud services network. - * * Delete the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1137,39 +921,19 @@ public CloudServicesNetworkInner createOrUpdate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String cloudServicesNetworkName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudServicesNetworkName == null) { - return Mono.error( - new IllegalArgumentException("Parameter cloudServicesNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, - accept, context)) + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the cloud services network. - * * Delete the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1181,39 +945,17 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String cloudServicesNetworkName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudServicesNetworkName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter cloudServicesNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, accept, + this.client.getSubscriptionId(), resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, Context.NONE); } /** - * Delete the cloud services network. - * * Delete the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1226,39 +968,17 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String cloudServicesNetworkName, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudServicesNetworkName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter cloudServicesNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, accept, + this.client.getSubscriptionId(), resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, context); } /** - * Delete the cloud services network. - * * Delete the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1270,21 +990,18 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginDeleteAsync( - String resourceGroupName, String cloudServicesNetworkName, String ifMatch, String ifNoneMatch) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String cloudServicesNetworkName, String ifMatch, String ifNoneMatch) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the cloud services network. - * * Delete the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1292,23 +1009,20 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String cloudServicesNetworkName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String cloudServicesNetworkName) { final String ifMatch = null; final String ifNoneMatch = null; Mono>> mono = deleteWithResponseAsync(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the cloud services network. - * * Delete the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1320,20 +1034,17 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String cloudServicesNetworkName, String ifMatch, String ifNoneMatch) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudServicesNetworkName, + String ifMatch, String ifNoneMatch) { Response response = deleteWithResponse(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the cloud services network. - * * Delete the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1341,22 +1052,18 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String cloudServicesNetworkName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudServicesNetworkName) { final String ifMatch = null; final String ifNoneMatch = null; Response response = deleteWithResponse(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the cloud services network. - * * Delete the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1369,21 +1076,17 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( - String resourceGroupName, String cloudServicesNetworkName, String ifMatch, String ifNoneMatch, - Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudServicesNetworkName, + String ifMatch, String ifNoneMatch, Context context) { Response response = deleteWithResponse(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Delete the cloud services network. - * * Delete the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1395,18 +1098,16 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String cloudServicesNetworkName, - String ifMatch, String ifNoneMatch) { + private Mono deleteAsync(String resourceGroupName, String cloudServicesNetworkName, String ifMatch, + String ifNoneMatch) { return beginDeleteAsync(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the cloud services network. - * * Delete the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1414,10 +1115,10 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String cloudServicesNetworkName) { + private Mono deleteAsync(String resourceGroupName, String cloudServicesNetworkName) { final String ifMatch = null; final String ifNoneMatch = null; return beginDeleteAsync(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch).last() @@ -1425,8 +1126,6 @@ private Mono deleteAsync(String resourceGroupName, S } /** - * Delete the cloud services network. - * * Delete the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1434,18 +1133,15 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String cloudServicesNetworkName) { + public void delete(String resourceGroupName, String cloudServicesNetworkName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginDelete(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch).getFinalResult(); + beginDelete(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch).getFinalResult(); } /** - * Delete the cloud services network. - * * Delete the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1458,469 +1154,335 @@ public OperationStatusResultInner delete(String resourceGroupName, String cloudS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 delete(String resourceGroupName, String cloudServicesNetworkName, String ifMatch, - String ifNoneMatch, Context context) { - return beginDelete(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, context).getFinalResult(); + public void delete(String resourceGroupName, String cloudServicesNetworkName, String ifMatch, String ifNoneMatch, + Context context) { + beginDelete(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, context).getFinalResult(); } /** - * Patch the cloud services network. - * - * Update properties of the provided cloud services network, or update the tags associated with it. Properties and - * tag updates can be done independently. + * Get a list of cloud services networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param cloudServicesNetworkUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudServicesNetwork represents additional egress information that will be used by associated virtual - * machines or hybrid AKS clusters along with {@link Response} on successful completion of {@link Mono}. + * @return a list of cloud services networks in the provided resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String cloudServicesNetworkName, String ifMatch, String ifNoneMatch, - CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudServicesNetworkName == null) { - return Mono.error( - new IllegalArgumentException("Parameter cloudServicesNetworkName is required and cannot be null.")); - } - if (cloudServicesNetworkUpdateParameters != null) { - cloudServicesNetworkUpdateParameters.validate(); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Integer top, String skipToken) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, - cloudServicesNetworkUpdateParameters, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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())); } /** - * Patch the cloud services network. + * Get a list of cloud services networks in the provided resource group. * - * Update properties of the provided cloud services network, or update the tags associated with it. Properties and - * tag updates can be done independently. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 cloud services networks in the provided resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, + String skipToken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of cloud services networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param cloudServicesNetworkUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudServicesNetwork represents additional egress information that will be used by associated virtual - * machines or hybrid AKS clusters along with {@link Response}. + * @return a list of cloud services networks in the provided resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of cloud services networks in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 cloud services networks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String cloudServicesNetworkName, - String ifMatch, String ifNoneMatch, CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudServicesNetworkName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter cloudServicesNetworkName is required and cannot be null.")); - } - if (cloudServicesNetworkUpdateParameters != null) { - cloudServicesNetworkUpdateParameters.validate(); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Integer top, String skipToken) { final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, - cloudServicesNetworkUpdateParameters, accept, Context.NONE); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the cloud services network. - * - * Update properties of the provided cloud services network, or update the tags associated with it. Properties and - * tag updates can be done independently. + * Get a list of cloud services networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param cloudServicesNetworkUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 cloudServicesNetwork represents additional egress information that will be used by associated virtual - * machines or hybrid AKS clusters along with {@link Response}. + * @return a list of cloud services networks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String cloudServicesNetworkName, - String ifMatch, String ifNoneMatch, CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudServicesNetworkName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter cloudServicesNetworkName is required and cannot be null.")); - } - if (cloudServicesNetworkUpdateParameters != null) { - cloudServicesNetworkUpdateParameters.validate(); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Integer top, String skipToken, Context context) { final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, - cloudServicesNetworkUpdateParameters, accept, context); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the cloud services network. - * - * Update properties of the provided cloud services network, or update the tags associated with it. Properties and - * tag updates can be done independently. + * Get a list of cloud services networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param cloudServicesNetworkUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 cloudServicesNetwork represents additional egress information that - * will be used by associated virtual machines or hybrid AKS clusters. + * @return a list of cloud services networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudServicesNetworkInner> beginUpdateAsync( - String resourceGroupName, String cloudServicesNetworkName, String ifMatch, String ifNoneMatch, - CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, cloudServicesNetworkName, - ifMatch, ifNoneMatch, cloudServicesNetworkUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), CloudServicesNetworkInner.class, CloudServicesNetworkInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Patch the cloud services network. - * - * Update properties of the provided cloud services network, or update the tags associated with it. Properties and - * tag updates can be done independently. + * Get a list of cloud services networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cloudServicesNetwork represents additional egress information that - * will be used by associated virtual machines or hybrid AKS clusters. + * @return a list of cloud services networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudServicesNetworkInner> - beginUpdateAsync(String resourceGroupName, String cloudServicesNetworkName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters = null; - Mono>> mono = updateWithResponseAsync(resourceGroupName, cloudServicesNetworkName, - ifMatch, ifNoneMatch, cloudServicesNetworkUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), CloudServicesNetworkInner.class, CloudServicesNetworkInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, + String skipToken, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Patch the cloud services network. - * - * Update properties of the provided cloud services network, or update the tags associated with it. Properties and - * tag updates can be done independently. + * Get a list of cloud services networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param cloudServicesNetworkUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 cloudServicesNetwork represents additional egress information that - * will be used by associated virtual machines or hybrid AKS clusters. + * @return a list of cloud services networks in the provided subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudServicesNetworkInner> beginUpdate( - String resourceGroupName, String cloudServicesNetworkName, String ifMatch, String ifNoneMatch, - CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, cloudServicesNetworkName, ifMatch, - ifNoneMatch, cloudServicesNetworkUpdateParameters); - return this.client.getLroResult(response, - CloudServicesNetworkInner.class, CloudServicesNetworkInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, 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())); } /** - * Patch the cloud services network. - * - * Update properties of the provided cloud services network, or update the tags associated with it. Properties and - * tag updates can be done independently. + * Get a list of cloud services networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 cloudServicesNetwork represents additional egress information that - * will be used by associated virtual machines or hybrid AKS clusters. + * @return a list of cloud services networks in the provided subscription as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudServicesNetworkInner> - beginUpdate(String resourceGroupName, String cloudServicesNetworkName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters = null; - Response response = updateWithResponse(resourceGroupName, cloudServicesNetworkName, ifMatch, - ifNoneMatch, cloudServicesNetworkUpdateParameters); - return this.client.getLroResult(response, - CloudServicesNetworkInner.class, CloudServicesNetworkInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Integer top, String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Patch the cloud services network. - * - * Update properties of the provided cloud services network, or update the tags associated with it. Properties and - * tag updates can be done independently. + * Get a list of cloud services networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param cloudServicesNetworkUpdateParameters The request body. - * @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 cloudServicesNetwork represents additional egress information that - * will be used by associated virtual machines or hybrid AKS clusters. + * @return a list of cloud services networks in the provided subscription as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudServicesNetworkInner> beginUpdate( - String resourceGroupName, String cloudServicesNetworkName, String ifMatch, String ifNoneMatch, - CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters, Context context) { - Response response = updateWithResponse(resourceGroupName, cloudServicesNetworkName, ifMatch, - ifNoneMatch, cloudServicesNetworkUpdateParameters, context); - return this.client.getLroResult(response, - CloudServicesNetworkInner.class, CloudServicesNetworkInner.class, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Patch the cloud services network. - * - * Update properties of the provided cloud services network, or update the tags associated with it. Properties and - * tag updates can be done independently. + * Get a list of cloud services networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param cloudServicesNetworkUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudServicesNetwork represents additional egress information that will be used by associated virtual - * machines or hybrid AKS clusters on successful completion of {@link Mono}. + * @return a list of cloud services networks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String cloudServicesNetworkName, - String ifMatch, String ifNoneMatch, CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters) { - return beginUpdateAsync(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, - cloudServicesNetworkUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(Integer top, String skipToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the cloud services network. - * - * Update properties of the provided cloud services network, or update the tags associated with it. Properties and - * tag updates can be done independently. + * Get a list of cloud services networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 cloudServicesNetwork represents additional egress information that will be used by associated virtual - * machines or hybrid AKS clusters on successful completion of {@link Mono}. + * @return a list of cloud services networks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String cloudServicesNetworkName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters = null; - return beginUpdateAsync(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, - cloudServicesNetworkUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the cloud services network. - * - * Update properties of the provided cloud services network, or update the tags associated with it. Properties and - * tag updates can be done independently. + * Get a list of cloud services networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services 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 cloudServicesNetwork represents additional egress information that will be used by associated virtual - * machines or hybrid AKS clusters. + * @return a list of cloud services networks in the provided subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CloudServicesNetworkInner update(String resourceGroupName, String cloudServicesNetworkName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters = null; - return beginUpdate(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, - cloudServicesNetworkUpdateParameters).getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listSinglePage(top, skipToken), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * Patch the cloud services network. - * - * Update properties of the provided cloud services network, or update the tags associated with it. Properties and - * tag updates can be done independently. + * Get a list of cloud services networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param cloudServicesNetworkUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 cloudServicesNetwork represents additional egress information that will be used by associated virtual - * machines or hybrid AKS clusters. + * @return a list of cloud services networks in the provided subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CloudServicesNetworkInner update(String resourceGroupName, String cloudServicesNetworkName, String ifMatch, - String ifNoneMatch, CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, - cloudServicesNetworkUpdateParameters, context).getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Integer top, String skipToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * List cloud services networks in the subscription. - * * 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 cloud services networks in the provided subscription along with {@link PagedResponse} on + * @return a list of cloud services networks in the provided resource group along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); } /** - * List cloud services networks in the subscription. - * * 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 cloud services networks in the provided subscription along with {@link PagedResponse}. + * @return a list of cloud services networks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = 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); } /** - * List cloud services networks in the subscription. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1928,89 +1490,58 @@ private PagedResponse listBySubscriptionNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cloud services networks in the provided subscription along with {@link PagedResponse}. + * @return a list of cloud services networks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List cloud services networks in the resource group. - * * 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 cloud services networks in the provided resource group along with {@link PagedResponse} on + * @return a list of cloud services networks in the provided subscription along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(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())); } /** - * List cloud services networks in the resource group. - * * 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 cloud services networks in the provided resource group along with {@link PagedResponse}. + * @return a list of cloud services networks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List cloud services networks in the resource group. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2018,26 +1549,15 @@ private PagedResponse listByResourceGroupNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cloud services networks in the provided resource group along with {@link PagedResponse}. + * @return a list of cloud services networks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(CloudServicesNetworksClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/CloudServicesNetworksImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/CloudServicesNetworksImpl.java index c35614b99388..7d5fc94bcbac 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/CloudServicesNetworksImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/CloudServicesNetworksImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -11,10 +11,8 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.CloudServicesNetworksClient; import com.azure.resourcemanager.networkcloud.fluent.models.CloudServicesNetworkInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.CloudServicesNetwork; import com.azure.resourcemanager.networkcloud.models.CloudServicesNetworks; -import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; public final class CloudServicesNetworksImpl implements CloudServicesNetworks { private static final ClientLogger LOGGER = new ClientLogger(CloudServicesNetworksImpl.class); @@ -29,38 +27,12 @@ public CloudServicesNetworksImpl(CloudServicesNetworksClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudServicesNetworkImpl(inner1, this.manager())); - } - - public PagedIterable list(Integer top, String skipToken, Context context) { - PagedIterable inner = this.serviceClient().list(top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudServicesNetworkImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudServicesNetworkImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, - String skipToken, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudServicesNetworkImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String cloudServicesNetworkName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, cloudServicesNetworkName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CloudServicesNetworkImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CloudServicesNetworkImpl(inner.getValue(), this.manager())); } public CloudServicesNetwork getByResourceGroup(String resourceGroupName, String cloudServicesNetworkName) { @@ -73,24 +45,35 @@ public CloudServicesNetwork getByResourceGroup(String resourceGroupName, String } } - public OperationStatusResult deleteByResourceGroup(String resourceGroupName, String cloudServicesNetworkName) { - OperationStatusResultInner inner = this.serviceClient().delete(resourceGroupName, cloudServicesNetworkName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public void deleteByResourceGroup(String resourceGroupName, String cloudServicesNetworkName) { + this.serviceClient().delete(resourceGroupName, cloudServicesNetworkName); } - public OperationStatusResult delete(String resourceGroupName, String cloudServicesNetworkName, String ifMatch, - String ifNoneMatch, Context context) { - OperationStatusResultInner inner - = this.serviceClient().delete(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String cloudServicesNetworkName, String ifMatch, String ifNoneMatch, + Context context) { + this.serviceClient().delete(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudServicesNetworkImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, + String skipToken, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudServicesNetworkImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudServicesNetworkImpl(inner1, this.manager())); + } + + public PagedIterable list(Integer top, String skipToken, Context context) { + PagedIterable inner = this.serviceClient().list(top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudServicesNetworkImpl(inner1, this.manager())); } public CloudServicesNetwork getById(String id) { @@ -122,7 +105,7 @@ public Response getByIdWithResponse(String id, Context con return this.getByResourceGroupWithResponse(resourceGroupName, cloudServicesNetworkName, context); } - public OperationStatusResult deleteById(String id) { + public void deleteById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -135,11 +118,10 @@ public OperationStatusResult deleteById(String id) { } String localIfMatch = null; String localIfNoneMatch = null; - return this.delete(resourceGroupName, cloudServicesNetworkName, localIfMatch, localIfNoneMatch, Context.NONE); + this.delete(resourceGroupName, cloudServicesNetworkName, localIfMatch, localIfNoneMatch, Context.NONE); } - public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, - Context context) { + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -150,7 +132,7 @@ public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'cloudServicesNetworks'.", id))); } - return this.delete(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, context); + this.delete(resourceGroupName, cloudServicesNetworkName, ifMatch, ifNoneMatch, context); } private CloudServicesNetworksClient serviceClient() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterImpl.java index 5844bf647a01..3f97f94d4ff5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -17,15 +17,18 @@ import com.azure.resourcemanager.networkcloud.models.ClusterContinueUpdateVersionParameters; import com.azure.resourcemanager.networkcloud.models.ClusterDeployParameters; import com.azure.resourcemanager.networkcloud.models.ClusterDetailedStatus; +import com.azure.resourcemanager.networkcloud.models.ClusterInspectParameters; import com.azure.resourcemanager.networkcloud.models.ClusterManagerConnectionStatus; import com.azure.resourcemanager.networkcloud.models.ClusterPatchParameters; import com.azure.resourcemanager.networkcloud.models.ClusterProvisioningState; +import com.azure.resourcemanager.networkcloud.models.ClusterRotateCredentialParameters; import com.azure.resourcemanager.networkcloud.models.ClusterScanRuntimeParameters; import com.azure.resourcemanager.networkcloud.models.ClusterSecretArchive; import com.azure.resourcemanager.networkcloud.models.ClusterType; import com.azure.resourcemanager.networkcloud.models.ClusterUpdateStrategy; import com.azure.resourcemanager.networkcloud.models.ClusterUpdateVersionParameters; import com.azure.resourcemanager.networkcloud.models.CommandOutputSettings; +import com.azure.resourcemanager.networkcloud.models.DeploymentType; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; import com.azure.resourcemanager.networkcloud.models.ManagedResourceGroupConfiguration; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentity; @@ -37,6 +40,7 @@ import com.azure.resourcemanager.networkcloud.models.ValidationThreshold; import com.azure.resourcemanager.networkcloud.models.VulnerabilityScanningSettings; import com.azure.resourcemanager.networkcloud.models.VulnerabilityScanningSettingsPatch; +import java.time.OffsetDateTime; import java.util.Collections; import java.util.List; import java.util.Map; @@ -83,17 +87,12 @@ public ManagedServiceIdentity identity() { return this.innerModel().identity(); } - public SystemData systemData() { - return this.innerModel().systemData(); + public DeploymentType kind() { + return this.innerModel().kind(); } - public List actionStates() { - List inner = this.innerModel().actionStates(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public SystemData systemData() { + return this.innerModel().systemData(); } public RackDefinition aggregatorOrSingleRackDefinition() { @@ -108,39 +107,10 @@ public String analyticsWorkspaceId() { return this.innerModel().analyticsWorkspaceId(); } - public List availableUpgradeVersions() { - List inner = this.innerModel().availableUpgradeVersions(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ClusterCapacity clusterCapacity() { - return this.innerModel().clusterCapacity(); - } - - public ClusterConnectionStatus clusterConnectionStatus() { - return this.innerModel().clusterConnectionStatus(); - } - - public ExtendedLocation clusterExtendedLocation() { - return this.innerModel().clusterExtendedLocation(); - } - public String clusterLocation() { return this.innerModel().clusterLocation(); } - public ClusterManagerConnectionStatus clusterManagerConnectionStatus() { - return this.innerModel().clusterManagerConnectionStatus(); - } - - public String clusterManagerId() { - return this.innerModel().clusterManagerId(); - } - public ServicePrincipalInformation clusterServicePrincipal() { return this.innerModel().clusterServicePrincipal(); } @@ -170,34 +140,14 @@ public List computeRackDefinitions() { } } - public ClusterDetailedStatus detailedStatus() { - return this.innerModel().detailedStatus(); - } - - public String detailedStatusMessage() { - return this.innerModel().detailedStatusMessage(); - } - - public ExtendedLocation hybridAksExtendedLocation() { - return this.innerModel().hybridAksExtendedLocation(); - } - public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { return this.innerModel().managedResourceGroupConfiguration(); } - public Long manualActionCount() { - return this.innerModel().manualActionCount(); - } - public String networkFabricId() { return this.innerModel().networkFabricId(); } - public ClusterProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - public RuntimeProtectionConfiguration runtimeProtectionConfiguration() { return this.innerModel().runtimeProtectionConfiguration(); } @@ -210,10 +160,6 @@ public SecretArchiveSettings secretArchiveSettings() { return this.innerModel().secretArchiveSettings(); } - public String supportExpiryDate() { - return this.innerModel().supportExpiryDate(); - } - public ClusterUpdateStrategy updateStrategy() { return this.innerModel().updateStrategy(); } @@ -222,6 +168,77 @@ public VulnerabilityScanningSettings vulnerabilityScanningSettings() { return this.innerModel().vulnerabilityScanningSettings(); } + public List actionStates() { + List inner = this.innerModel().actionStates(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List availableUpgradeVersions() { + List inner = this.innerModel().availableUpgradeVersions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ClusterCapacity clusterCapacity() { + return this.innerModel().clusterCapacity(); + } + + public ClusterConnectionStatus clusterConnectionStatus() { + return this.innerModel().clusterConnectionStatus(); + } + + public ExtendedLocation clusterExtendedLocation() { + return this.innerModel().clusterExtendedLocation(); + } + + public ClusterManagerConnectionStatus clusterManagerConnectionStatus() { + return this.innerModel().clusterManagerConnectionStatus(); + } + + public String clusterManagerId() { + return this.innerModel().clusterManagerId(); + } + + public ClusterDetailedStatus detailedStatus() { + return this.innerModel().detailedStatus(); + } + + public String detailedStatusMessage() { + return this.innerModel().detailedStatusMessage(); + } + + public ExtendedLocation hybridAksExtendedLocation() { + return this.innerModel().hybridAksExtendedLocation(); + } + + public OffsetDateTime lastSuccessfulVersionUpdateTime() { + return this.innerModel().lastSuccessfulVersionUpdateTime(); + } + + public List managedCredentials() { + List inner = this.innerModel().managedCredentials(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Long manualActionCount() { + return this.innerModel().manualActionCount(); + } + + public String supportExpiryDate() { + return this.innerModel().supportExpiryDate(); + } + public List workloadResourceIds() { List inner = this.innerModel().workloadResourceIds(); if (inner != null) { @@ -231,6 +248,10 @@ public List workloadResourceIds() { } } + public ClusterProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -360,6 +381,22 @@ public OperationStatusResult deploy(ClusterDeployParameters clusterDeployParamet return serviceManager.clusters().deploy(resourceGroupName, clusterName, clusterDeployParameters, context); } + public OperationStatusResult inspect() { + return serviceManager.clusters().inspect(resourceGroupName, clusterName); + } + + public OperationStatusResult inspect(ClusterInspectParameters clusterInspectParameters, Context context) { + return serviceManager.clusters().inspect(resourceGroupName, clusterName, clusterInspectParameters, context); + } + + public OperationStatusResult rotateCredential(ClusterRotateCredentialParameters body) { + return serviceManager.clusters().rotateCredential(resourceGroupName, clusterName, body); + } + + public OperationStatusResult rotateCredential(ClusterRotateCredentialParameters body, Context context) { + return serviceManager.clusters().rotateCredential(resourceGroupName, clusterName, body, context); + } + public OperationStatusResult scanRuntime() { return serviceManager.clusters().scanRuntime(resourceGroupName, clusterName); } @@ -440,6 +477,11 @@ public ClusterImpl withIdentity(ManagedServiceIdentity identity) { } } + public ClusterImpl withKind(DeploymentType kind) { + this.innerModel().withKind(kind); + return this; + } + public ClusterImpl withAnalyticsOutputSettings(AnalyticsOutputSettings analyticsOutputSettings) { if (isInCreateMode()) { this.innerModel().withAnalyticsOutputSettings(analyticsOutputSettings); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterManagerImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterManagerImpl.java index 2a73d116c6ff..7711a60e265c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterManagerImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterManagerImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -13,9 +13,13 @@ import com.azure.resourcemanager.networkcloud.models.ClusterManagerDetailedStatus; import com.azure.resourcemanager.networkcloud.models.ClusterManagerPatchParameters; import com.azure.resourcemanager.networkcloud.models.ClusterManagerProvisioningState; +import com.azure.resourcemanager.networkcloud.models.ClusterManagerRelayConfiguration; +import com.azure.resourcemanager.networkcloud.models.ClusterManagerUpdateRelayPrivateEndpointConnectionParameters; +import com.azure.resourcemanager.networkcloud.models.DeploymentType; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; import com.azure.resourcemanager.networkcloud.models.ManagedResourceGroupConfiguration; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentity; +import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; import java.util.Collections; import java.util.List; import java.util.Map; @@ -58,6 +62,10 @@ public ManagedServiceIdentity identity() { return this.innerModel().identity(); } + public DeploymentType kind() { + return this.innerModel().kind(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -108,6 +116,10 @@ public ClusterManagerProvisioningState provisioningState() { return this.innerModel().provisioningState(); } + public ClusterManagerRelayConfiguration relayConfiguration() { + return this.innerModel().relayConfiguration(); + } + public String vmSize() { return this.innerModel().vmSize(); } @@ -224,6 +236,19 @@ public ClusterManager refresh(Context context) { return this; } + public OperationStatusResult updateRelayPrivateEndpointConnection() { + return serviceManager.clusterManagers() + .updateRelayPrivateEndpointConnection(resourceGroupName, clusterManagerName); + } + + public OperationStatusResult updateRelayPrivateEndpointConnection( + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters, + Context context) { + return serviceManager.clusterManagers() + .updateRelayPrivateEndpointConnection(resourceGroupName, clusterManagerName, + clusterManagerUpdateRelayPrivateEndpointConnectionParameters, context); + } + public ClusterManagerImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -259,6 +284,11 @@ public ClusterManagerImpl withIdentity(ManagedServiceIdentity identity) { } } + public ClusterManagerImpl withKind(DeploymentType kind) { + this.innerModel().withKind(kind); + return this; + } + public ClusterManagerImpl withAnalyticsWorkspaceId(String analyticsWorkspaceId) { this.innerModel().withAnalyticsWorkspaceId(analyticsWorkspaceId); return this; diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterManagersClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterManagersClientImpl.java index d4f5f12a2c82..892b2a7c3f16 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterManagersClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterManagersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -14,6 +14,7 @@ import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -31,14 +32,14 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.ClusterManagersClient; import com.azure.resourcemanager.networkcloud.fluent.models.ClusterManagerInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; -import com.azure.resourcemanager.networkcloud.models.ClusterManagerList; +import com.azure.resourcemanager.networkcloud.implementation.models.ClusterManagerList; import com.azure.resourcemanager.networkcloud.models.ClusterManagerPatchParameters; +import com.azure.resourcemanager.networkcloud.models.ClusterManagerUpdateRelayPrivateEndpointConnectionParameters; +import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -55,727 +56,670 @@ public final class ClusterManagersClientImpl implements ClusterManagersClient { /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of ClusterManagersClientImpl. * * @param client the instance of the service client containing this operation class. */ - ClusterManagersClientImpl(NetworkCloudImpl client) { + ClusterManagersClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(ClusterManagersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudClusterManagers to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for NetworkCloudManagementClientClusterManagers to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudClusterManagers") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientClusterManagers") public interface ClusterManagersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/clusterManagers") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterManagerName") String clusterManagerName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/clusterManagers") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterManagerName") String clusterManagerName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterManagerName") String clusterManagerName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ClusterManagerInner clusterManagerParameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterManagerName") String clusterManagerName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ClusterManagerInner clusterManagerParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterManagerName") String clusterManagerName, @HeaderParam("Accept") String accept, + @PathParam("clusterManagerName") String clusterManagerName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ClusterManagerPatchParameters clusterManagerUpdateParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterManagerName") String clusterManagerName, @HeaderParam("Accept") String accept, + @PathParam("clusterManagerName") String clusterManagerName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ClusterManagerPatchParameters clusterManagerUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterManagerName") String clusterManagerName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") ClusterManagerInner clusterManagerParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterManagerName") String clusterManagerName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") ClusterManagerInner clusterManagerParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}") - @ExpectedResponses({ 200, 202, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterManagerName") String clusterManagerName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}") - @ExpectedResponses({ 200, 202, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterManagerName") String clusterManagerName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/clusterManagers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterManagerName") String clusterManagerName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") ClusterManagerPatchParameters clusterManagerUpdateParameters, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/clusterManagers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterManagerName") String clusterManagerName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") ClusterManagerPatchParameters clusterManagerUpdateParameters, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}/updateRelayPrivateEndpointConnection") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateRelayPrivateEndpointConnection(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterManagerName") String clusterManagerName, + @BodyParam("application/json") ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}/updateRelayPrivateEndpointConnection") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateRelayPrivateEndpointConnectionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterManagerName") String clusterManagerName, + @BodyParam("application/json") ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters, + Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + 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 listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + 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> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listBySubscriptionNext( + @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("$host") String endpoint, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List cluster managers in the subscription. - * - * Get a list of cluster managers in the provided subscription. + * Get the properties of the provided cluster manager. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cluster managers in the provided subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the properties of the provided cluster manager along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String clusterManagerName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List cluster managers in the subscription. - * - * Get a list of cluster managers in the provided subscription. + * Get the properties of the provided cluster manager. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cluster managers in the provided subscription as paginated response with {@link PagedFlux}. + * @return the properties of the provided cluster manager on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer top, String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String clusterManagerName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, clusterManagerName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List cluster managers in the subscription. - * - * Get a list of cluster managers in the provided subscription. + * Get the properties of the provided cluster manager. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. + * @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 cluster managers in the provided subscription as paginated response with {@link PagedFlux}. + * @return the properties of the provided cluster manager along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String clusterManagerName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, accept, context); } /** - * List cluster managers in the subscription. - * - * Get a list of cluster managers in the provided subscription. + * Get the properties of the provided cluster manager. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cluster managers in the provided subscription along with {@link PagedResponse}. + * @return the properties of the provided cluster manager. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + public ClusterManagerInner getByResourceGroup(String resourceGroupName, String clusterManagerName) { + return getByResourceGroupWithResponse(resourceGroupName, clusterManagerName, Context.NONE).getValue(); } /** - * List cluster managers in the subscription. - * - * Get a list of cluster managers in the provided subscription. + * Create a new cluster manager or update properties of the cluster manager if it exists. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. + * @param clusterManagerParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cluster managers in the provided subscription along with {@link PagedResponse}. + * @return clusterManager represents a control-plane to manage one or more on-premises clusters along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String clusterManagerName, ClusterManagerInner clusterManagerParameters, String ifMatch, String ifNoneMatch) { + final String contentType = "application/json"; final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, + contentType, accept, clusterManagerParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List cluster managers in the subscription. - * - * Get a list of cluster managers in the provided subscription. + * Create a new cluster manager or update properties of the cluster manager if it exists. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. + * @param clusterManagerParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cluster managers in the provided subscription as paginated response with {@link PagedIterable}. + * @return clusterManager represents a control-plane to manage one or more on-premises clusters along with + * {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listSinglePage(top, skipToken), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String clusterManagerName, + ClusterManagerInner clusterManagerParameters, String ifMatch, String ifNoneMatch) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, contentType, + accept, clusterManagerParameters, Context.NONE); } /** - * List cluster managers in the subscription. - * - * Get a list of cluster managers in the provided subscription. + * Create a new cluster manager or update properties of the cluster manager if it exists. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. + * @param clusterManagerParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 cluster managers in the provided subscription as paginated response with {@link PagedIterable}. + * @return clusterManager represents a control-plane to manage one or more on-premises clusters along with + * {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Integer top, String skipToken, Context context) { - return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String clusterManagerName, + ClusterManagerInner clusterManagerParameters, String ifMatch, String ifNoneMatch, 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, clusterManagerName, ifMatch, ifNoneMatch, contentType, + accept, clusterManagerParameters, context); } /** - * List cluster managers in the resource group. - * - * Get a list of cluster managers in the provided resource group. + * Create a new cluster manager or update properties of the cluster manager if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param clusterManagerName The name of the cluster manager. + * @param clusterManagerParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cluster managers in the provided resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of clusterManager represents a control-plane to manage one or more + * on-premises clusters. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClusterManagerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String clusterManagerName, ClusterManagerInner clusterManagerParameters, + String ifMatch, String ifNoneMatch) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, clusterManagerName, + clusterManagerParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterManagerInner.class, ClusterManagerInner.class, this.client.getContext()); } /** - * List cluster managers in the resource group. - * - * Get a list of cluster managers in the provided resource group. + * Create a new cluster manager or update properties of the cluster manager if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param clusterManagerName The name of the cluster manager. + * @param clusterManagerParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cluster managers in the provided resource group as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of clusterManager represents a control-plane to manage one or more + * on-premises clusters. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, - String skipToken) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClusterManagerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String clusterManagerName, ClusterManagerInner clusterManagerParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, clusterManagerName, + clusterManagerParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterManagerInner.class, ClusterManagerInner.class, this.client.getContext()); } /** - * List cluster managers in the resource group. - * - * Get a list of cluster managers in the provided resource group. + * Create a new cluster manager or update properties of the cluster manager if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. + * @param clusterManagerParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cluster managers in the provided resource group as paginated response with {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of clusterManager represents a control-plane to manage one or more + * on-premises clusters. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterManagerInner> beginCreateOrUpdate( + String resourceGroupName, String clusterManagerName, ClusterManagerInner clusterManagerParameters, + String ifMatch, String ifNoneMatch) { + Response response = createOrUpdateWithResponse(resourceGroupName, clusterManagerName, + clusterManagerParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, ClusterManagerInner.class, + ClusterManagerInner.class, Context.NONE); } /** - * List cluster managers in the resource group. - * - * Get a list of cluster managers in the provided resource group. + * Create a new cluster manager or update properties of the cluster manager if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param clusterManagerName The name of the cluster manager. + * @param clusterManagerParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cluster managers in the provided resource group along with {@link PagedResponse}. + * @return the {@link SyncPoller} for polling of clusterManager represents a control-plane to manage one or more + * on-premises clusters. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterManagerInner> beginCreateOrUpdate( + String resourceGroupName, String clusterManagerName, ClusterManagerInner clusterManagerParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Response response = createOrUpdateWithResponse(resourceGroupName, clusterManagerName, + clusterManagerParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, ClusterManagerInner.class, + ClusterManagerInner.class, Context.NONE); } /** - * List cluster managers in the resource group. - * - * Get a list of cluster managers in the provided resource group. + * Create a new cluster manager or update properties of the cluster manager if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param clusterManagerName The name of the cluster manager. + * @param clusterManagerParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 cluster managers in the provided resource group along with {@link PagedResponse}. + * @return the {@link SyncPoller} for polling of clusterManager represents a control-plane to manage one or more + * on-premises clusters. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterManagerInner> beginCreateOrUpdate( + String resourceGroupName, String clusterManagerName, ClusterManagerInner clusterManagerParameters, + String ifMatch, String ifNoneMatch, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, clusterManagerName, + clusterManagerParameters, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, ClusterManagerInner.class, + ClusterManagerInner.class, context); } /** - * List cluster managers in the resource group. - * - * Get a list of cluster managers in the provided resource group. + * Create a new cluster manager or update properties of the cluster manager if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. + * @param clusterManagerParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cluster managers in the provided resource group as paginated response with - * {@link PagedIterable}. + * @return clusterManager represents a control-plane to manage one or more on-premises clusters on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String clusterManagerName, + ClusterManagerInner clusterManagerParameters, String ifMatch, String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterManagerName, clusterManagerParameters, ifMatch, + ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); } /** - * List cluster managers in the resource group. - * - * Get a list of cluster managers in the provided resource group. + * Create a new cluster manager or update properties of the cluster manager if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param clusterManagerName The name of the cluster manager. + * @param clusterManagerParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cluster managers in the provided resource group as paginated response with - * {@link PagedIterable}. + * @return clusterManager represents a control-plane to manage one or more on-premises clusters on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, - String skipToken, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String clusterManagerName, + ClusterManagerInner clusterManagerParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdateAsync(resourceGroupName, clusterManagerName, clusterManagerParameters, ifMatch, + ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieve the cluster manager. - * - * Get the properties of the provided cluster manager. + * Create a new cluster manager or update properties of the cluster manager if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. + * @param clusterManagerParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the provided cluster manager along with {@link Response} on successful completion of - * {@link Mono}. + * @return clusterManager represents a control-plane to manage one or more on-premises clusters. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String clusterManagerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterManagerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterManagerName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public ClusterManagerInner createOrUpdate(String resourceGroupName, String clusterManagerName, + ClusterManagerInner clusterManagerParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdate(resourceGroupName, clusterManagerName, clusterManagerParameters, ifMatch, + ifNoneMatch).getFinalResult(); } /** - * Retrieve the cluster manager. - * - * Get the properties of the provided cluster manager. + * Create a new cluster manager or update properties of the cluster manager if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. + * @param clusterManagerParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 properties of the provided cluster manager on successful completion of {@link Mono}. + * @return clusterManager represents a control-plane to manage one or more on-premises clusters. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String clusterManagerName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, clusterManagerName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public ClusterManagerInner createOrUpdate(String resourceGroupName, String clusterManagerName, + ClusterManagerInner clusterManagerParameters, String ifMatch, String ifNoneMatch, Context context) { + return beginCreateOrUpdate(resourceGroupName, clusterManagerName, clusterManagerParameters, ifMatch, + ifNoneMatch, context).getFinalResult(); } /** - * Retrieve the cluster manager. - * - * Get the properties of the provided cluster manager. + * Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties + * and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param context The context to associate with this operation. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param clusterManagerUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the provided cluster manager along with {@link Response}. + * @return clusterManager represents a control-plane to manage one or more on-premises clusters along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String clusterManagerName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterManagerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterManagerName is required and cannot be null.")); - } + private Mono> updateWithResponseAsync(String resourceGroupName, + String clusterManagerName, String ifMatch, String ifNoneMatch, + ClusterManagerPatchParameters clusterManagerUpdateParameters) { final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, accept, context); + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, accept, + clusterManagerUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Retrieve the cluster manager. - * - * Get the properties of the provided cluster manager. + * Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties + * and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the provided cluster manager. + * @return clusterManager represents a control-plane to manage one or more on-premises clusters on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterManagerInner getByResourceGroup(String resourceGroupName, String clusterManagerName) { - return getByResourceGroupWithResponse(resourceGroupName, clusterManagerName, Context.NONE).getValue(); + private Mono updateAsync(String resourceGroupName, String clusterManagerName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final ClusterManagerPatchParameters clusterManagerUpdateParameters = null; + return updateWithResponseAsync(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, + clusterManagerUpdateParameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create or update the cluster manager. - * - * Create a new cluster manager or update properties of the cluster manager if it exists. + * Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties + * and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param clusterManagerParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param clusterManagerUpdateParameters The request body. + * @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 clusterManager represents a control-plane to manage one or more on-premises clusters along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String clusterManagerName, ClusterManagerInner clusterManagerParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterManagerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterManagerName is required and cannot be null.")); - } - if (clusterManagerParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter clusterManagerParameters is required and cannot be null.")); - } else { - clusterManagerParameters.validate(); - } + public Response updateWithResponse(String resourceGroupName, String clusterManagerName, + String ifMatch, String ifNoneMatch, ClusterManagerPatchParameters clusterManagerUpdateParameters, + Context context) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, - clusterManagerParameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, accept, + clusterManagerUpdateParameters, context); } /** - * Create or update the cluster manager. + * Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties + * and tag updates can be done independently. * - * Create a new cluster manager or update properties of the cluster manager if it exists. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return clusterManager represents a control-plane to manage one or more on-premises clusters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterManagerInner update(String resourceGroupName, String clusterManagerName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final ClusterManagerPatchParameters clusterManagerUpdateParameters = null; + return updateWithResponse(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, + clusterManagerUpdateParameters, Context.NONE).getValue(); + } + + /** + * Delete the provided cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param clusterManagerParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing @@ -783,51 +727,43 @@ private Mono>> createOrUpdateWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clusterManager represents a control-plane to manage one or more on-premises clusters along with - * {@link Response}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String clusterManagerName, - ClusterManagerInner clusterManagerParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterManagerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterManagerName is required and cannot be null.")); - } - if (clusterManagerParameters == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter clusterManagerParameters is required and cannot be null.")); - } else { - clusterManagerParameters.validate(); - } - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, - clusterManagerParameters, accept, Context.NONE); + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String clusterManagerName, String ifMatch, String ifNoneMatch) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update the cluster manager. + * Delete the provided cluster manager. * - * Create a new cluster manager or update properties of the cluster manager if it exists. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 clusterManagerName, String ifMatch, + String ifNoneMatch) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, Context.NONE); + } + + /** + * Delete the provided cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param clusterManagerParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing @@ -836,51 +772,20 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clusterManager represents a control-plane to manage one or more on-premises clusters along with - * {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String clusterManagerName, - ClusterManagerInner clusterManagerParameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterManagerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterManagerName is required and cannot be null.")); - } - if (clusterManagerParameters == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter clusterManagerParameters is required and cannot be null.")); - } else { - clusterManagerParameters.validate(); - } - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, - clusterManagerParameters, accept, context); + private Response deleteWithResponse(String resourceGroupName, String clusterManagerName, String ifMatch, + String ifNoneMatch, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, context); } /** - * Create or update the cluster manager. - * - * Create a new cluster manager or update properties of the cluster manager if it exists. + * Delete the provided cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param clusterManagerParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing @@ -888,52 +793,42 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of clusterManager represents a control-plane to manage one or more - * on-premises clusters. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterManagerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String clusterManagerName, ClusterManagerInner clusterManagerParameters, + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterManagerName, String ifMatch, String ifNoneMatch) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, clusterManagerName, - clusterManagerParameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterManagerInner.class, ClusterManagerInner.class, this.client.getContext()); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Create or update the cluster manager. - * - * Create a new cluster manager or update properties of the cluster manager if it exists. + * Delete the provided cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param clusterManagerParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 clusterManager represents a control-plane to manage one or more - * on-premises clusters. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterManagerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String clusterManagerName, ClusterManagerInner clusterManagerParameters) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterManagerName) { final String ifMatch = null; final String ifNoneMatch = null; - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, clusterManagerName, - clusterManagerParameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterManagerInner.class, ClusterManagerInner.class, this.client.getContext()); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Create or update the cluster manager. - * - * Create a new cluster manager or update properties of the cluster manager if it exists. + * Delete the provided cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param clusterManagerParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing @@ -941,52 +836,38 @@ private PollerFlux, ClusterManagerInner> beginCr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 clusterManager represents a control-plane to manage one or more - * on-premises clusters. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterManagerInner> beginCreateOrUpdate( - String resourceGroupName, String clusterManagerName, ClusterManagerInner clusterManagerParameters, + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterManagerName, String ifMatch, String ifNoneMatch) { - Response response = createOrUpdateWithResponse(resourceGroupName, clusterManagerName, - clusterManagerParameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, ClusterManagerInner.class, - ClusterManagerInner.class, Context.NONE); + Response response = deleteWithResponse(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Create or update the cluster manager. - * - * Create a new cluster manager or update properties of the cluster manager if it exists. + * Delete the provided cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param clusterManagerParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 clusterManager represents a control-plane to manage one or more - * on-premises clusters. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterManagerInner> beginCreateOrUpdate( - String resourceGroupName, String clusterManagerName, ClusterManagerInner clusterManagerParameters) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterManagerName) { final String ifMatch = null; final String ifNoneMatch = null; - Response response = createOrUpdateWithResponse(resourceGroupName, clusterManagerName, - clusterManagerParameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, ClusterManagerInner.class, - ClusterManagerInner.class, Context.NONE); + Response response = deleteWithResponse(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Create or update the cluster manager. - * - * Create a new cluster manager or update properties of the cluster manager if it exists. + * Delete the provided cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param clusterManagerParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing @@ -995,27 +876,21 @@ public SyncPoller, ClusterManagerInner> beginCre * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 clusterManager represents a control-plane to manage one or more - * on-premises clusters. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterManagerInner> beginCreateOrUpdate( - String resourceGroupName, String clusterManagerName, ClusterManagerInner clusterManagerParameters, + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterManagerName, String ifMatch, String ifNoneMatch, Context context) { - Response response = createOrUpdateWithResponse(resourceGroupName, clusterManagerName, - clusterManagerParameters, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, ClusterManagerInner.class, - ClusterManagerInner.class, context); + Response response + = deleteWithResponse(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Create or update the cluster manager. - * - * Create a new cluster manager or update properties of the cluster manager if it exists. + * Delete the provided cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param clusterManagerParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing @@ -1023,69 +898,54 @@ public SyncPoller, ClusterManagerInner> beginCre * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clusterManager represents a control-plane to manage one or more on-premises clusters on successful - * completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String clusterManagerName, - ClusterManagerInner clusterManagerParameters, String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterManagerName, clusterManagerParameters, ifMatch, - ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + private Mono deleteAsync(String resourceGroupName, String clusterManagerName, String ifMatch, + String ifNoneMatch) { + return beginDeleteAsync(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update the cluster manager. - * - * Create a new cluster manager or update properties of the cluster manager if it exists. + * Delete the provided cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param clusterManagerParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clusterManager represents a control-plane to manage one or more on-premises clusters on successful - * completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String clusterManagerName, - ClusterManagerInner clusterManagerParameters) { + private Mono deleteAsync(String resourceGroupName, String clusterManagerName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, clusterManagerName, clusterManagerParameters, ifMatch, - ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + return beginDeleteAsync(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update the cluster manager. - * - * Create a new cluster manager or update properties of the cluster manager if it exists. + * Delete the provided cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param clusterManagerParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clusterManager represents a control-plane to manage one or more on-premises clusters. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterManagerInner createOrUpdate(String resourceGroupName, String clusterManagerName, - ClusterManagerInner clusterManagerParameters) { + public void delete(String resourceGroupName, String clusterManagerName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateOrUpdate(resourceGroupName, clusterManagerName, clusterManagerParameters, ifMatch, - ifNoneMatch).getFinalResult(); + beginDelete(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch).getFinalResult(); } /** - * Create or update the cluster manager. - * - * Create a new cluster manager or update properties of the cluster manager if it exists. + * Delete the provided cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param clusterManagerParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing @@ -1094,561 +954,606 @@ public ClusterManagerInner createOrUpdate(String resourceGroupName, String clust * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clusterManager represents a control-plane to manage one or more on-premises clusters. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterManagerInner createOrUpdate(String resourceGroupName, String clusterManagerName, - ClusterManagerInner clusterManagerParameters, String ifMatch, String ifNoneMatch, Context context) { - return beginCreateOrUpdate(resourceGroupName, clusterManagerName, clusterManagerParameters, ifMatch, - ifNoneMatch, context).getFinalResult(); + public void delete(String resourceGroupName, String clusterManagerName, String ifMatch, String ifNoneMatch, + Context context) { + beginDelete(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, context).getFinalResult(); } /** - * Delete the cluster manager. + * Get a list of cluster managers in the provided resource group. * - * Delete the provided cluster manager. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 cluster managers in the provided resource group along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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 a list of cluster managers in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterManagerName The name of the cluster manager. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return a list of cluster managers in the provided resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, + String skipToken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of cluster managers in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of cluster managers in the provided resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of cluster managers in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 cluster managers in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String clusterManagerName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterManagerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterManagerName is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of cluster managers in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 cluster managers in the provided resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of cluster managers in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of cluster managers in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * Get a list of cluster managers in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 cluster managers in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, + String skipToken, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Get a list of cluster managers in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 cluster managers in the provided subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Integer top, String skipToken) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, accept, - context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, 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())); } /** - * Delete the cluster manager. - * - * Delete the provided cluster manager. + * Get a list of cluster managers in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 cluster managers in the provided subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Integer top, String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of cluster managers in the provided subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of cluster managers in the provided subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of cluster managers in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterManagerName The name of the cluster manager. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return a list of cluster managers in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String clusterManagerName, String ifMatch, - String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterManagerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterManagerName is required and cannot be null.")); - } + private PagedResponse listSinglePage(Integer top, String skipToken) { final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, accept, - Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete the cluster manager. - * - * Delete the provided cluster manager. + * Get a list of cluster managers in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterManagerName The name of the cluster manager. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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}. + * @return a list of cluster managers in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String clusterManagerName, String ifMatch, - String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterManagerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterManagerName is required and cannot be null.")); - } + private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, accept, - context); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete the cluster manager. + * Get a list of cluster managers in the provided subscription. * - * Delete the provided cluster manager. + * @throws 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 cluster managers in the provided subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listSinglePage(top, skipToken), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * Get a list of cluster managers in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterManagerName The name of the cluster manager. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return a list of cluster managers in the provided subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String clusterManagerName, String ifMatch, String ifNoneMatch) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Integer top, String skipToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * Delete the cluster manager. - * - * Delete the provided cluster manager. + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. + * @param clusterManagerUpdateRelayPrivateEndpointConnectionParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String clusterManagerName) { - final String ifMatch = null; - final String ifNoneMatch = null; - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateRelayPrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, String clusterManagerName, + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters) { + return FluxUtil + .withContext(context -> service.updateRelayPrivateEndpointConnection(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, + clusterManagerUpdateRelayPrivateEndpointConnectionParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the cluster manager. - * - * Delete the provided cluster manager. + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param clusterManagerUpdateRelayPrivateEndpointConnectionParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String clusterManagerName, String ifMatch, String ifNoneMatch) { - Response response = deleteWithResponse(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateRelayPrivateEndpointConnectionWithResponse(String resourceGroupName, + String clusterManagerName, + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters) { + return service.updateRelayPrivateEndpointConnectionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, + clusterManagerUpdateRelayPrivateEndpointConnectionParameters, Context.NONE); } /** - * Delete the cluster manager. - * - * Delete the provided cluster manager. + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. + * @param clusterManagerUpdateRelayPrivateEndpointConnectionParameters The request body. + * @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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String clusterManagerName) { - final String ifMatch = null; - final String ifNoneMatch = null; - Response response = deleteWithResponse(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateRelayPrivateEndpointConnectionWithResponse(String resourceGroupName, + String clusterManagerName, + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters, + Context context) { + return service.updateRelayPrivateEndpointConnectionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, + clusterManagerUpdateRelayPrivateEndpointConnectionParameters, context); } /** - * Delete the cluster manager. - * - * Delete the provided cluster manager. + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param context The context to associate with this operation. + * @param clusterManagerUpdateRelayPrivateEndpointConnectionParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( - String resourceGroupName, String clusterManagerName, String ifMatch, String ifNoneMatch, Context context) { - Response response - = deleteWithResponse(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + private PollerFlux, OperationStatusResult> + beginUpdateRelayPrivateEndpointConnectionAsync(String resourceGroupName, String clusterManagerName, + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters) { + Mono>> mono = updateRelayPrivateEndpointConnectionWithResponseAsync(resourceGroupName, + clusterManagerName, clusterManagerUpdateRelayPrivateEndpointConnectionParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, + this.client.getContext()); } /** - * Delete the cluster manager. - * - * Delete the provided cluster manager. + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterManagerName, - String ifMatch, String ifNoneMatch) { - return beginDeleteAsync(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResult> + beginUpdateRelayPrivateEndpointConnectionAsync(String resourceGroupName, String clusterManagerName) { + final ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters + = null; + Mono>> mono = updateRelayPrivateEndpointConnectionWithResponseAsync(resourceGroupName, + clusterManagerName, clusterManagerUpdateRelayPrivateEndpointConnectionParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, + this.client.getContext()); } /** - * Delete the cluster manager. - * - * Delete the provided cluster manager. + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. + * @param clusterManagerUpdateRelayPrivateEndpointConnectionParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterManagerName) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginDeleteAsync(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResult> + beginUpdateRelayPrivateEndpointConnection(String resourceGroupName, String clusterManagerName, + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters) { + Response response = updateRelayPrivateEndpointConnectionWithResponse(resourceGroupName, + clusterManagerName, clusterManagerUpdateRelayPrivateEndpointConnectionParameters); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Delete the cluster manager. - * - * Delete the provided cluster manager. + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String clusterManagerName) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginDelete(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch).getFinalResult(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResult> + beginUpdateRelayPrivateEndpointConnection(String resourceGroupName, String clusterManagerName) { + final ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters + = null; + Response response = updateRelayPrivateEndpointConnectionWithResponse(resourceGroupName, + clusterManagerName, clusterManagerUpdateRelayPrivateEndpointConnectionParameters); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Delete the cluster manager. - * - * Delete the provided cluster manager. + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param clusterManagerUpdateRelayPrivateEndpointConnectionParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String clusterManagerName, String ifMatch, - String ifNoneMatch, Context context) { - return beginDelete(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, context).getFinalResult(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResult> + beginUpdateRelayPrivateEndpointConnection(String resourceGroupName, String clusterManagerName, + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters, + Context context) { + Response response = updateRelayPrivateEndpointConnectionWithResponse(resourceGroupName, + clusterManagerName, clusterManagerUpdateRelayPrivateEndpointConnectionParameters, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Patch the cluster manager. - * - * Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties - * and tag updates can be done independently. + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param clusterManagerUpdateParameters The request body. + * @param clusterManagerUpdateRelayPrivateEndpointConnectionParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clusterManager represents a control-plane to manage one or more on-premises clusters along with - * {@link Response} on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String clusterManagerName, String ifMatch, String ifNoneMatch, - ClusterManagerPatchParameters clusterManagerUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterManagerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterManagerName is required and cannot be null.")); - } - if (clusterManagerUpdateParameters != null) { - clusterManagerUpdateParameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, - clusterManagerUpdateParameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono updateRelayPrivateEndpointConnectionAsync(String resourceGroupName, + String clusterManagerName, + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters) { + return beginUpdateRelayPrivateEndpointConnectionAsync(resourceGroupName, clusterManagerName, + clusterManagerUpdateRelayPrivateEndpointConnectionParameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Patch the cluster manager. - * - * Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties - * and tag updates can be done independently. + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clusterManager represents a control-plane to manage one or more on-premises clusters on successful - * completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String clusterManagerName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final ClusterManagerPatchParameters clusterManagerUpdateParameters = null; - return updateWithResponseAsync(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, - clusterManagerUpdateParameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono updateRelayPrivateEndpointConnectionAsync(String resourceGroupName, + String clusterManagerName) { + final ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters + = null; + return beginUpdateRelayPrivateEndpointConnectionAsync(resourceGroupName, clusterManagerName, + clusterManagerUpdateRelayPrivateEndpointConnectionParameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Patch the cluster manager. - * - * Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties - * and tag updates can be done independently. + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param clusterManagerUpdateParameters The request body. - * @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 clusterManager represents a control-plane to manage one or more on-premises clusters along with - * {@link Response}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String clusterManagerName, - String ifMatch, String ifNoneMatch, ClusterManagerPatchParameters clusterManagerUpdateParameters, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterManagerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterManagerName is required and cannot be null.")); - } - if (clusterManagerUpdateParameters != null) { - clusterManagerUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, - clusterManagerUpdateParameters, accept, context); + public OperationStatusResult updateRelayPrivateEndpointConnection(String resourceGroupName, + String clusterManagerName) { + final ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters + = null; + return beginUpdateRelayPrivateEndpointConnection(resourceGroupName, clusterManagerName, + clusterManagerUpdateRelayPrivateEndpointConnectionParameters).getFinalResult(); } /** - * Patch the cluster manager. - * - * Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties - * and tag updates can be done independently. + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. + * @param clusterManagerUpdateRelayPrivateEndpointConnectionParameters The request body. + * @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 clusterManager represents a control-plane to manage one or more on-premises clusters. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterManagerInner update(String resourceGroupName, String clusterManagerName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final ClusterManagerPatchParameters clusterManagerUpdateParameters = null; - return updateWithResponse(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, - clusterManagerUpdateParameters, Context.NONE).getValue(); + public OperationStatusResult updateRelayPrivateEndpointConnection(String resourceGroupName, + String clusterManagerName, + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters, + Context context) { + return beginUpdateRelayPrivateEndpointConnection(resourceGroupName, clusterManagerName, + clusterManagerUpdateRelayPrivateEndpointConnectionParameters, context).getFinalResult(); } /** - * List cluster managers in the subscription. - * * 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 cluster managers in the provided subscription along with {@link PagedResponse} on successful + * @return a list of cluster managers in the provided resource group along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); } /** - * List cluster managers in the subscription. - * * 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 cluster managers in the provided subscription along with {@link PagedResponse}. + * @return a list of cluster managers in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = 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); } /** - * List cluster managers in the subscription. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1656,88 +1561,57 @@ private PagedResponse listBySubscriptionNextSinglePage(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 cluster managers in the provided subscription along with {@link PagedResponse}. + * @return a list of cluster managers in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List cluster managers in the resource group. - * * 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 cluster managers in the provided resource group along with {@link PagedResponse} on successful + * @return a list of cluster managers in the provided subscription along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(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())); } /** - * List cluster managers in the resource group. - * * 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 cluster managers in the provided resource group along with {@link PagedResponse}. + * @return a list of cluster managers in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List cluster managers in the resource group. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1745,25 +1619,14 @@ private PagedResponse listByResourceGroupNextSinglePage(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of cluster managers in the provided resource group along with {@link PagedResponse}. + * @return a list of cluster managers in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(ClusterManagersClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterManagersImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterManagersImpl.java index c71ab4fc2324..f10a943f0b75 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterManagersImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterManagersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -11,8 +11,8 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.ClusterManagersClient; import com.azure.resourcemanager.networkcloud.fluent.models.ClusterManagerInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.ClusterManager; +import com.azure.resourcemanager.networkcloud.models.ClusterManagerUpdateRelayPrivateEndpointConnectionParameters; import com.azure.resourcemanager.networkcloud.models.ClusterManagers; import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; @@ -29,14 +29,30 @@ public ClusterManagersImpl(ClusterManagersClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterManagerImpl(inner1, this.manager())); + public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterManagerName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, clusterManagerName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ClusterManagerImpl(inner.getValue(), this.manager())); } - public PagedIterable list(Integer top, String skipToken, Context context) { - PagedIterable inner = this.serviceClient().list(top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterManagerImpl(inner1, this.manager())); + public ClusterManager getByResourceGroup(String resourceGroupName, String clusterManagerName) { + ClusterManagerInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterManagerName); + if (inner != null) { + return new ClusterManagerImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String clusterManagerName) { + this.serviceClient().delete(resourceGroupName, clusterManagerName); + } + + public void delete(String resourceGroupName, String clusterManagerName, String ifMatch, String ifNoneMatch, + Context context) { + this.serviceClient().delete(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, context); } public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -51,45 +67,28 @@ public PagedIterable listByResourceGroup(String resourceGroupNam return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterManagerImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterManagerName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, clusterManagerName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ClusterManagerImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterManagerImpl(inner1, this.manager())); } - public ClusterManager getByResourceGroup(String resourceGroupName, String clusterManagerName) { - ClusterManagerInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterManagerName); - if (inner != null) { - return new ClusterManagerImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(Integer top, String skipToken, Context context) { + PagedIterable inner = this.serviceClient().list(top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterManagerImpl(inner1, this.manager())); } - public OperationStatusResult deleteByResourceGroup(String resourceGroupName, String clusterManagerName) { - OperationStatusResultInner inner = this.serviceClient().delete(resourceGroupName, clusterManagerName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public OperationStatusResult updateRelayPrivateEndpointConnection(String resourceGroupName, + String clusterManagerName) { + return this.serviceClient().updateRelayPrivateEndpointConnection(resourceGroupName, clusterManagerName); } - public OperationStatusResult delete(String resourceGroupName, String clusterManagerName, String ifMatch, - String ifNoneMatch, Context context) { - OperationStatusResultInner inner - = this.serviceClient().delete(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public OperationStatusResult updateRelayPrivateEndpointConnection(String resourceGroupName, + String clusterManagerName, + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters, + Context context) { + return this.serviceClient() + .updateRelayPrivateEndpointConnection(resourceGroupName, clusterManagerName, + clusterManagerUpdateRelayPrivateEndpointConnectionParameters, context); } public ClusterManager getById(String id) { @@ -120,7 +119,7 @@ public Response getByIdWithResponse(String id, Context context) return this.getByResourceGroupWithResponse(resourceGroupName, clusterManagerName, context); } - public OperationStatusResult deleteById(String id) { + public void deleteById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -133,11 +132,10 @@ public OperationStatusResult deleteById(String id) { } String localIfMatch = null; String localIfNoneMatch = null; - return this.delete(resourceGroupName, clusterManagerName, localIfMatch, localIfNoneMatch, Context.NONE); + this.delete(resourceGroupName, clusterManagerName, localIfMatch, localIfNoneMatch, Context.NONE); } - public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, - Context context) { + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -148,7 +146,7 @@ public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusterManagers'.", id))); } - return this.delete(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, context); + this.delete(resourceGroupName, clusterManagerName, ifMatch, ifNoneMatch, context); } private ClusterManagersClient serviceClient() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterMetricsConfigurationImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterMetricsConfigurationImpl.java index 7ac5bac07370..aad49f938feb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterMetricsConfigurationImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterMetricsConfigurationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -60,6 +60,15 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public List enabledMetrics() { + List inner = this.innerModel().enabledMetrics(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public long collectionInterval() { return this.innerModel().collectionInterval(); } @@ -81,15 +90,6 @@ public List disabledMetrics() { } } - public List enabledMetrics() { - List inner = this.innerModel().enabledMetrics(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - public ClusterMetricsConfigurationProvisioningState provisioningState() { return this.innerModel().provisioningState(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClustersClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClustersClientImpl.java index af27581d9377..a3558e991100 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClustersClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClustersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -32,18 +32,19 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.ClustersClient; import com.azure.resourcemanager.networkcloud.fluent.models.ClusterInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.networkcloud.implementation.models.ClusterList; import com.azure.resourcemanager.networkcloud.models.ClusterContinueUpdateVersionParameters; import com.azure.resourcemanager.networkcloud.models.ClusterDeployParameters; -import com.azure.resourcemanager.networkcloud.models.ClusterList; +import com.azure.resourcemanager.networkcloud.models.ClusterInspectParameters; import com.azure.resourcemanager.networkcloud.models.ClusterPatchParameters; +import com.azure.resourcemanager.networkcloud.models.ClusterRotateCredentialParameters; import com.azure.resourcemanager.networkcloud.models.ClusterScanRuntimeParameters; import com.azure.resourcemanager.networkcloud.models.ClusterUpdateVersionParameters; +import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -60,2414 +61,2277 @@ public final class ClustersClientImpl implements ClustersClient { /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of ClustersClientImpl. * * @param client the instance of the service client containing this operation class. */ - ClustersClientImpl(NetworkCloudImpl client) { + ClustersClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(ClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudClusters to be used by the proxy service to perform REST - * calls. + * The interface defining all the services for NetworkCloudManagementClientClusters to be used by the proxy service + * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudClusters") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientClusters") public interface ClustersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/clusters") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/clusters") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ClusterInner clusterParameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ClusterInner clusterParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}") - @ExpectedResponses({ 200 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ClusterPatchParameters clusterUpdateParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}") - @ExpectedResponses({ 200 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ClusterPatchParameters clusterUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") ClusterInner clusterParameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") ClusterInner clusterParameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}") - @ExpectedResponses({ 200, 202, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}") - @ExpectedResponses({ 200, 202, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/clusters") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") ClusterPatchParameters clusterUpdateParameters, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/clusters") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") ClusterPatchParameters clusterUpdateParameters, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/continueUpdateVersion") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> continueUpdateVersion(@HostParam("$host") String endpoint, + Mono>> continueUpdateVersion(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/continueUpdateVersion") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response continueUpdateVersionSync(@HostParam("$host") String endpoint, + Response continueUpdateVersionSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/deploy") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deploy(@HostParam("$host") String endpoint, + Mono>> deploy(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @BodyParam("application/json") ClusterDeployParameters clusterDeployParameters, - @HeaderParam("Accept") String accept, Context context); + @BodyParam("application/json") ClusterDeployParameters clusterDeployParameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/deploy") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deploySync(@HostParam("$host") String endpoint, + Response deploySync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @BodyParam("application/json") ClusterDeployParameters clusterDeployParameters, - @HeaderParam("Accept") String accept, Context context); + @BodyParam("application/json") ClusterDeployParameters clusterDeployParameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/inspect") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> inspect(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @BodyParam("application/json") ClusterInspectParameters clusterInspectParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/inspect") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response inspectSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @BodyParam("application/json") ClusterInspectParameters clusterInspectParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/rotateCredential") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> rotateCredential(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ClusterRotateCredentialParameters body, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/rotateCredential") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response rotateCredentialSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ClusterRotateCredentialParameters body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/scanRuntime") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> scanRuntime(@HostParam("$host") String endpoint, + Mono>> scanRuntime(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @BodyParam("application/json") ClusterScanRuntimeParameters clusterScanRuntimeParameters, - @HeaderParam("Accept") String accept, Context context); + @BodyParam("application/json") ClusterScanRuntimeParameters clusterScanRuntimeParameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/scanRuntime") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response scanRuntimeSync(@HostParam("$host") String endpoint, + Response scanRuntimeSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @BodyParam("application/json") ClusterScanRuntimeParameters clusterScanRuntimeParameters, - @HeaderParam("Accept") String accept, Context context); + @BodyParam("application/json") ClusterScanRuntimeParameters clusterScanRuntimeParameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/updateVersion") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateVersion(@HostParam("$host") String endpoint, + Mono>> updateVersion(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") ClusterUpdateVersionParameters clusterUpdateVersionParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/updateVersion") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateVersionSync(@HostParam("$host") String endpoint, + Response updateVersionSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") ClusterUpdateVersionParameters clusterUpdateVersionParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + 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 listBySubscriptionNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + 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> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listBySubscriptionNext( + @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("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Response listBySubscriptionNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List clusters in the subscription. - * - * Get a list of clusters in the provided subscription. + * Get properties of the provided cluster. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 clusters in the provided subscription along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return properties of the provided cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String clusterName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List clusters in the subscription. - * - * Get a list of clusters in the provided subscription. + * Get properties of the provided cluster. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 clusters in the provided subscription as paginated response with {@link PagedFlux}. + * @return properties of the provided cluster on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer top, String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String clusterName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List clusters in the subscription. - * - * Get a list of clusters in the provided subscription. + * Get properties of the provided cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 clusters in the provided subscription as paginated response with {@link PagedFlux}. + * @return properties of the provided cluster along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context); } /** - * List clusters in the subscription. - * - * Get a list of clusters in the provided subscription. + * Get properties of the provided cluster. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 clusters in the provided subscription along with {@link PagedResponse}. + * @return properties of the provided cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { + return getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); } /** - * List clusters in the subscription. - * - * Get a list of clusters in the provided subscription. + * Create a new cluster or update the properties of the cluster if it exists. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param clusterParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 clusters in the provided subscription along with {@link PagedResponse}. + * @return cluster represents the on-premises Network Cloud cluster along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String clusterName, ClusterInner clusterParameters, String ifMatch, String ifNoneMatch) { + final String contentType = "application/json"; final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, ifMatch, ifNoneMatch, contentType, + accept, clusterParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List clusters in the subscription. - * - * Get a list of clusters in the provided subscription. + * Create a new cluster or update the properties of the cluster if it exists. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param clusterParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 clusters in the provided subscription as paginated response with {@link PagedIterable}. + * @return cluster represents the on-premises Network Cloud cluster along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listSinglePage(top, skipToken), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, + ClusterInner clusterParameters, String ifMatch, String ifNoneMatch) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, ifMatch, ifNoneMatch, contentType, accept, + clusterParameters, Context.NONE); + } + + /** + * Create a new cluster or update the properties of the cluster if it exists. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param clusterParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 cluster represents the on-premises Network Cloud cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, + ClusterInner clusterParameters, String ifMatch, String ifNoneMatch, 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, clusterName, ifMatch, ifNoneMatch, contentType, accept, + clusterParameters, context); + } + + /** + * Create a new cluster or update the properties of the cluster if it exists. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param clusterParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 cluster represents the on-premises Network Cloud cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClusterInner> beginCreateOrUpdateAsync(String resourceGroupName, + String clusterName, ClusterInner clusterParameters, String ifMatch, String ifNoneMatch) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, clusterParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); + } + + /** + * Create a new cluster or update the properties of the cluster if it exists. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param clusterParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 cluster represents the on-premises Network Cloud cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClusterInner> beginCreateOrUpdateAsync(String resourceGroupName, + String clusterName, ClusterInner clusterParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, clusterParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); + } + + /** + * Create a new cluster or update the properties of the cluster if it exists. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param clusterParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 cluster represents the on-premises Network Cloud cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName, + String clusterName, ClusterInner clusterParameters, String ifMatch, String ifNoneMatch) { + Response response + = createOrUpdateWithResponse(resourceGroupName, clusterName, clusterParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + Context.NONE); + } + + /** + * Create a new cluster or update the properties of the cluster if it exists. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param clusterParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 cluster represents the on-premises Network Cloud cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName, + String clusterName, ClusterInner clusterParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Response response + = createOrUpdateWithResponse(resourceGroupName, clusterName, clusterParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + Context.NONE); + } + + /** + * Create a new cluster or update the properties of the cluster if it exists. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param clusterParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 cluster represents the on-premises Network Cloud cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName, + String clusterName, ClusterInner clusterParameters, String ifMatch, String ifNoneMatch, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, clusterName, clusterParameters, + ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + context); + } + + /** + * Create a new cluster or update the properties of the cluster if it exists. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param clusterParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster represents the on-premises Network Cloud cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, + ClusterInner clusterParameters, String ifMatch, String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, clusterParameters, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a new cluster or update the properties of the cluster if it exists. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param clusterParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster represents the on-premises Network Cloud cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, + ClusterInner clusterParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, clusterParameters, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a new cluster or update the properties of the cluster if it exists. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param clusterParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster represents the on-premises Network Cloud cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterInner createOrUpdate(String resourceGroupName, String clusterName, ClusterInner clusterParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdate(resourceGroupName, clusterName, clusterParameters, ifMatch, ifNoneMatch) + .getFinalResult(); + } + + /** + * Create a new cluster or update the properties of the cluster if it exists. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param clusterParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 cluster represents the on-premises Network Cloud cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterInner createOrUpdate(String resourceGroupName, String clusterName, ClusterInner clusterParameters, + String ifMatch, String ifNoneMatch, Context context) { + return beginCreateOrUpdate(resourceGroupName, clusterName, clusterParameters, ifMatch, ifNoneMatch, context) + .getFinalResult(); + } + + /** + * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag + * updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param clusterUpdateParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster represents the on-premises Network Cloud cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + String ifMatch, String ifNoneMatch, ClusterPatchParameters clusterUpdateParameters) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, ifMatch, ifNoneMatch, accept, + clusterUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag + * updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param clusterUpdateParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster represents the on-premises Network Cloud cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String clusterName, String ifMatch, + String ifNoneMatch, ClusterPatchParameters clusterUpdateParameters) { + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, ifMatch, ifNoneMatch, accept, + clusterUpdateParameters, Context.NONE); + } + + /** + * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag + * updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param clusterUpdateParameters The request body. + * @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 cluster represents the on-premises Network Cloud cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String clusterName, String ifMatch, + String ifNoneMatch, ClusterPatchParameters clusterUpdateParameters, Context context) { + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, ifMatch, ifNoneMatch, accept, + clusterUpdateParameters, context); + } + + /** + * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag + * updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param clusterUpdateParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 cluster represents the on-premises Network Cloud cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClusterInner> beginUpdateAsync(String resourceGroupName, + String clusterName, String ifMatch, String ifNoneMatch, ClusterPatchParameters clusterUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, clusterName, ifMatch, ifNoneMatch, clusterUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); + } + + /** + * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag + * updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 cluster represents the on-premises Network Cloud cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClusterInner> beginUpdateAsync(String resourceGroupName, + String clusterName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final ClusterPatchParameters clusterUpdateParameters = null; + Mono>> mono + = updateWithResponseAsync(resourceGroupName, clusterName, ifMatch, ifNoneMatch, clusterUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); + } + + /** + * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag + * updates can be done independently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param clusterUpdateParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 cluster represents the on-premises Network Cloud cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterName, + String ifMatch, String ifNoneMatch, ClusterPatchParameters clusterUpdateParameters) { + Response response + = updateWithResponse(resourceGroupName, clusterName, ifMatch, ifNoneMatch, clusterUpdateParameters); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + Context.NONE); } /** - * List clusters in the subscription. + * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag + * updates can be done independently. * - * Get a list of clusters in the provided subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 cluster represents the on-premises Network Cloud cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, + String clusterName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final ClusterPatchParameters clusterUpdateParameters = null; + Response response + = updateWithResponse(resourceGroupName, clusterName, ifMatch, ifNoneMatch, clusterUpdateParameters); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + Context.NONE); + } + + /** + * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag + * updates can be done independently. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param clusterUpdateParameters The request body. * @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 clusters in the provided subscription as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of cluster represents the on-premises Network Cloud cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Integer top, String skipToken, Context context) { - return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterName, + String ifMatch, String ifNoneMatch, ClusterPatchParameters clusterUpdateParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, clusterName, ifMatch, ifNoneMatch, + clusterUpdateParameters, context); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + context); } /** - * List clusters in the resource group. - * - * Get a list of clusters in the provided resource group. + * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag + * updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param clusterName The name of the cluster. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param clusterUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 clusters in the provided resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return cluster represents the on-premises Network Cloud cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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())); + private Mono updateAsync(String resourceGroupName, String clusterName, String ifMatch, + String ifNoneMatch, ClusterPatchParameters clusterUpdateParameters) { + return beginUpdateAsync(resourceGroupName, clusterName, ifMatch, ifNoneMatch, clusterUpdateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * List clusters in the resource group. - * - * Get a list of clusters in the provided resource group. + * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag + * updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 clusters in the provided resource group as paginated response with {@link PagedFlux}. + * @return cluster represents the on-premises Network Cloud cluster on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, String skipToken) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String clusterName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final ClusterPatchParameters clusterUpdateParameters = null; + return beginUpdateAsync(resourceGroupName, clusterName, ifMatch, ifNoneMatch, clusterUpdateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * List clusters in the resource group. - * - * Get a list of clusters in the provided resource group. + * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag + * updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 clusters in the provided resource group as paginated response with {@link PagedFlux}. + * @return cluster represents the on-premises Network Cloud cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterInner update(String resourceGroupName, String clusterName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final ClusterPatchParameters clusterUpdateParameters = null; + return beginUpdate(resourceGroupName, clusterName, ifMatch, ifNoneMatch, clusterUpdateParameters) + .getFinalResult(); } /** - * List clusters in the resource group. + * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag + * updates can be done independently. * - * Get a list of clusters in the provided resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param clusterUpdateParameters The request body. + * @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 cluster represents the on-premises Network Cloud cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterInner update(String resourceGroupName, String clusterName, String ifMatch, String ifNoneMatch, + ClusterPatchParameters clusterUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, clusterName, ifMatch, ifNoneMatch, clusterUpdateParameters, context) + .getFinalResult(); + } + + /** + * Delete the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param clusterName The name of the cluster. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 clusters in the provided resource group along with {@link PagedResponse}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String ifMatch, String ifNoneMatch) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, ifMatch, ifNoneMatch, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List clusters in the resource group. + * Delete the provided cluster. * - * Get a list of clusters in the provided resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 clusterName, String ifMatch, + String ifNoneMatch) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, ifMatch, ifNoneMatch, Context.NONE); + } + + /** + * Delete the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param clusterName The name of the cluster. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 clusters in the provided resource group along with {@link PagedResponse}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + private Response deleteWithResponse(String resourceGroupName, String clusterName, String ifMatch, + String ifNoneMatch, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, ifMatch, ifNoneMatch, context); } /** - * List clusters in the resource group. + * Delete the provided cluster. * - * Get a list of clusters in the provided resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 clusterName, + String ifMatch, String ifNoneMatch) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 clusterName) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 clusters in the provided resource group as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String ifMatch, + String ifNoneMatch) { + Response response = deleteWithResponse(resourceGroupName, clusterName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * List clusters in the resource group. - * - * Get a list of clusters in the provided resource group. + * Delete the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 clusters in the provided resource group as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName) { + final String ifMatch = null; + final String ifNoneMatch = null; + Response response = deleteWithResponse(resourceGroupName, clusterName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Retrieve the cluster. - * - * Get properties of the provided cluster. + * Delete the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 properties of the provided cluster along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String ifMatch, + String ifNoneMatch, Context context) { + Response response + = deleteWithResponse(resourceGroupName, clusterName, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Retrieve the cluster. - * - * Get properties of the provided cluster. + * Delete the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided cluster on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String clusterName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono deleteAsync(String resourceGroupName, String clusterName, String ifMatch, String ifNoneMatch) { + return beginDeleteAsync(resourceGroupName, clusterName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieve the cluster. - * - * Get properties of the provided cluster. + * Delete the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @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 properties of the provided cluster along with {@link Response}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context); + private Mono deleteAsync(String resourceGroupName, String clusterName) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginDeleteAsync(resourceGroupName, clusterName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieve the cluster. - * - * Get properties of the provided cluster. + * Delete the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { - return getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); + public void delete(String resourceGroupName, String clusterName) { + final String ifMatch = null; + final String ifNoneMatch = null; + beginDelete(resourceGroupName, clusterName, ifMatch, ifNoneMatch).getFinalResult(); } /** - * Create or update the cluster. - * - * Create a new cluster or update the properties of the cluster if it exists. + * Delete the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @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 cluster represents the on-premises Network Cloud cluster along with {@link Response} on successful - * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String clusterName, ClusterInner clusterParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterParameters is required and cannot be null.")); - } else { - clusterParameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, ifMatch, ifNoneMatch, - clusterParameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public void delete(String resourceGroupName, String clusterName, String ifMatch, String ifNoneMatch, + Context context) { + beginDelete(resourceGroupName, clusterName, ifMatch, ifNoneMatch, context).getFinalResult(); } /** - * Create or update the cluster. - * - * Create a new cluster or update the properties of the cluster if it exists. + * Get a list of clusters in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterParameters The request body. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster represents the on-premises Network Cloud cluster along with {@link Response}. + * @return a list of clusters in the provided resource group along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, - ClusterInner clusterParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterParameters is required and cannot be null.")); - } else { - clusterParameters.validate(); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, Integer top, + String skipToken) { final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, ifMatch, ifNoneMatch, clusterParameters, - accept, Context.NONE); + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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())); } /** - * Create or update the cluster. - * - * Create a new cluster or update the properties of the cluster if it exists. + * Get a list of clusters in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterParameters The request body. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param context The context to associate with this operation. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster represents the on-premises Network Cloud cluster along with {@link Response}. + * @return a list of clusters in the provided resource group as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, - ClusterInner clusterParameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterParameters is required and cannot be null.")); - } else { - clusterParameters.validate(); - } - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, ifMatch, ifNoneMatch, clusterParameters, - accept, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, String skipToken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Create or update the cluster. - * - * Create a new cluster or update the properties of the cluster if it exists. + * Get a list of clusters in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterParameters The request body. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 cluster represents the on-premises Network Cloud cluster. + * @return a list of clusters in the provided resource group as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginCreateOrUpdateAsync(String resourceGroupName, - String clusterName, ClusterInner clusterParameters, String ifMatch, String ifNoneMatch) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, clusterParameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Create or update the cluster. - * - * Create a new cluster or update the properties of the cluster if it exists. + * Get a list of clusters in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 cluster represents the on-premises Network Cloud cluster. + * @return a list of clusters in the provided resource group along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginCreateOrUpdateAsync(String resourceGroupName, - String clusterName, ClusterInner clusterParameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, clusterParameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update the cluster. - * - * Create a new cluster or update the properties of the cluster if it exists. + * Get a list of clusters in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterParameters The request body. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 cluster represents the on-premises Network Cloud cluster. + * @return a list of clusters in the provided resource group along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName, - String clusterName, ClusterInner clusterParameters, String ifMatch, String ifNoneMatch) { - Response response - = createOrUpdateWithResponse(resourceGroupName, clusterName, clusterParameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, - Context.NONE); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update the cluster. - * - * Create a new cluster or update the properties of the cluster if it exists. + * Get a list of clusters in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 cluster represents the on-premises Network Cloud cluster. + * @return a list of clusters in the provided resource group as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName, - String clusterName, ClusterInner clusterParameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - Response response - = createOrUpdateWithResponse(resourceGroupName, clusterName, clusterParameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, - Context.NONE); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Create or update the cluster. - * - * Create a new cluster or update the properties of the cluster if it exists. + * Get a list of clusters in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterParameters The request body. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 cluster represents the on-premises Network Cloud cluster. + * @return a list of clusters in the provided resource group as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName, - String clusterName, ClusterInner clusterParameters, String ifMatch, String ifNoneMatch, Context context) { - Response response = createOrUpdateWithResponse(resourceGroupName, clusterName, clusterParameters, - ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, - context); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Create or update the cluster. - * - * Create a new cluster or update the properties of the cluster if it exists. + * Get a list of clusters in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterParameters The request body. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster represents the on-premises Network Cloud cluster on successful completion of {@link Mono}. + * @return a list of clusters in the provided subscription along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, - ClusterInner clusterParameters, String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, clusterParameters, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> listSinglePageAsync(Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, 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())); } /** - * Create or update the cluster. - * - * Create a new cluster or update the properties of the cluster if it exists. + * Get a list of clusters in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster represents the on-premises Network Cloud cluster on successful completion of {@link Mono}. + * @return a list of clusters in the provided subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, - ClusterInner clusterParameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, clusterParameters, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Integer top, String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Create or update the cluster. - * - * Create a new cluster or update the properties of the cluster if it exists. + * Get a list of clusters in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterParameters The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster represents the on-premises Network Cloud cluster. + * @return a list of clusters in the provided subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner createOrUpdate(String resourceGroupName, String clusterName, ClusterInner clusterParameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginCreateOrUpdate(resourceGroupName, clusterName, clusterParameters, ifMatch, ifNoneMatch) - .getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Create or update the cluster. - * - * Create a new cluster or update the properties of the cluster if it exists. + * Get a list of clusters in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterParameters The request body. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param context The context to associate with this operation. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster represents the on-premises Network Cloud cluster. + * @return a list of clusters in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner createOrUpdate(String resourceGroupName, String clusterName, ClusterInner clusterParameters, - String ifMatch, String ifNoneMatch, Context context) { - return beginCreateOrUpdate(resourceGroupName, clusterName, clusterParameters, ifMatch, ifNoneMatch, context) - .getFinalResult(); + private PagedResponse listSinglePage(Integer top, String skipToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete the cluster. - * - * Delete the provided cluster. + * Get a list of clusters in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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} on successful completion of - * {@link Mono}. + * @return a list of clusters in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } + private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, ifMatch, ifNoneMatch, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete the cluster. - * - * Delete the provided cluster. + * Get a list of clusters in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return a list of clusters in the provided subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String clusterName, String ifMatch, - String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, ifMatch, ifNoneMatch, accept, - Context.NONE); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listSinglePage(top, skipToken), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * Delete the cluster. - * - * Delete the provided cluster. + * Get a list of clusters in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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}. + * @return a list of clusters in the provided subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String clusterName, String ifMatch, - String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, ifMatch, ifNoneMatch, accept, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Integer top, String skipToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * Delete the cluster. - * - * Delete the provided cluster. + * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after + * completing a segment of the update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param clusterContinueUpdateVersionParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String clusterName, String ifMatch, String ifNoneMatch) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> continueUpdateVersionWithResponseAsync(String resourceGroupName, + String clusterName, ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.continueUpdateVersion(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + contentType, clusterContinueUpdateVersionParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the cluster. - * - * Delete the provided cluster. + * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after + * completing a segment of the update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param clusterContinueUpdateVersionParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String clusterName) { - final String ifMatch = null; - final String ifNoneMatch = null; - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response continueUpdateVersionWithResponse(String resourceGroupName, String clusterName, + ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters) { + final String contentType = "application/json"; + return service.continueUpdateVersionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, + clusterContinueUpdateVersionParameters, Context.NONE); } /** - * Delete the cluster. - * - * Delete the provided cluster. + * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after + * completing a segment of the update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param clusterContinueUpdateVersionParameters The request body. + * @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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String clusterName, String ifMatch, String ifNoneMatch) { - Response response = deleteWithResponse(resourceGroupName, clusterName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response continueUpdateVersionWithResponse(String resourceGroupName, String clusterName, + ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters, Context context) { + final String contentType = "application/json"; + return service.continueUpdateVersionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, + clusterContinueUpdateVersionParameters, context); } /** - * Delete the cluster. - * - * Delete the provided cluster. + * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after + * completing a segment of the update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param clusterContinueUpdateVersionParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String clusterName) { - final String ifMatch = null; - final String ifNoneMatch = null; - Response response = deleteWithResponse(resourceGroupName, clusterName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + private PollerFlux, OperationStatusResult> beginContinueUpdateVersionAsync( + String resourceGroupName, String clusterName, + ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters) { + Mono>> mono = continueUpdateVersionWithResponseAsync(resourceGroupName, clusterName, + clusterContinueUpdateVersionParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, + this.client.getContext()); } /** - * Delete the cluster. - * - * Delete the provided cluster. + * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after + * completing a segment of the update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param context The context to associate with this operation. + * @param clusterContinueUpdateVersionParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String clusterName, String ifMatch, String ifNoneMatch, Context context) { + public SyncPoller, OperationStatusResult> beginContinueUpdateVersion( + String resourceGroupName, String clusterName, + ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters) { Response response - = deleteWithResponse(resourceGroupName, clusterName, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + = continueUpdateVersionWithResponse(resourceGroupName, clusterName, clusterContinueUpdateVersionParameters); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Delete the cluster. - * - * Delete the provided cluster. + * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after + * completing a segment of the update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param clusterContinueUpdateVersionParameters The request body. + * @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 on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName, String ifMatch, - String ifNoneMatch) { - return beginDeleteAsync(resourceGroupName, clusterName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResult> beginContinueUpdateVersion( + String resourceGroupName, String clusterName, + ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters, Context context) { + Response response = continueUpdateVersionWithResponse(resourceGroupName, clusterName, + clusterContinueUpdateVersionParameters, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Delete the cluster. - * - * Delete the provided cluster. + * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after + * completing a segment of the update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param clusterContinueUpdateVersionParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginDeleteAsync(resourceGroupName, clusterName, ifMatch, ifNoneMatch).last() + private Mono continueUpdateVersionAsync(String resourceGroupName, String clusterName, + ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters) { + return beginContinueUpdateVersionAsync(resourceGroupName, clusterName, clusterContinueUpdateVersionParameters) + .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the cluster. - * - * Delete the provided cluster. + * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after + * completing a segment of the update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param clusterContinueUpdateVersionParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String clusterName) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginDelete(resourceGroupName, clusterName, ifMatch, ifNoneMatch).getFinalResult(); + public OperationStatusResult continueUpdateVersion(String resourceGroupName, String clusterName, + ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters) { + return beginContinueUpdateVersion(resourceGroupName, clusterName, clusterContinueUpdateVersionParameters) + .getFinalResult(); } /** - * Delete the cluster. - * - * Delete the provided cluster. + * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after + * completing a segment of the update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param clusterContinueUpdateVersionParameters The request body. * @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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String clusterName, String ifMatch, - String ifNoneMatch, Context context) { - return beginDelete(resourceGroupName, clusterName, ifMatch, ifNoneMatch, context).getFinalResult(); + public OperationStatusResult continueUpdateVersion(String resourceGroupName, String clusterName, + ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters, Context context) { + return beginContinueUpdateVersion(resourceGroupName, clusterName, clusterContinueUpdateVersionParameters, + context).getFinalResult(); } /** - * Patch the cluster. - * - * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag - * updates can be done independently. + * Deploy the cluster using the rack configuration provided during creation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param clusterUpdateParameters The request body. + * @param clusterDeployParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster represents the on-premises Network Cloud cluster along with {@link Response} on successful - * completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, - String ifMatch, String ifNoneMatch, ClusterPatchParameters clusterUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterUpdateParameters != null) { - clusterUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deployWithResponseAsync(String resourceGroupName, String clusterName, + ClusterDeployParameters clusterDeployParameters) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, ifMatch, ifNoneMatch, - clusterUpdateParameters, accept, context)) + .withContext(context -> service.deploy(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterDeployParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Patch the cluster. - * - * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag - * updates can be done independently. + * Deploy the cluster using the rack configuration provided during creation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param clusterUpdateParameters The request body. + * @param clusterDeployParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster represents the on-premises Network Cloud cluster along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String clusterName, String ifMatch, - String ifNoneMatch, ClusterPatchParameters clusterUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterUpdateParameters != null) { - clusterUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, ifMatch, ifNoneMatch, - clusterUpdateParameters, accept, Context.NONE); + private Response deployWithResponse(String resourceGroupName, String clusterName, + ClusterDeployParameters clusterDeployParameters) { + return service.deploySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterDeployParameters, Context.NONE); } /** - * Patch the cluster. - * - * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag - * updates can be done independently. + * Deploy the cluster using the rack configuration provided during creation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param clusterUpdateParameters The request body. + * @param clusterDeployParameters The request body. * @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 cluster represents the on-premises Network Cloud cluster along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String clusterName, String ifMatch, - String ifNoneMatch, ClusterPatchParameters clusterUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterUpdateParameters != null) { - clusterUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, ifMatch, ifNoneMatch, - clusterUpdateParameters, accept, context); + private Response deployWithResponse(String resourceGroupName, String clusterName, + ClusterDeployParameters clusterDeployParameters, Context context) { + return service.deploySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterDeployParameters, context); } /** - * Patch the cluster. - * - * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag - * updates can be done independently. + * Deploy the cluster using the rack configuration provided during creation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param clusterUpdateParameters The request body. + * @param clusterDeployParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 cluster represents the on-premises Network Cloud cluster. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginUpdateAsync(String resourceGroupName, - String clusterName, String ifMatch, String ifNoneMatch, ClusterPatchParameters clusterUpdateParameters) { + private PollerFlux, OperationStatusResult> beginDeployAsync( + String resourceGroupName, String clusterName, ClusterDeployParameters clusterDeployParameters) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, clusterName, ifMatch, ifNoneMatch, clusterUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, this.client.getContext()); + = deployWithResponseAsync(resourceGroupName, clusterName, clusterDeployParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, + this.client.getContext()); } /** - * Patch the cluster. - * - * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag - * updates can be done independently. + * Deploy the cluster using the rack configuration provided during creation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 cluster represents the on-premises Network Cloud cluster. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginUpdateAsync(String resourceGroupName, - String clusterName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final ClusterPatchParameters clusterUpdateParameters = null; + private PollerFlux, OperationStatusResult> + beginDeployAsync(String resourceGroupName, String clusterName) { + final ClusterDeployParameters clusterDeployParameters = null; Mono>> mono - = updateWithResponseAsync(resourceGroupName, clusterName, ifMatch, ifNoneMatch, clusterUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, this.client.getContext()); + = deployWithResponseAsync(resourceGroupName, clusterName, clusterDeployParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, + this.client.getContext()); } /** - * Patch the cluster. - * - * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag - * updates can be done independently. + * Deploy the cluster using the rack configuration provided during creation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param clusterUpdateParameters The request body. + * @param clusterDeployParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 cluster represents the on-premises Network Cloud cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterName, - String ifMatch, String ifNoneMatch, ClusterPatchParameters clusterUpdateParameters) { - Response response - = updateWithResponse(resourceGroupName, clusterName, ifMatch, ifNoneMatch, clusterUpdateParameters); - return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, - Context.NONE); + public SyncPoller, OperationStatusResult> beginDeploy(String resourceGroupName, + String clusterName, ClusterDeployParameters clusterDeployParameters) { + Response response = deployWithResponse(resourceGroupName, clusterName, clusterDeployParameters); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Patch the cluster. - * - * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag - * updates can be done independently. + * Deploy the cluster using the rack configuration provided during creation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 cluster represents the on-premises Network Cloud cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, + public SyncPoller, OperationStatusResult> beginDeploy(String resourceGroupName, String clusterName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final ClusterPatchParameters clusterUpdateParameters = null; - Response response - = updateWithResponse(resourceGroupName, clusterName, ifMatch, ifNoneMatch, clusterUpdateParameters); - return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, - Context.NONE); + final ClusterDeployParameters clusterDeployParameters = null; + Response response = deployWithResponse(resourceGroupName, clusterName, clusterDeployParameters); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Patch the cluster. - * - * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag - * updates can be done independently. + * Deploy the cluster using the rack configuration provided during creation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param clusterUpdateParameters The request body. + * @param clusterDeployParameters The request body. * @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 cluster represents the on-premises Network Cloud cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterName, - String ifMatch, String ifNoneMatch, ClusterPatchParameters clusterUpdateParameters, Context context) { - Response response = updateWithResponse(resourceGroupName, clusterName, ifMatch, ifNoneMatch, - clusterUpdateParameters, context); - return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, - context); + public SyncPoller, OperationStatusResult> beginDeploy(String resourceGroupName, + String clusterName, ClusterDeployParameters clusterDeployParameters, Context context) { + Response response + = deployWithResponse(resourceGroupName, clusterName, clusterDeployParameters, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Patch the cluster. - * - * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag - * updates can be done independently. + * Deploy the cluster using the rack configuration provided during creation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param clusterUpdateParameters The request body. + * @param clusterDeployParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster represents the on-premises Network Cloud cluster on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String clusterName, String ifMatch, - String ifNoneMatch, ClusterPatchParameters clusterUpdateParameters) { - return beginUpdateAsync(resourceGroupName, clusterName, ifMatch, ifNoneMatch, clusterUpdateParameters).last() + private Mono deployAsync(String resourceGroupName, String clusterName, + ClusterDeployParameters clusterDeployParameters) { + return beginDeployAsync(resourceGroupName, clusterName, clusterDeployParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Patch the cluster. - * - * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag - * updates can be done independently. + * Deploy the cluster using the rack configuration provided during creation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster represents the on-premises Network Cloud cluster on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String clusterName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final ClusterPatchParameters clusterUpdateParameters = null; - return beginUpdateAsync(resourceGroupName, clusterName, ifMatch, ifNoneMatch, clusterUpdateParameters).last() + private Mono deployAsync(String resourceGroupName, String clusterName) { + final ClusterDeployParameters clusterDeployParameters = null; + return beginDeployAsync(resourceGroupName, clusterName, clusterDeployParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Patch the cluster. - * - * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag - * updates can be done independently. + * Deploy the cluster using the rack configuration provided during creation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster represents the on-premises Network Cloud cluster. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner update(String resourceGroupName, String clusterName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final ClusterPatchParameters clusterUpdateParameters = null; - return beginUpdate(resourceGroupName, clusterName, ifMatch, ifNoneMatch, clusterUpdateParameters) - .getFinalResult(); + public OperationStatusResult deploy(String resourceGroupName, String clusterName) { + final ClusterDeployParameters clusterDeployParameters = null; + return beginDeploy(resourceGroupName, clusterName, clusterDeployParameters).getFinalResult(); } /** - * Patch the cluster. - * - * Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag - * updates can be done independently. + * Deploy the cluster using the rack configuration provided during creation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param clusterUpdateParameters The request body. + * @param clusterDeployParameters The request body. * @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 cluster represents the on-premises Network Cloud cluster. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner update(String resourceGroupName, String clusterName, String ifMatch, String ifNoneMatch, - ClusterPatchParameters clusterUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, clusterName, ifMatch, ifNoneMatch, clusterUpdateParameters, context) - .getFinalResult(); + public OperationStatusResult deploy(String resourceGroupName, String clusterName, + ClusterDeployParameters clusterDeployParameters, Context context) { + return beginDeploy(resourceGroupName, clusterName, clusterDeployParameters, context).getFinalResult(); } /** - * Continue a paused update to the cluster version. - * - * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after - * completing a segment of the update. + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterContinueUpdateVersionParameters The request body. + * @param clusterInspectParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> continueUpdateVersionWithResponseAsync(String resourceGroupName, - String clusterName, ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterContinueUpdateVersionParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter clusterContinueUpdateVersionParameters is required and cannot be null.")); - } else { - clusterContinueUpdateVersionParameters.validate(); - } - final String accept = "application/json"; + private Mono>> inspectWithResponseAsync(String resourceGroupName, String clusterName, + ClusterInspectParameters clusterInspectParameters) { return FluxUtil - .withContext(context -> service.continueUpdateVersion(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - clusterContinueUpdateVersionParameters, accept, context)) + .withContext(context -> service.inspect(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterInspectParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Continue a paused update to the cluster version. - * - * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after - * completing a segment of the update. + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterContinueUpdateVersionParameters The request body. + * @param clusterInspectParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response continueUpdateVersionWithResponse(String resourceGroupName, String clusterName, - ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterContinueUpdateVersionParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter clusterContinueUpdateVersionParameters is required and cannot be null.")); - } else { - clusterContinueUpdateVersionParameters.validate(); - } - final String accept = "application/json"; - return service.continueUpdateVersionSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterContinueUpdateVersionParameters, - accept, Context.NONE); + private Response inspectWithResponse(String resourceGroupName, String clusterName, + ClusterInspectParameters clusterInspectParameters) { + return service.inspectSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterInspectParameters, Context.NONE); } /** - * Continue a paused update to the cluster version. - * - * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after - * completing a segment of the update. + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterContinueUpdateVersionParameters The request body. + * @param clusterInspectParameters The request body. * @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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response continueUpdateVersionWithResponse(String resourceGroupName, String clusterName, - ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterContinueUpdateVersionParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter clusterContinueUpdateVersionParameters is required and cannot be null.")); - } else { - clusterContinueUpdateVersionParameters.validate(); - } - final String accept = "application/json"; - return service.continueUpdateVersionSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterContinueUpdateVersionParameters, - accept, context); + private Response inspectWithResponse(String resourceGroupName, String clusterName, + ClusterInspectParameters clusterInspectParameters, Context context) { + return service.inspectSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterInspectParameters, context); } /** - * Continue a paused update to the cluster version. - * - * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after - * completing a segment of the update. + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterContinueUpdateVersionParameters The request body. + * @param clusterInspectParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginContinueUpdateVersionAsync(String resourceGroupName, String clusterName, - ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters) { - Mono>> mono = continueUpdateVersionWithResponseAsync(resourceGroupName, clusterName, - clusterContinueUpdateVersionParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + private PollerFlux, OperationStatusResult> beginInspectAsync( + String resourceGroupName, String clusterName, ClusterInspectParameters clusterInspectParameters) { + Mono>> mono + = inspectWithResponseAsync(resourceGroupName, clusterName, clusterInspectParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Continue a paused update to the cluster version. - * - * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after - * completing a segment of the update. + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterContinueUpdateVersionParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginContinueUpdateVersion( - String resourceGroupName, String clusterName, - ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters) { - Response response - = continueUpdateVersionWithResponse(resourceGroupName, clusterName, clusterContinueUpdateVersionParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + private PollerFlux, OperationStatusResult> + beginInspectAsync(String resourceGroupName, String clusterName) { + final ClusterInspectParameters clusterInspectParameters = null; + Mono>> mono + = inspectWithResponseAsync(resourceGroupName, clusterName, clusterInspectParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, + this.client.getContext()); } /** - * Continue a paused update to the cluster version. - * - * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after - * completing a segment of the update. + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterContinueUpdateVersionParameters The request body. - * @param context The context to associate with this operation. + * @param clusterInspectParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginContinueUpdateVersion( - String resourceGroupName, String clusterName, - ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters, Context context) { - Response response = continueUpdateVersionWithResponse(resourceGroupName, clusterName, - clusterContinueUpdateVersionParameters, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + public SyncPoller, OperationStatusResult> beginInspect(String resourceGroupName, + String clusterName, ClusterInspectParameters clusterInspectParameters) { + Response response = inspectWithResponse(resourceGroupName, clusterName, clusterInspectParameters); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Continue a paused update to the cluster version. - * - * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after - * completing a segment of the update. + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterContinueUpdateVersionParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono continueUpdateVersionAsync(String resourceGroupName, String clusterName, - ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters) { - return beginContinueUpdateVersionAsync(resourceGroupName, clusterName, clusterContinueUpdateVersionParameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResult> beginInspect(String resourceGroupName, + String clusterName) { + final ClusterInspectParameters clusterInspectParameters = null; + Response response = inspectWithResponse(resourceGroupName, clusterName, clusterInspectParameters); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Continue a paused update to the cluster version. - * - * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after - * completing a segment of the update. + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterContinueUpdateVersionParameters The request body. + * @param clusterInspectParameters The request body. + * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner continueUpdateVersion(String resourceGroupName, String clusterName, - ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters) { - return beginContinueUpdateVersion(resourceGroupName, clusterName, clusterContinueUpdateVersionParameters) - .getFinalResult(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResult> beginInspect(String resourceGroupName, + String clusterName, ClusterInspectParameters clusterInspectParameters, Context context) { + Response response + = inspectWithResponse(resourceGroupName, clusterName, clusterInspectParameters, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Continue a paused update to the cluster version. - * - * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after - * completing a segment of the update. + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterContinueUpdateVersionParameters The request body. - * @param context The context to associate with this operation. + * @param clusterInspectParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner continueUpdateVersion(String resourceGroupName, String clusterName, - ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters, Context context) { - return beginContinueUpdateVersion(resourceGroupName, clusterName, clusterContinueUpdateVersionParameters, - context).getFinalResult(); + private Mono inspectAsync(String resourceGroupName, String clusterName, + ClusterInspectParameters clusterInspectParameters) { + return beginInspectAsync(resourceGroupName, clusterName, clusterInspectParameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Deploy the cluster. - * - * Deploy the cluster using the rack configuration provided during creation. + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterDeployParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deployWithResponseAsync(String resourceGroupName, String clusterName, - ClusterDeployParameters clusterDeployParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterDeployParameters != null) { - clusterDeployParameters.validate(); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.deploy(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterDeployParameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono inspectAsync(String resourceGroupName, String clusterName) { + final ClusterInspectParameters clusterInspectParameters = null; + return beginInspectAsync(resourceGroupName, clusterName, clusterInspectParameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Deploy the cluster. - * - * Deploy the cluster using the rack configuration provided during creation. + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterDeployParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deployWithResponse(String resourceGroupName, String clusterName, - ClusterDeployParameters clusterDeployParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterDeployParameters != null) { - clusterDeployParameters.validate(); - } - final String accept = "application/json"; - return service.deploySync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterDeployParameters, accept, - Context.NONE); + public OperationStatusResult inspect(String resourceGroupName, String clusterName) { + final ClusterInspectParameters clusterInspectParameters = null; + return beginInspect(resourceGroupName, clusterName, clusterInspectParameters).getFinalResult(); } /** - * Deploy the cluster. - * - * Deploy the cluster using the rack configuration provided during creation. + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterDeployParameters The request body. + * @param clusterInspectParameters The request body. * @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}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deployWithResponse(String resourceGroupName, String clusterName, - ClusterDeployParameters clusterDeployParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterDeployParameters != null) { - clusterDeployParameters.validate(); - } - final String accept = "application/json"; - return service.deploySync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterDeployParameters, accept, context); + public OperationStatusResult inspect(String resourceGroupName, String clusterName, + ClusterInspectParameters clusterInspectParameters, Context context) { + return beginInspect(resourceGroupName, clusterName, clusterInspectParameters, context).getFinalResult(); } /** - * Deploy the cluster. - * - * Deploy the cluster using the rack configuration provided during creation. + * Rotate the specified cluster credential. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterDeployParameters The request body. + * @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. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginDeployAsync( - String resourceGroupName, String clusterName, ClusterDeployParameters clusterDeployParameters) { - Mono>> mono - = deployWithResponseAsync(resourceGroupName, clusterName, clusterDeployParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> rotateCredentialWithResponseAsync(String resourceGroupName, + String clusterName, ClusterRotateCredentialParameters body) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.rotateCredential(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deploy the cluster. - * - * Deploy the cluster using the rack configuration provided during creation. + * Rotate the specified cluster credential. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeployAsync(String resourceGroupName, String clusterName) { - final ClusterDeployParameters clusterDeployParameters = null; - Mono>> mono - = deployWithResponseAsync(resourceGroupName, clusterName, clusterDeployParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response rotateCredentialWithResponse(String resourceGroupName, String clusterName, + ClusterRotateCredentialParameters body) { + final String contentType = "application/json"; + return service.rotateCredentialSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, body, Context.NONE); } /** - * Deploy the cluster. - * - * Deploy the cluster using the rack configuration provided during creation. + * Rotate the specified cluster credential. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterDeployParameters The request body. + * @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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDeploy(String resourceGroupName, String clusterName, ClusterDeployParameters clusterDeployParameters) { - Response response = deployWithResponse(resourceGroupName, clusterName, clusterDeployParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response rotateCredentialWithResponse(String resourceGroupName, String clusterName, + ClusterRotateCredentialParameters body, Context context) { + final String contentType = "application/json"; + return service.rotateCredentialSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, body, context); } /** - * Deploy the cluster. - * - * Deploy the cluster using the rack configuration provided during creation. + * Rotate the specified cluster credential. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDeploy(String resourceGroupName, String clusterName) { - final ClusterDeployParameters clusterDeployParameters = null; - Response response = deployWithResponse(resourceGroupName, clusterName, clusterDeployParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + private PollerFlux, OperationStatusResult> beginRotateCredentialAsync( + String resourceGroupName, String clusterName, ClusterRotateCredentialParameters body) { + Mono>> mono = rotateCredentialWithResponseAsync(resourceGroupName, clusterName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, + this.client.getContext()); } /** - * Deploy the cluster. - * - * Deploy the cluster using the rack configuration provided during creation. + * Rotate the specified cluster credential. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterDeployParameters The request body. - * @param context The context to associate with this operation. + * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDeploy( - String resourceGroupName, String clusterName, ClusterDeployParameters clusterDeployParameters, - Context context) { - Response response - = deployWithResponse(resourceGroupName, clusterName, clusterDeployParameters, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + public SyncPoller, OperationStatusResult> + beginRotateCredential(String resourceGroupName, String clusterName, ClusterRotateCredentialParameters body) { + Response response = rotateCredentialWithResponse(resourceGroupName, clusterName, body); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Deploy the cluster. - * - * Deploy the cluster using the rack configuration provided during creation. + * Rotate the specified cluster credential. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterDeployParameters The request body. + * @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 on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deployAsync(String resourceGroupName, String clusterName, - ClusterDeployParameters clusterDeployParameters) { - return beginDeployAsync(resourceGroupName, clusterName, clusterDeployParameters).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResult> beginRotateCredential( + String resourceGroupName, String clusterName, ClusterRotateCredentialParameters body, Context context) { + Response response = rotateCredentialWithResponse(resourceGroupName, clusterName, body, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Deploy the cluster. - * - * Deploy the cluster using the rack configuration provided during creation. + * Rotate the specified cluster credential. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deployAsync(String resourceGroupName, String clusterName) { - final ClusterDeployParameters clusterDeployParameters = null; - return beginDeployAsync(resourceGroupName, clusterName, clusterDeployParameters).last() + private Mono rotateCredentialAsync(String resourceGroupName, String clusterName, + ClusterRotateCredentialParameters body) { + return beginRotateCredentialAsync(resourceGroupName, clusterName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deploy the cluster. - * - * Deploy the cluster using the rack configuration provided during creation. + * Rotate the specified cluster credential. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner deploy(String resourceGroupName, String clusterName) { - final ClusterDeployParameters clusterDeployParameters = null; - return beginDeploy(resourceGroupName, clusterName, clusterDeployParameters).getFinalResult(); + public OperationStatusResult rotateCredential(String resourceGroupName, String clusterName, + ClusterRotateCredentialParameters body) { + return beginRotateCredential(resourceGroupName, clusterName, body).getFinalResult(); } /** - * Deploy the cluster. - * - * Deploy the cluster using the rack configuration provided during creation. + * Rotate the specified cluster credential. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterDeployParameters The request body. + * @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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner deploy(String resourceGroupName, String clusterName, - ClusterDeployParameters clusterDeployParameters, Context context) { - return beginDeploy(resourceGroupName, clusterName, clusterDeployParameters, context).getFinalResult(); + public OperationStatusResult rotateCredential(String resourceGroupName, String clusterName, + ClusterRotateCredentialParameters body, Context context) { + return beginRotateCredential(resourceGroupName, clusterName, body, context).getFinalResult(); } /** - * Execute a runtime protection scan on the cluster. - * * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -2477,41 +2341,18 @@ public OperationStatusResultInner deploy(String resourceGroupName, String cluste * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> scanRuntimeWithResponseAsync(String resourceGroupName, String clusterName, ClusterScanRuntimeParameters clusterScanRuntimeParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterScanRuntimeParameters != null) { - clusterScanRuntimeParameters.validate(); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.scanRuntime(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterScanRuntimeParameters, accept, - context)) + this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterScanRuntimeParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Execute a runtime protection scan on the cluster. - * * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -2521,41 +2362,17 @@ private Mono>> scanRuntimeWithResponseAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response scanRuntimeWithResponse(String resourceGroupName, String clusterName, ClusterScanRuntimeParameters clusterScanRuntimeParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterScanRuntimeParameters != null) { - clusterScanRuntimeParameters.validate(); - } - final String accept = "application/json"; return service.scanRuntimeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterScanRuntimeParameters, accept, + this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterScanRuntimeParameters, Context.NONE); } /** - * Execute a runtime protection scan on the cluster. - * * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -2566,41 +2383,16 @@ private Response scanRuntimeWithResponse(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response scanRuntimeWithResponse(String resourceGroupName, String clusterName, ClusterScanRuntimeParameters clusterScanRuntimeParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterScanRuntimeParameters != null) { - clusterScanRuntimeParameters.validate(); - } - final String accept = "application/json"; return service.scanRuntimeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterScanRuntimeParameters, accept, - context); + this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterScanRuntimeParameters, context); } /** - * Execute a runtime protection scan on the cluster. - * * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -2610,21 +2402,19 @@ private Response scanRuntimeWithResponse(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginScanRuntimeAsync( + private PollerFlux, OperationStatusResult> beginScanRuntimeAsync( String resourceGroupName, String clusterName, ClusterScanRuntimeParameters clusterScanRuntimeParameters) { Mono>> mono = scanRuntimeWithResponseAsync(resourceGroupName, clusterName, clusterScanRuntimeParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Execute a runtime protection scan on the cluster. - * * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -2633,22 +2423,20 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> + private PollerFlux, OperationStatusResult> beginScanRuntimeAsync(String resourceGroupName, String clusterName) { final ClusterScanRuntimeParameters clusterScanRuntimeParameters = null; Mono>> mono = scanRuntimeWithResponseAsync(resourceGroupName, clusterName, clusterScanRuntimeParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Execute a runtime protection scan on the cluster. - * * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -2658,20 +2446,18 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginScanRuntime( + public SyncPoller, OperationStatusResult> beginScanRuntime( String resourceGroupName, String clusterName, ClusterScanRuntimeParameters clusterScanRuntimeParameters) { Response response = scanRuntimeWithResponse(resourceGroupName, clusterName, clusterScanRuntimeParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Execute a runtime protection scan on the cluster. - * * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -2680,21 +2466,19 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> + public SyncPoller, OperationStatusResult> beginScanRuntime(String resourceGroupName, String clusterName) { final ClusterScanRuntimeParameters clusterScanRuntimeParameters = null; Response response = scanRuntimeWithResponse(resourceGroupName, clusterName, clusterScanRuntimeParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Execute a runtime protection scan on the cluster. - * * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -2705,21 +2489,19 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginScanRuntime( + public SyncPoller, OperationStatusResult> beginScanRuntime( String resourceGroupName, String clusterName, ClusterScanRuntimeParameters clusterScanRuntimeParameters, Context context) { Response response = scanRuntimeWithResponse(resourceGroupName, clusterName, clusterScanRuntimeParameters, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Execute a runtime protection scan on the cluster. - * * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -2729,18 +2511,16 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono scanRuntimeAsync(String resourceGroupName, String clusterName, + private Mono scanRuntimeAsync(String resourceGroupName, String clusterName, ClusterScanRuntimeParameters clusterScanRuntimeParameters) { return beginScanRuntimeAsync(resourceGroupName, clusterName, clusterScanRuntimeParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Execute a runtime protection scan on the cluster. - * * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -2749,18 +2529,16 @@ private Mono scanRuntimeAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono scanRuntimeAsync(String resourceGroupName, String clusterName) { + private Mono scanRuntimeAsync(String resourceGroupName, String clusterName) { final ClusterScanRuntimeParameters clusterScanRuntimeParameters = null; return beginScanRuntimeAsync(resourceGroupName, clusterName, clusterScanRuntimeParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Execute a runtime protection scan on the cluster. - * * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -2769,17 +2547,15 @@ private Mono scanRuntimeAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner scanRuntime(String resourceGroupName, String clusterName) { + public OperationStatusResult scanRuntime(String resourceGroupName, String clusterName) { final ClusterScanRuntimeParameters clusterScanRuntimeParameters = null; return beginScanRuntime(resourceGroupName, clusterName, clusterScanRuntimeParameters).getFinalResult(); } /** - * Execute a runtime protection scan on the cluster. - * * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -2790,17 +2566,15 @@ public OperationStatusResultInner scanRuntime(String resourceGroupName, String c * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner scanRuntime(String resourceGroupName, String clusterName, + public OperationStatusResult scanRuntime(String resourceGroupName, String clusterName, ClusterScanRuntimeParameters clusterScanRuntimeParameters, Context context) { return beginScanRuntime(resourceGroupName, clusterName, clusterScanRuntimeParameters, context).getFinalResult(); } /** - * Update the cluster version. - * * Update the version of the provided cluster to one of the available supported versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2809,44 +2583,20 @@ public OperationStatusResultInner scanRuntime(String resourceGroupName, String c * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateVersionWithResponseAsync(String resourceGroupName, String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterUpdateVersionParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter clusterUpdateVersionParameters is required and cannot be null.")); - } else { - clusterUpdateVersionParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.updateVersion(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterUpdateVersionParameters, accept, - context)) + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, + clusterUpdateVersionParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update the cluster version. - * * Update the version of the provided cluster to one of the available supported versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2855,45 +2605,18 @@ private Mono>> updateVersionWithResponseAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateVersionWithResponse(String resourceGroupName, String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterUpdateVersionParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter clusterUpdateVersionParameters is required and cannot be null.")); - } else { - clusterUpdateVersionParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.updateVersionSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterUpdateVersionParameters, accept, - Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, + clusterUpdateVersionParameters, Context.NONE); } /** - * Update the cluster version. - * * Update the version of the provided cluster to one of the available supported versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2903,45 +2626,18 @@ private Response updateVersionWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateVersionWithResponse(String resourceGroupName, String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterUpdateVersionParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter clusterUpdateVersionParameters is required and cannot be null.")); - } else { - clusterUpdateVersionParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.updateVersionSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, clusterUpdateVersionParameters, accept, - context); + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, + clusterUpdateVersionParameters, context); } /** - * Update the cluster version. - * * Update the version of the provided cluster to one of the available supported versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2950,21 +2646,19 @@ private Response updateVersionWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginUpdateVersionAsync( + private PollerFlux, OperationStatusResult> beginUpdateVersionAsync( String resourceGroupName, String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters) { Mono>> mono = updateVersionWithResponseAsync(resourceGroupName, clusterName, clusterUpdateVersionParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Update the cluster version. - * * Update the version of the provided cluster to one of the available supported versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2973,20 +2667,18 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginUpdateVersion( + public SyncPoller, OperationStatusResult> beginUpdateVersion( String resourceGroupName, String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters) { Response response = updateVersionWithResponse(resourceGroupName, clusterName, clusterUpdateVersionParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Update the cluster version. - * * Update the version of the provided cluster to one of the available supported versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2996,21 +2688,19 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginUpdateVersion( + public SyncPoller, OperationStatusResult> beginUpdateVersion( String resourceGroupName, String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters, Context context) { Response response = updateVersionWithResponse(resourceGroupName, clusterName, clusterUpdateVersionParameters, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Update the cluster version. - * * Update the version of the provided cluster to one of the available supported versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3019,18 +2709,16 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateVersionAsync(String resourceGroupName, String clusterName, + private Mono updateVersionAsync(String resourceGroupName, String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters) { return beginUpdateVersionAsync(resourceGroupName, clusterName, clusterUpdateVersionParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Update the cluster version. - * * Update the version of the provided cluster to one of the available supported versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3039,17 +2727,15 @@ private Mono updateVersionAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner updateVersion(String resourceGroupName, String clusterName, + public OperationStatusResult updateVersion(String resourceGroupName, String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters) { return beginUpdateVersion(resourceGroupName, clusterName, clusterUpdateVersionParameters).getFinalResult(); } /** - * Update the cluster version. - * * Update the version of the provided cluster to one of the available supported versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3059,77 +2745,55 @@ public OperationStatusResultInner updateVersion(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner updateVersion(String resourceGroupName, String clusterName, + public OperationStatusResult updateVersion(String resourceGroupName, String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters, Context context) { return beginUpdateVersion(resourceGroupName, clusterName, clusterUpdateVersionParameters, context) .getFinalResult(); } /** - * List clusters in the subscription. - * * 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 clusters in the provided subscription along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of clusters in the provided resource group along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); } /** - * List clusters in the subscription. - * * 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 clusters in the provided subscription along with {@link PagedResponse}. + * @return a list of clusters in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = 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); } /** - * List clusters in the subscription. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -3137,88 +2801,57 @@ private PagedResponse listBySubscriptionNextSinglePage(String next * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 clusters in the provided subscription along with {@link PagedResponse}. + * @return a list of clusters in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List clusters in the resource group. - * * 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 clusters in the provided resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of clusters in the provided subscription along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(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())); } /** - * List clusters in the resource group. - * * 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 clusters in the provided resource group along with {@link PagedResponse}. + * @return a list of clusters in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List clusters in the resource group. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -3226,25 +2859,14 @@ private PagedResponse listByResourceGroupNextSinglePage(String nex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of clusters in the provided resource group along with {@link PagedResponse}. + * @return a list of clusters in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(ClustersClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClustersImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClustersImpl.java index e75069807107..2edb5f8b78ac 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClustersImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClustersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -11,10 +11,11 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.ClustersClient; import com.azure.resourcemanager.networkcloud.fluent.models.ClusterInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.Cluster; import com.azure.resourcemanager.networkcloud.models.ClusterContinueUpdateVersionParameters; import com.azure.resourcemanager.networkcloud.models.ClusterDeployParameters; +import com.azure.resourcemanager.networkcloud.models.ClusterInspectParameters; +import com.azure.resourcemanager.networkcloud.models.ClusterRotateCredentialParameters; import com.azure.resourcemanager.networkcloud.models.ClusterScanRuntimeParameters; import com.azure.resourcemanager.networkcloud.models.ClusterUpdateVersionParameters; import com.azure.resourcemanager.networkcloud.models.Clusters; @@ -33,14 +34,30 @@ public ClustersImpl(ClustersClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); + public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, clusterName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ClusterImpl(inner.getValue(), this.manager())); } - public PagedIterable list(Integer top, String skipToken, Context context) { - PagedIterable inner = this.serviceClient().list(top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); + public Cluster getByResourceGroup(String resourceGroupName, String clusterName) { + ClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterName); + if (inner != null) { + return new ClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String clusterName) { + this.serviceClient().delete(resourceGroupName, clusterName); + } + + public void delete(String resourceGroupName, String clusterName, String ifMatch, String ifNoneMatch, + Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, ifMatch, ifNoneMatch, context); } public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -55,129 +72,74 @@ public PagedIterable listByResourceGroup(String resourceGroupName, Inte return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, clusterName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ClusterImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Cluster getByResourceGroup(String resourceGroupName, String clusterName) { - ClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterName); - if (inner != null) { - return new ClusterImpl(inner, this.manager()); - } else { - return null; - } - } - - public OperationStatusResult deleteByResourceGroup(String resourceGroupName, String clusterName) { - OperationStatusResultInner inner = this.serviceClient().delete(resourceGroupName, clusterName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); } - public OperationStatusResult delete(String resourceGroupName, String clusterName, String ifMatch, - String ifNoneMatch, Context context) { - OperationStatusResultInner inner - = this.serviceClient().delete(resourceGroupName, clusterName, ifMatch, ifNoneMatch, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(Integer top, String skipToken, Context context) { + PagedIterable inner = this.serviceClient().list(top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); } public OperationStatusResult continueUpdateVersion(String resourceGroupName, String clusterName, ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .continueUpdateVersion(resourceGroupName, clusterName, clusterContinueUpdateVersionParameters); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public OperationStatusResult continueUpdateVersion(String resourceGroupName, String clusterName, ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters, Context context) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .continueUpdateVersion(resourceGroupName, clusterName, clusterContinueUpdateVersionParameters, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public OperationStatusResult deploy(String resourceGroupName, String clusterName) { - OperationStatusResultInner inner = this.serviceClient().deploy(resourceGroupName, clusterName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().deploy(resourceGroupName, clusterName); } public OperationStatusResult deploy(String resourceGroupName, String clusterName, ClusterDeployParameters clusterDeployParameters, Context context) { - OperationStatusResultInner inner - = this.serviceClient().deploy(resourceGroupName, clusterName, clusterDeployParameters, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().deploy(resourceGroupName, clusterName, clusterDeployParameters, context); + } + + public OperationStatusResult inspect(String resourceGroupName, String clusterName) { + return this.serviceClient().inspect(resourceGroupName, clusterName); + } + + public OperationStatusResult inspect(String resourceGroupName, String clusterName, + ClusterInspectParameters clusterInspectParameters, Context context) { + return this.serviceClient().inspect(resourceGroupName, clusterName, clusterInspectParameters, context); + } + + public OperationStatusResult rotateCredential(String resourceGroupName, String clusterName, + ClusterRotateCredentialParameters body) { + return this.serviceClient().rotateCredential(resourceGroupName, clusterName, body); + } + + public OperationStatusResult rotateCredential(String resourceGroupName, String clusterName, + ClusterRotateCredentialParameters body, Context context) { + return this.serviceClient().rotateCredential(resourceGroupName, clusterName, body, context); } public OperationStatusResult scanRuntime(String resourceGroupName, String clusterName) { - OperationStatusResultInner inner = this.serviceClient().scanRuntime(resourceGroupName, clusterName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().scanRuntime(resourceGroupName, clusterName); } public OperationStatusResult scanRuntime(String resourceGroupName, String clusterName, ClusterScanRuntimeParameters clusterScanRuntimeParameters, Context context) { - OperationStatusResultInner inner - = this.serviceClient().scanRuntime(resourceGroupName, clusterName, clusterScanRuntimeParameters, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().scanRuntime(resourceGroupName, clusterName, clusterScanRuntimeParameters, context); } public OperationStatusResult updateVersion(String resourceGroupName, String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters) { - OperationStatusResultInner inner - = this.serviceClient().updateVersion(resourceGroupName, clusterName, clusterUpdateVersionParameters); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().updateVersion(resourceGroupName, clusterName, clusterUpdateVersionParameters); } public OperationStatusResult updateVersion(String resourceGroupName, String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters, Context context) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .updateVersion(resourceGroupName, clusterName, clusterUpdateVersionParameters, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public Cluster getById(String id) { @@ -208,7 +170,7 @@ public Response getByIdWithResponse(String id, Context context) { return this.getByResourceGroupWithResponse(resourceGroupName, clusterName, context); } - public OperationStatusResult deleteById(String id) { + public void deleteById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -221,11 +183,10 @@ public OperationStatusResult deleteById(String id) { } String localIfMatch = null; String localIfNoneMatch = null; - return this.delete(resourceGroupName, clusterName, localIfMatch, localIfNoneMatch, Context.NONE); + this.delete(resourceGroupName, clusterName, localIfMatch, localIfNoneMatch, Context.NONE); } - public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, - Context context) { + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -236,7 +197,7 @@ public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } - return this.delete(resourceGroupName, clusterName, ifMatch, ifNoneMatch, context); + this.delete(resourceGroupName, clusterName, ifMatch, ifNoneMatch, context); } private ClustersClient serviceClient() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ConsoleImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ConsoleImpl.java index 2efeb1cfea4c..95d0fad52ceb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ConsoleImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ConsoleImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -61,14 +61,6 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public ConsoleDetailedStatus detailedStatus() { - return this.innerModel().detailedStatus(); - } - - public String detailedStatusMessage() { - return this.innerModel().detailedStatusMessage(); - } - public ConsoleEnabled enabled() { return this.innerModel().enabled(); } @@ -77,22 +69,30 @@ public OffsetDateTime expiration() { return this.innerModel().expiration(); } - public String privateLinkServiceId() { - return this.innerModel().privateLinkServiceId(); + public SshPublicKey sshPublicKey() { + return this.innerModel().sshPublicKey(); } - public ConsoleProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public ConsoleDetailedStatus detailedStatus() { + return this.innerModel().detailedStatus(); } - public SshPublicKey sshPublicKey() { - return this.innerModel().sshPublicKey(); + public String detailedStatusMessage() { + return this.innerModel().detailedStatusMessage(); + } + + public String privateLinkServiceId() { + return this.innerModel().privateLinkServiceId(); } public String virtualMachineAccessId() { return this.innerModel().virtualMachineAccessId(); } + public ConsoleProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public Region region() { return Region.fromName(this.regionName()); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ConsolesClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ConsolesClientImpl.java index e831dd9e19f3..5e916da7d8cf 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ConsolesClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ConsolesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -31,13 +31,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.ConsolesClient; import com.azure.resourcemanager.networkcloud.fluent.models.ConsoleInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; -import com.azure.resourcemanager.networkcloud.models.ConsoleList; +import com.azure.resourcemanager.networkcloud.implementation.models.ConsoleList; import com.azure.resourcemanager.networkcloud.models.ConsolePatchParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,50 +53,30 @@ public final class ConsolesClientImpl implements ConsolesClient { /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of ConsolesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ConsolesClientImpl(NetworkCloudImpl client) { + ConsolesClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(ConsolesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudConsoles to be used by the proxy service to perform REST - * calls. + * The interface defining all the services for NetworkCloudManagementClientConsoles to be used by the proxy service + * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudConsoles") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientConsoles") public interface ConsolesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByVirtualMachine(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualMachineName") String virtualMachineName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByVirtualMachineSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualMachineName") String virtualMachineName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @PathParam("consoleName") String consoleName, @@ -108,88 +86,104 @@ Mono> get(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @PathParam("consoleName") String consoleName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @PathParam("consoleName") String consoleName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") ConsoleInner consoleParameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConsoleInner consoleParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @PathParam("consoleName") String consoleName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") ConsoleInner consoleParameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConsoleInner consoleParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @PathParam("consoleName") String consoleName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConsolePatchParameters consoleUpdateParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @PathParam("consoleName") String consoleName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConsolePatchParameters consoleUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @PathParam("consoleName") String consoleName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") ConsolePatchParameters consoleUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @PathParam("consoleName") String consoleName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") ConsolePatchParameters consoleUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByVirtualMachine(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualMachineName") String virtualMachineName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByVirtualMachineSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualMachineName") String virtualMachineName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByVirtualMachineNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -197,236 +191,11 @@ Mono> listByVirtualMachineNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByVirtualMachineNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List consoles of the virtual machine. - * - * Get a list of consoles for the provided virtual machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 consoles for the provided virtual machine along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByVirtualMachineSinglePageAsync(String resourceGroupName, - String virtualMachineName, Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByVirtualMachine(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, top, skipToken, 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 consoles of the virtual machine. - * - * Get a list of consoles for the provided virtual machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 consoles for the provided virtual machine as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByVirtualMachineAsync(String resourceGroupName, String virtualMachineName, - Integer top, String skipToken) { - return new PagedFlux<>( - () -> listByVirtualMachineSinglePageAsync(resourceGroupName, virtualMachineName, top, skipToken), - nextLink -> listByVirtualMachineNextSinglePageAsync(nextLink)); - } - - /** - * List consoles of the virtual machine. - * - * Get a list of consoles for the provided virtual machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 consoles for the provided virtual machine as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByVirtualMachineAsync(String resourceGroupName, String virtualMachineName) { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>( - () -> listByVirtualMachineSinglePageAsync(resourceGroupName, virtualMachineName, top, skipToken), - nextLink -> listByVirtualMachineNextSinglePageAsync(nextLink)); - } - - /** - * List consoles of the virtual machine. - * - * Get a list of consoles for the provided virtual machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 consoles for the provided virtual machine along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByVirtualMachineSinglePage(String resourceGroupName, - String virtualMachineName, Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listByVirtualMachineSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, top, - skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List consoles of the virtual machine. - * - * Get a list of consoles for the provided virtual machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 consoles for the provided virtual machine along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByVirtualMachineSinglePage(String resourceGroupName, - String virtualMachineName, Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listByVirtualMachineSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, top, - skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List consoles of the virtual machine. - * - * Get a list of consoles for the provided virtual machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 consoles for the provided virtual machine as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByVirtualMachine(String resourceGroupName, String virtualMachineName) { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>( - () -> listByVirtualMachineSinglePage(resourceGroupName, virtualMachineName, top, skipToken), - nextLink -> listByVirtualMachineNextSinglePage(nextLink)); - } - - /** - * List consoles of the virtual machine. - * - * Get a list of consoles for the provided virtual machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 consoles for the provided virtual machine as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByVirtualMachine(String resourceGroupName, String virtualMachineName, - Integer top, String skipToken, Context context) { - return new PagedIterable<>( - () -> listByVirtualMachineSinglePage(resourceGroupName, virtualMachineName, top, skipToken, context), - nextLink -> listByVirtualMachineNextSinglePage(nextLink, context)); - } - - /** - * Retrieve the virtual machine console. - * * Get properties of the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -441,25 +210,6 @@ public PagedIterable listByVirtualMachine(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String virtualMachineName, String consoleName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (consoleName == null) { - return Mono.error(new IllegalArgumentException("Parameter consoleName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -468,8 +218,6 @@ private Mono> getWithResponseAsync(String resourceGroupNa } /** - * Retrieve the virtual machine console. - * * Get properties of the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -487,8 +235,6 @@ private Mono getAsync(String resourceGroupName, String virtualMach } /** - * Retrieve the virtual machine console. - * * Get properties of the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -503,36 +249,12 @@ private Mono getAsync(String resourceGroupName, String virtualMach @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String virtualMachineName, String consoleName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (consoleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter consoleName is required and cannot be null.")); - } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, consoleName, accept, context); } /** - * Retrieve the virtual machine console. - * * Get properties of the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -549,8 +271,6 @@ public ConsoleInner get(String resourceGroupName, String virtualMachineName, Str } /** - * Create or update the virtual machine console. - * * Create a new virtual machine console or update the properties of the existing virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -571,42 +291,16 @@ public ConsoleInner get(String resourceGroupName, String virtualMachineName, Str private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String virtualMachineName, String consoleName, ConsoleInner consoleParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (consoleName == null) { - return Mono.error(new IllegalArgumentException("Parameter consoleName is required and cannot be null.")); - } - if (consoleParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter consoleParameters is required and cannot be null.")); - } else { - consoleParameters.validate(); - } + 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, virtualMachineName, consoleName, ifMatch, - ifNoneMatch, consoleParameters, accept, context)) + ifNoneMatch, contentType, accept, consoleParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update the virtual machine console. - * * Create a new virtual machine console or update the properties of the existing virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -626,43 +320,14 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String virtualMachineName, String consoleName, ConsoleInner consoleParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (consoleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter consoleName is required and cannot be null.")); - } - if (consoleParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter consoleParameters is required and cannot be null.")); - } else { - consoleParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, - consoleParameters, accept, Context.NONE); + contentType, accept, consoleParameters, Context.NONE); } /** - * Create or update the virtual machine console. - * * Create a new virtual machine console or update the properties of the existing virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -683,43 +348,14 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String virtualMachineName, String consoleName, ConsoleInner consoleParameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (consoleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter consoleName is required and cannot be null.")); - } - if (consoleParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter consoleParameters is required and cannot be null.")); - } else { - consoleParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, - consoleParameters, accept, context); + contentType, accept, consoleParameters, context); } /** - * Create or update the virtual machine console. - * * Create a new virtual machine console or update the properties of the existing virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -747,8 +383,6 @@ private PollerFlux, ConsoleInner> beginCreateOrUpdateAs } /** - * Create or update the virtual machine console. - * * Create a new virtual machine console or update the properties of the existing virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -773,8 +407,6 @@ private PollerFlux, ConsoleInner> beginCreateOrUpdateAs } /** - * Create or update the virtual machine console. - * * Create a new virtual machine console or update the properties of the existing virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -802,8 +434,6 @@ public SyncPoller, ConsoleInner> beginCreateOrUpdate(St } /** - * Create or update the virtual machine console. - * * Create a new virtual machine console or update the properties of the existing virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -828,8 +458,6 @@ public SyncPoller, ConsoleInner> beginCreateOrUpdate(St } /** - * Create or update the virtual machine console. - * * Create a new virtual machine console or update the properties of the existing virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -858,8 +486,6 @@ public SyncPoller, ConsoleInner> beginCreateOrUpdate(St } /** - * Create or update the virtual machine console. - * * Create a new virtual machine console or update the properties of the existing virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -884,8 +510,6 @@ private Mono createOrUpdateAsync(String resourceGroupName, String } /** - * Create or update the virtual machine console. - * * Create a new virtual machine console or update the properties of the existing virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -908,8 +532,6 @@ private Mono createOrUpdateAsync(String resourceGroupName, String } /** - * Create or update the virtual machine console. - * * Create a new virtual machine console or update the properties of the existing virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -931,8 +553,6 @@ public ConsoleInner createOrUpdate(String resourceGroupName, String virtualMachi } /** - * Create or update the virtual machine console. - * * Create a new virtual machine console or update the properties of the existing virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -957,9 +577,8 @@ public ConsoleInner createOrUpdate(String resourceGroupName, String virtualMachi } /** - * Delete the virtual machine console. - * - * Delete the provided virtual machine console. + * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual + * machine console. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -968,46 +587,28 @@ public ConsoleInner createOrUpdate(String resourceGroupName, String virtualMachi * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param consoleUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return console represents the console of an on-premises Network Cloud virtual machine along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String virtualMachineName, String consoleName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (consoleName == null) { - return Mono.error(new IllegalArgumentException("Parameter consoleName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, + String virtualMachineName, String consoleName, String ifMatch, String ifNoneMatch, + ConsolePatchParameters consoleUpdateParameters) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, consoleName, ifMatch, - ifNoneMatch, accept, context)) + ifNoneMatch, accept, consoleUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the virtual machine console. - * - * Delete the provided virtual machine console. + * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual + * machine console. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1016,46 +617,25 @@ private Mono>> deleteWithResponseAsync(String resource * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param consoleUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return console represents the console of an on-premises Network Cloud virtual machine along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String virtualMachineName, - String consoleName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (consoleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter consoleName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String virtualMachineName, + String consoleName, String ifMatch, String ifNoneMatch, ConsolePatchParameters consoleUpdateParameters) { final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, - accept, Context.NONE); + accept, consoleUpdateParameters, Context.NONE); } /** - * Delete the virtual machine console. - * - * Delete the provided virtual machine console. + * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual + * machine console. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1064,47 +644,27 @@ private Response deleteWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param consoleUpdateParameters The request body. * @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}. + * @return console represents the console of an on-premises Network Cloud virtual machine along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String virtualMachineName, - String consoleName, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (consoleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter consoleName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String virtualMachineName, + String consoleName, String ifMatch, String ifNoneMatch, ConsolePatchParameters consoleUpdateParameters, + Context context) { final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, - accept, context); + accept, consoleUpdateParameters, context); } /** - * Delete the virtual machine console. - * - * Delete the provided virtual machine console. + * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual + * machine console. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1113,25 +673,26 @@ private Response deleteWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param consoleUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of console represents the console of an on-premises Network Cloud + * virtual machine. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginDeleteAsync( - String resourceGroupName, String virtualMachineName, String consoleName, String ifMatch, String ifNoneMatch) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, - this.client.getContext()); + private PollerFlux, ConsoleInner> beginUpdateAsync(String resourceGroupName, + String virtualMachineName, String consoleName, String ifMatch, String ifNoneMatch, + ConsolePatchParameters consoleUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, virtualMachineName, + consoleName, ifMatch, ifNoneMatch, consoleUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ConsoleInner.class, ConsoleInner.class, this.client.getContext()); } /** - * Delete the virtual machine console. - * - * Delete the provided virtual machine console. + * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual + * machine console. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1139,24 +700,24 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of console represents the console of an on-premises Network Cloud + * virtual machine. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String virtualMachineName, String consoleName) { + private PollerFlux, ConsoleInner> beginUpdateAsync(String resourceGroupName, + String virtualMachineName, String consoleName) { final String ifMatch = null; final String ifNoneMatch = null; - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, - this.client.getContext()); + final ConsolePatchParameters consoleUpdateParameters = null; + Mono>> mono = updateWithResponseAsync(resourceGroupName, virtualMachineName, + consoleName, ifMatch, ifNoneMatch, consoleUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ConsoleInner.class, ConsoleInner.class, this.client.getContext()); } /** - * Delete the virtual machine console. - * - * Delete the provided virtual machine console. + * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual + * machine console. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1165,24 +726,26 @@ private PollerFlux, OperationStatusResult * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param consoleUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of console represents the console of an on-premises Network Cloud + * virtual machine. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( - String resourceGroupName, String virtualMachineName, String consoleName, String ifMatch, String ifNoneMatch) { - Response response - = deleteWithResponse(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + public SyncPoller, ConsoleInner> beginUpdate(String resourceGroupName, + String virtualMachineName, String consoleName, String ifMatch, String ifNoneMatch, + ConsolePatchParameters consoleUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, virtualMachineName, consoleName, ifMatch, + ifNoneMatch, consoleUpdateParameters); + return this.client.getLroResult(response, ConsoleInner.class, ConsoleInner.class, + Context.NONE); } /** - * Delete the virtual machine console. - * - * Delete the provided virtual machine console. + * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual + * machine console. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1190,23 +753,24 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of console represents the console of an on-premises Network Cloud + * virtual machine. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String virtualMachineName, String consoleName) { + public SyncPoller, ConsoleInner> beginUpdate(String resourceGroupName, + String virtualMachineName, String consoleName) { final String ifMatch = null; final String ifNoneMatch = null; - Response response - = deleteWithResponse(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + final ConsolePatchParameters consoleUpdateParameters = null; + Response response = updateWithResponse(resourceGroupName, virtualMachineName, consoleName, ifMatch, + ifNoneMatch, consoleUpdateParameters); + return this.client.getLroResult(response, ConsoleInner.class, ConsoleInner.class, + Context.NONE); } /** - * Delete the virtual machine console. - * - * Delete the provided virtual machine console. + * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual + * machine console. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1215,26 +779,27 @@ public SyncPoller, OperationStatusResultI * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param consoleUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of console represents the console of an on-premises Network Cloud + * virtual machine. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( - String resourceGroupName, String virtualMachineName, String consoleName, String ifMatch, String ifNoneMatch, - Context context) { - Response response - = deleteWithResponse(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + public SyncPoller, ConsoleInner> beginUpdate(String resourceGroupName, + String virtualMachineName, String consoleName, String ifMatch, String ifNoneMatch, + ConsolePatchParameters consoleUpdateParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, virtualMachineName, consoleName, ifMatch, + ifNoneMatch, consoleUpdateParameters, context); + return this.client.getLroResult(response, ConsoleInner.class, ConsoleInner.class, + context); } /** - * Delete the virtual machine console. - * - * Delete the provided virtual machine console. + * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual + * machine console. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1243,22 +808,23 @@ public SyncPoller, OperationStatusResultI * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param consoleUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return console represents the console of an on-premises Network Cloud virtual machine on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String virtualMachineName, - String consoleName, String ifMatch, String ifNoneMatch) { - return beginDeleteAsync(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String virtualMachineName, String consoleName, + String ifMatch, String ifNoneMatch, ConsolePatchParameters consoleUpdateParameters) { + return beginUpdateAsync(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, + consoleUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the virtual machine console. - * - * Delete the provided virtual machine console. + * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual + * machine console. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1266,21 +832,21 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return console represents the console of an on-premises Network Cloud virtual machine on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String virtualMachineName, - String consoleName) { + private Mono updateAsync(String resourceGroupName, String virtualMachineName, String consoleName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginDeleteAsync(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + final ConsolePatchParameters consoleUpdateParameters = null; + return beginUpdateAsync(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, + consoleUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the virtual machine console. - * - * Delete the provided virtual machine console. + * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual + * machine console. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1288,19 +854,20 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return console represents the console of an on-premises Network Cloud virtual machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String virtualMachineName, String consoleName) { + public ConsoleInner update(String resourceGroupName, String virtualMachineName, String consoleName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginDelete(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch).getFinalResult(); + final ConsolePatchParameters consoleUpdateParameters = null; + return beginUpdate(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, + consoleUpdateParameters).getFinalResult(); } /** - * Delete the virtual machine console. - * - * Delete the provided virtual machine console. + * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual + * machine console. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1309,24 +876,22 @@ public OperationStatusResultInner delete(String resourceGroupName, String virtua * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param consoleUpdateParameters The request body. * @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. + * @return console represents the console of an on-premises Network Cloud virtual machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String virtualMachineName, String consoleName, - String ifMatch, String ifNoneMatch, Context context) { - return beginDelete(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, context) - .getFinalResult(); + public ConsoleInner update(String resourceGroupName, String virtualMachineName, String consoleName, String ifMatch, + String ifNoneMatch, ConsolePatchParameters consoleUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, + consoleUpdateParameters, context).getFinalResult(); } /** - * Patch the virtual machine console. - * - * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual - * machine console. Properties and tag updates can be done independently. + * Delete the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1335,52 +900,23 @@ public OperationStatusResultInner delete(String resourceGroupName, String virtua * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param consoleUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return console represents the console of an on-premises Network Cloud virtual machine along with - * {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String virtualMachineName, String consoleName, String ifMatch, String ifNoneMatch, - ConsolePatchParameters consoleUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (consoleName == null) { - return Mono.error(new IllegalArgumentException("Parameter consoleName is required and cannot be null.")); - } - if (consoleUpdateParameters != null) { - consoleUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String virtualMachineName, String consoleName, String ifMatch, String ifNoneMatch) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, consoleName, ifMatch, - ifNoneMatch, consoleUpdateParameters, accept, context)) + ifNoneMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Patch the virtual machine console. - * - * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual - * machine console. Properties and tag updates can be done independently. + * Delete the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1389,52 +925,21 @@ private Mono>> updateWithResponseAsync(String resource * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param consoleUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return console represents the console of an on-premises Network Cloud virtual machine along with - * {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String virtualMachineName, - String consoleName, String ifMatch, String ifNoneMatch, ConsolePatchParameters consoleUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (consoleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter consoleName is required and cannot be null.")); - } - if (consoleUpdateParameters != null) { - consoleUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + private Response deleteWithResponse(String resourceGroupName, String virtualMachineName, + String consoleName, String ifMatch, String ifNoneMatch) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, - consoleUpdateParameters, accept, Context.NONE); + Context.NONE); } /** - * Patch the virtual machine console. - * - * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual - * machine console. Properties and tag updates can be done independently. + * Delete the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1443,54 +948,22 @@ private Response updateWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param consoleUpdateParameters The request body. * @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 console represents the console of an on-premises Network Cloud virtual machine along with - * {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String virtualMachineName, - String consoleName, String ifMatch, String ifNoneMatch, ConsolePatchParameters consoleUpdateParameters, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (consoleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter consoleName is required and cannot be null.")); - } - if (consoleUpdateParameters != null) { - consoleUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + private Response deleteWithResponse(String resourceGroupName, String virtualMachineName, + String consoleName, String ifMatch, String ifNoneMatch, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, - consoleUpdateParameters, accept, context); + context); } /** - * Patch the virtual machine console. - * - * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual - * machine console. Properties and tag updates can be done independently. + * Delete the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1499,28 +972,22 @@ private Response updateWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param consoleUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 console represents the console of an on-premises Network Cloud - * virtual machine. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ConsoleInner> beginUpdateAsync(String resourceGroupName, - String virtualMachineName, String consoleName, String ifMatch, String ifNoneMatch, - ConsolePatchParameters consoleUpdateParameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, virtualMachineName, - consoleName, ifMatch, ifNoneMatch, consoleUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ConsoleInner.class, ConsoleInner.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String virtualMachineName, + String consoleName, String ifMatch, String ifNoneMatch) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Patch the virtual machine console. - * - * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual - * machine console. Properties and tag updates can be done independently. + * Delete the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1528,26 +995,21 @@ private PollerFlux, ConsoleInner> beginUpdateAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 console represents the console of an on-premises Network Cloud - * virtual machine. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ConsoleInner> beginUpdateAsync(String resourceGroupName, - String virtualMachineName, String consoleName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String virtualMachineName, + String consoleName) { final String ifMatch = null; final String ifNoneMatch = null; - final ConsolePatchParameters consoleUpdateParameters = null; - Mono>> mono = updateWithResponseAsync(resourceGroupName, virtualMachineName, - consoleName, ifMatch, ifNoneMatch, consoleUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ConsoleInner.class, ConsoleInner.class, this.client.getContext()); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Patch the virtual machine console. - * - * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual - * machine console. Properties and tag updates can be done independently. + * Delete the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1556,28 +1018,21 @@ private PollerFlux, ConsoleInner> beginUpdateAsync(Stri * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param consoleUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 console represents the console of an on-premises Network Cloud - * virtual machine. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConsoleInner> beginUpdate(String resourceGroupName, - String virtualMachineName, String consoleName, String ifMatch, String ifNoneMatch, - ConsolePatchParameters consoleUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, virtualMachineName, consoleName, ifMatch, - ifNoneMatch, consoleUpdateParameters); - return this.client.getLroResult(response, ConsoleInner.class, ConsoleInner.class, - Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualMachineName, + String consoleName, String ifMatch, String ifNoneMatch) { + Response response + = deleteWithResponse(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Patch the virtual machine console. - * - * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual - * machine console. Properties and tag updates can be done independently. + * Delete the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1585,26 +1040,20 @@ public SyncPoller, ConsoleInner> beginUpdate(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 console represents the console of an on-premises Network Cloud - * virtual machine. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConsoleInner> beginUpdate(String resourceGroupName, - String virtualMachineName, String consoleName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualMachineName, + String consoleName) { final String ifMatch = null; final String ifNoneMatch = null; - final ConsolePatchParameters consoleUpdateParameters = null; - Response response = updateWithResponse(resourceGroupName, virtualMachineName, consoleName, ifMatch, - ifNoneMatch, consoleUpdateParameters); - return this.client.getLroResult(response, ConsoleInner.class, ConsoleInner.class, - Context.NONE); + Response response + = deleteWithResponse(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Patch the virtual machine console. - * - * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual - * machine console. Properties and tag updates can be done independently. + * Delete the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1613,29 +1062,22 @@ public SyncPoller, ConsoleInner> beginUpdate(String res * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param consoleUpdateParameters The request body. * @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 console represents the console of an on-premises Network Cloud - * virtual machine. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConsoleInner> beginUpdate(String resourceGroupName, - String virtualMachineName, String consoleName, String ifMatch, String ifNoneMatch, - ConsolePatchParameters consoleUpdateParameters, Context context) { - Response response = updateWithResponse(resourceGroupName, virtualMachineName, consoleName, ifMatch, - ifNoneMatch, consoleUpdateParameters, context); - return this.client.getLroResult(response, ConsoleInner.class, ConsoleInner.class, - context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualMachineName, + String consoleName, String ifMatch, String ifNoneMatch, Context context) { + Response response + = deleteWithResponse(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Patch the virtual machine console. - * - * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual - * machine console. Properties and tag updates can be done independently. + * Delete the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1644,25 +1086,20 @@ public SyncPoller, ConsoleInner> beginUpdate(String res * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param consoleUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return console represents the console of an on-premises Network Cloud virtual machine on successful completion - * of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String virtualMachineName, String consoleName, - String ifMatch, String ifNoneMatch, ConsolePatchParameters consoleUpdateParameters) { - return beginUpdateAsync(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, - consoleUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + private Mono deleteAsync(String resourceGroupName, String virtualMachineName, String consoleName, + String ifMatch, String ifNoneMatch) { + return beginDeleteAsync(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Patch the virtual machine console. - * - * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual - * machine console. Properties and tag updates can be done independently. + * Delete the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1670,23 +1107,18 @@ private Mono updateAsync(String resourceGroupName, String virtualM * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return console represents the console of an on-premises Network Cloud virtual machine on successful completion - * of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String virtualMachineName, String consoleName) { + private Mono deleteAsync(String resourceGroupName, String virtualMachineName, String consoleName) { final String ifMatch = null; final String ifNoneMatch = null; - final ConsolePatchParameters consoleUpdateParameters = null; - return beginUpdateAsync(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, - consoleUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + return beginDeleteAsync(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Patch the virtual machine console. - * - * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual - * machine console. Properties and tag updates can be done independently. + * Delete the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1694,22 +1126,16 @@ private Mono updateAsync(String resourceGroupName, String virtualM * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return console represents the console of an on-premises Network Cloud virtual machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConsoleInner update(String resourceGroupName, String virtualMachineName, String consoleName) { + public void delete(String resourceGroupName, String virtualMachineName, String consoleName) { final String ifMatch = null; final String ifNoneMatch = null; - final ConsolePatchParameters consoleUpdateParameters = null; - return beginUpdate(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, - consoleUpdateParameters).getFinalResult(); + beginDelete(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch).getFinalResult(); } /** - * Patch the virtual machine console. - * - * Patch the properties of the provided virtual machine console, or update the tags associated with the virtual - * machine console. Properties and tag updates can be done independently. + * Delete the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. @@ -1718,23 +1144,175 @@ public ConsoleInner update(String resourceGroupName, String virtualMachineName, * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param consoleUpdateParameters The request body. * @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 console represents the console of an on-premises Network Cloud virtual machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConsoleInner update(String resourceGroupName, String virtualMachineName, String consoleName, String ifMatch, - String ifNoneMatch, ConsolePatchParameters consoleUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, - consoleUpdateParameters, context).getFinalResult(); + public void delete(String resourceGroupName, String virtualMachineName, String consoleName, String ifMatch, + String ifNoneMatch, Context context) { + beginDelete(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, context).getFinalResult(); + } + + /** + * Get a list of consoles for the provided virtual machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 consoles for the provided virtual machine along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVirtualMachineSinglePageAsync(String resourceGroupName, + String virtualMachineName, Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByVirtualMachine(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, top, skipToken, 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 a list of consoles for the provided virtual machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 consoles for the provided virtual machine as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVirtualMachineAsync(String resourceGroupName, String virtualMachineName, + Integer top, String skipToken) { + return new PagedFlux<>( + () -> listByVirtualMachineSinglePageAsync(resourceGroupName, virtualMachineName, top, skipToken), + nextLink -> listByVirtualMachineNextSinglePageAsync(nextLink)); } /** - * List consoles of the virtual machine. + * Get a list of consoles for the provided virtual machine. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 consoles for the provided virtual machine as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVirtualMachineAsync(String resourceGroupName, String virtualMachineName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>( + () -> listByVirtualMachineSinglePageAsync(resourceGroupName, virtualMachineName, top, skipToken), + nextLink -> listByVirtualMachineNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of consoles for the provided virtual machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 consoles for the provided virtual machine along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVirtualMachineSinglePage(String resourceGroupName, + String virtualMachineName, Integer top, String skipToken) { + final String accept = "application/json"; + Response res = service.listByVirtualMachineSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, top, + skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of consoles for the provided virtual machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 consoles for the provided virtual machine along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVirtualMachineSinglePage(String resourceGroupName, + String virtualMachineName, Integer top, String skipToken, Context context) { + final String accept = "application/json"; + Response res = service.listByVirtualMachineSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, top, + skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of consoles for the provided virtual machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 consoles for the provided virtual machine as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVirtualMachine(String resourceGroupName, String virtualMachineName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>( + () -> listByVirtualMachineSinglePage(resourceGroupName, virtualMachineName, top, skipToken), + nextLink -> listByVirtualMachineNextSinglePage(nextLink)); + } + + /** + * Get a list of consoles for the provided virtual machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 consoles for the provided virtual machine as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVirtualMachine(String resourceGroupName, String virtualMachineName, + Integer top, String skipToken, Context context) { + return new PagedIterable<>( + () -> listByVirtualMachineSinglePage(resourceGroupName, virtualMachineName, top, skipToken, context), + nextLink -> listByVirtualMachineNextSinglePage(nextLink, context)); + } + + /** * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1746,13 +1324,6 @@ public ConsoleInner update(String resourceGroupName, String virtualMachineName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByVirtualMachineNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1763,8 +1334,6 @@ private Mono> listByVirtualMachineNextSinglePageAsyn } /** - * List consoles of the virtual machine. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1775,15 +1344,6 @@ private Mono> listByVirtualMachineNextSinglePageAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByVirtualMachineNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByVirtualMachineNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1792,8 +1352,6 @@ private PagedResponse listByVirtualMachineNextSinglePage(String ne } /** - * List consoles of the virtual machine. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1805,21 +1363,10 @@ private PagedResponse listByVirtualMachineNextSinglePage(String ne */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByVirtualMachineNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByVirtualMachineNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(ConsolesClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ConsolesImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ConsolesImpl.java index 61c5eebdc519..356d1f3d2ce5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ConsolesImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ConsolesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -11,10 +11,8 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.ConsolesClient; import com.azure.resourcemanager.networkcloud.fluent.models.ConsoleInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.Console; import com.azure.resourcemanager.networkcloud.models.Consoles; -import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; public final class ConsolesImpl implements Consoles { private static final ClientLogger LOGGER = new ClientLogger(ConsolesImpl.class); @@ -29,29 +27,12 @@ public ConsolesImpl(ConsolesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByVirtualMachine(String resourceGroupName, String virtualMachineName) { - PagedIterable inner - = this.serviceClient().listByVirtualMachine(resourceGroupName, virtualMachineName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ConsoleImpl(inner1, this.manager())); - } - - public PagedIterable listByVirtualMachine(String resourceGroupName, String virtualMachineName, Integer top, - String skipToken, Context context) { - PagedIterable inner - = this.serviceClient().listByVirtualMachine(resourceGroupName, virtualMachineName, top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ConsoleImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String virtualMachineName, String consoleName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, virtualMachineName, consoleName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ConsoleImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ConsoleImpl(inner.getValue(), this.manager())); } public Console get(String resourceGroupName, String virtualMachineName, String consoleName) { @@ -63,25 +44,26 @@ public Console get(String resourceGroupName, String virtualMachineName, String c } } - public OperationStatusResult delete(String resourceGroupName, String virtualMachineName, String consoleName) { - OperationStatusResultInner inner - = this.serviceClient().delete(resourceGroupName, virtualMachineName, consoleName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String virtualMachineName, String consoleName) { + this.serviceClient().delete(resourceGroupName, virtualMachineName, consoleName); } - public OperationStatusResult delete(String resourceGroupName, String virtualMachineName, String consoleName, - String ifMatch, String ifNoneMatch, Context context) { - OperationStatusResultInner inner = this.serviceClient() - .delete(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String virtualMachineName, String consoleName, String ifMatch, + String ifNoneMatch, Context context) { + this.serviceClient().delete(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, context); + } + + public PagedIterable listByVirtualMachine(String resourceGroupName, String virtualMachineName) { + PagedIterable inner + = this.serviceClient().listByVirtualMachine(resourceGroupName, virtualMachineName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ConsoleImpl(inner1, this.manager())); + } + + public PagedIterable listByVirtualMachine(String resourceGroupName, String virtualMachineName, Integer top, + String skipToken, Context context) { + PagedIterable inner + = this.serviceClient().listByVirtualMachine(resourceGroupName, virtualMachineName, top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ConsoleImpl(inner1, this.manager())); } public Console getById(String id) { @@ -122,7 +104,7 @@ public Response getByIdWithResponse(String id, Context context) { return this.getWithResponse(resourceGroupName, virtualMachineName, consoleName, context); } - public OperationStatusResult deleteById(String id) { + public void deleteById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -140,12 +122,10 @@ public OperationStatusResult deleteById(String id) { } String localIfMatch = null; String localIfNoneMatch = null; - return this.delete(resourceGroupName, virtualMachineName, consoleName, localIfMatch, localIfNoneMatch, - Context.NONE); + this.delete(resourceGroupName, virtualMachineName, consoleName, localIfMatch, localIfNoneMatch, Context.NONE); } - public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, - Context context) { + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -161,7 +141,7 @@ public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'consoles'.", id))); } - return this.delete(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, context); + this.delete(resourceGroupName, virtualMachineName, consoleName, ifMatch, ifNoneMatch, context); } private ConsolesClient serviceClient() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterFeatureImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterFeatureImpl.java index 93befa606cfe..4d4fd765bdaf 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterFeatureImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterFeatureImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -58,6 +58,15 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public List options() { + List inner = this.innerModel().options(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public KubernetesClusterFeatureAvailabilityLifecycle availabilityLifecycle() { return this.innerModel().availabilityLifecycle(); } @@ -70,19 +79,6 @@ public String detailedStatusMessage() { return this.innerModel().detailedStatusMessage(); } - public List options() { - List inner = this.innerModel().options(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public KubernetesClusterFeatureProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - public KubernetesClusterFeatureRequired required() { return this.innerModel().required(); } @@ -91,6 +87,10 @@ public String version() { return this.innerModel().version(); } + public KubernetesClusterFeatureProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public Region region() { return Region.fromName(this.regionName()); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterFeaturesClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterFeaturesClientImpl.java index 026540e1a393..b2d54d6b4a33 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterFeaturesClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterFeaturesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -31,13 +31,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.KubernetesClusterFeaturesClient; import com.azure.resourcemanager.networkcloud.fluent.models.KubernetesClusterFeatureInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; -import com.azure.resourcemanager.networkcloud.models.KubernetesClusterFeatureList; +import com.azure.resourcemanager.networkcloud.implementation.models.KubernetesClusterFeatureList; import com.azure.resourcemanager.networkcloud.models.KubernetesClusterFeaturePatchParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,51 +53,31 @@ public final class KubernetesClusterFeaturesClientImpl implements KubernetesClus /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of KubernetesClusterFeaturesClientImpl. * * @param client the instance of the service client containing this operation class. */ - KubernetesClusterFeaturesClientImpl(NetworkCloudImpl client) { + KubernetesClusterFeaturesClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(KubernetesClusterFeaturesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudKubernetesClusterFeatures to be used by the proxy service - * to perform REST calls. + * The interface defining all the services for NetworkCloudManagementClientKubernetesClusterFeatures to be used by + * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudKubernetesClusterFeatures") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientKubernetesClusterFeatures") public interface KubernetesClusterFeaturesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByKubernetesCluster(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("kubernetesClusterName") String kubernetesClusterName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByKubernetesClusterSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("kubernetesClusterName") String kubernetesClusterName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @@ -109,92 +87,112 @@ Mono> get(@HostParam("$host") String end @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @PathParam("featureName") String featureName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @PathParam("featureName") String featureName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") KubernetesClusterFeatureInner kubernetesClusterFeatureParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @PathParam("featureName") String featureName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") KubernetesClusterFeatureInner kubernetesClusterFeatureParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @PathParam("featureName") String featureName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters, + Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @PathParam("featureName") String featureName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters, + Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @PathParam("featureName") String featureName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @PathParam("featureName") String featureName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByKubernetesCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("kubernetesClusterName") String kubernetesClusterName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByKubernetesClusterSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("kubernetesClusterName") String kubernetesClusterName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByKubernetesClusterNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -202,238 +200,11 @@ Mono> listByKubernetesClusterNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByKubernetesClusterNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List features for the Kubernetes cluster. - * - * Get a list of features for the provided Kubernetes cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 features for the provided Kubernetes cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByKubernetesClusterSinglePageAsync( - String resourceGroupName, String kubernetesClusterName, Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByKubernetesCluster(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, - top, skipToken, 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 features for the Kubernetes cluster. - * - * Get a list of features for the provided Kubernetes cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 features for the provided Kubernetes cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByKubernetesClusterAsync(String resourceGroupName, - String kubernetesClusterName, Integer top, String skipToken) { - return new PagedFlux<>( - () -> listByKubernetesClusterSinglePageAsync(resourceGroupName, kubernetesClusterName, top, skipToken), - nextLink -> listByKubernetesClusterNextSinglePageAsync(nextLink)); - } - - /** - * List features for the Kubernetes cluster. - * - * Get a list of features for the provided Kubernetes cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 features for the provided Kubernetes cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByKubernetesClusterAsync(String resourceGroupName, - String kubernetesClusterName) { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>( - () -> listByKubernetesClusterSinglePageAsync(resourceGroupName, kubernetesClusterName, top, skipToken), - nextLink -> listByKubernetesClusterNextSinglePageAsync(nextLink)); - } - - /** - * List features for the Kubernetes cluster. - * - * Get a list of features for the provided Kubernetes cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 features for the provided Kubernetes cluster along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByKubernetesClusterSinglePage(String resourceGroupName, - String kubernetesClusterName, Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listByKubernetesClusterSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, top, - skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List features for the Kubernetes cluster. - * - * Get a list of features for the provided Kubernetes cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 features for the provided Kubernetes cluster along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByKubernetesClusterSinglePage(String resourceGroupName, - String kubernetesClusterName, Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listByKubernetesClusterSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, top, - skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List features for the Kubernetes cluster. - * - * Get a list of features for the provided Kubernetes cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 features for the provided Kubernetes cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByKubernetesCluster(String resourceGroupName, - String kubernetesClusterName) { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>( - () -> listByKubernetesClusterSinglePage(resourceGroupName, kubernetesClusterName, top, skipToken), - nextLink -> listByKubernetesClusterNextSinglePage(nextLink)); - } - - /** - * List features for the Kubernetes cluster. - * - * Get a list of features for the provided Kubernetes cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 features for the provided Kubernetes cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByKubernetesCluster(String resourceGroupName, - String kubernetesClusterName, Integer top, String skipToken, Context context) { - return new PagedIterable<>( - () -> listByKubernetesClusterSinglePage(resourceGroupName, kubernetesClusterName, top, skipToken, context), - nextLink -> listByKubernetesClusterNextSinglePage(nextLink, context)); - } - - /** - * Retrieve the Kubernetes cluster feature. - * * Get properties of the provided the Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -448,25 +219,6 @@ public PagedIterable listByKubernetesCluster(Stri @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String kubernetesClusterName, String featureName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (featureName == null) { - return Mono.error(new IllegalArgumentException("Parameter featureName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, featureName, accept, context)) @@ -474,8 +226,6 @@ private Mono> getWithResponseAsync(Strin } /** - * Retrieve the Kubernetes cluster feature. - * * Get properties of the provided the Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -494,8 +244,6 @@ private Mono getAsync(String resourceGroupName, S } /** - * Retrieve the Kubernetes cluster feature. - * * Get properties of the provided the Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -510,36 +258,12 @@ private Mono getAsync(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String kubernetesClusterName, String featureName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (featureName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter featureName is required and cannot be null.")); - } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, featureName, accept, context); } /** - * Retrieve the Kubernetes cluster feature. - * * Get properties of the provided the Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -557,8 +281,6 @@ public KubernetesClusterFeatureInner get(String resourceGroupName, String kubern } /** - * Create or update the Kubernetes cluster feature. - * * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -579,42 +301,16 @@ public KubernetesClusterFeatureInner get(String resourceGroupName, String kubern private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String kubernetesClusterName, String featureName, KubernetesClusterFeatureInner kubernetesClusterFeatureParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (featureName == null) { - return Mono.error(new IllegalArgumentException("Parameter featureName is required and cannot be null.")); - } - if (kubernetesClusterFeatureParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter kubernetesClusterFeatureParameters is required and cannot be null.")); - } else { - kubernetesClusterFeatureParameters.validate(); - } + 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, kubernetesClusterName, featureName, ifMatch, - ifNoneMatch, kubernetesClusterFeatureParameters, accept, context)) + ifNoneMatch, contentType, accept, kubernetesClusterFeatureParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update the Kubernetes cluster feature. - * * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -634,44 +330,14 @@ private Mono>> createOrUpdateWithResponseAsync(String private Response createOrUpdateWithResponse(String resourceGroupName, String kubernetesClusterName, String featureName, KubernetesClusterFeatureInner kubernetesClusterFeatureParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (featureName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter featureName is required and cannot be null.")); - } - if (kubernetesClusterFeatureParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter kubernetesClusterFeatureParameters is required and cannot be null.")); - } else { - kubernetesClusterFeatureParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, featureName, ifMatch, - ifNoneMatch, kubernetesClusterFeatureParameters, accept, Context.NONE); + ifNoneMatch, contentType, accept, kubernetesClusterFeatureParameters, Context.NONE); } /** - * Create or update the Kubernetes cluster feature. - * * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -692,44 +358,14 @@ private Response createOrUpdateWithResponse(String resourceGroupName private Response createOrUpdateWithResponse(String resourceGroupName, String kubernetesClusterName, String featureName, KubernetesClusterFeatureInner kubernetesClusterFeatureParameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (featureName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter featureName is required and cannot be null.")); - } - if (kubernetesClusterFeatureParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter kubernetesClusterFeatureParameters is required and cannot be null.")); - } else { - kubernetesClusterFeatureParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, featureName, ifMatch, - ifNoneMatch, kubernetesClusterFeatureParameters, accept, context); + ifNoneMatch, contentType, accept, kubernetesClusterFeatureParameters, context); } /** - * Create or update the Kubernetes cluster feature. - * * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -758,8 +394,6 @@ private Response createOrUpdateWithResponse(String resourceGroupName } /** - * Create or update the Kubernetes cluster feature. - * * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -786,8 +420,6 @@ private Response createOrUpdateWithResponse(String resourceGroupName } /** - * Create or update the Kubernetes cluster feature. - * * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -815,8 +447,6 @@ public SyncPoller, KubernetesClusterFe } /** - * Create or update the Kubernetes cluster feature. - * * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -842,8 +472,6 @@ public SyncPoller, KubernetesClusterFe } /** - * Create or update the Kubernetes cluster feature. - * * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -873,8 +501,6 @@ public SyncPoller, KubernetesClusterFe } /** - * Create or update the Kubernetes cluster feature. - * * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -901,8 +527,6 @@ private Mono createOrUpdateAsync(String resourceG } /** - * Create or update the Kubernetes cluster feature. - * * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -927,8 +551,6 @@ private Mono createOrUpdateAsync(String resourceG } /** - * Create or update the Kubernetes cluster feature. - * * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -950,8 +572,6 @@ public KubernetesClusterFeatureInner createOrUpdate(String resourceGroupName, St } /** - * Create or update the Kubernetes cluster feature. - * * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -977,9 +597,7 @@ public KubernetesClusterFeatureInner createOrUpdate(String resourceGroupName, St } /** - * Delete the Kubernetes cluster feature. - * - * Delete the provided Kubernetes cluster feature. + * Patch properties of the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -988,46 +606,27 @@ public KubernetesClusterFeatureInner createOrUpdate(String resourceGroupName, St * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterFeatureUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return kubernetesClusterFeature represents the feature of a Kubernetes cluster along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String kubernetesClusterName, String featureName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (featureName == null) { - return Mono.error(new IllegalArgumentException("Parameter featureName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, + String kubernetesClusterName, String featureName, String ifMatch, String ifNoneMatch, + KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, featureName, ifMatch, - ifNoneMatch, accept, context)) + ifNoneMatch, accept, kubernetesClusterFeatureUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the Kubernetes cluster feature. - * - * Delete the provided Kubernetes cluster feature. + * Patch properties of the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1036,46 +635,24 @@ private Mono>> deleteWithResponseAsync(String resource * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterFeatureUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return kubernetesClusterFeature represents the feature of a Kubernetes cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String kubernetesClusterName, - String featureName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (featureName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter featureName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String kubernetesClusterName, + String featureName, String ifMatch, String ifNoneMatch, + KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters) { final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, featureName, ifMatch, - ifNoneMatch, accept, Context.NONE); + ifNoneMatch, accept, kubernetesClusterFeatureUpdateParameters, Context.NONE); } /** - * Delete the Kubernetes cluster feature. - * - * Delete the provided Kubernetes cluster feature. + * Patch properties of the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1084,47 +661,25 @@ private Response deleteWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterFeatureUpdateParameters The request body. * @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}. + * @return kubernetesClusterFeature represents the feature of a Kubernetes cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String kubernetesClusterName, - String featureName, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (featureName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter featureName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String kubernetesClusterName, + String featureName, String ifMatch, String ifNoneMatch, + KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters, Context context) { final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, featureName, ifMatch, - ifNoneMatch, accept, context); + ifNoneMatch, accept, kubernetesClusterFeatureUpdateParameters, context); } /** - * Delete the Kubernetes cluster feature. - * - * Delete the provided Kubernetes cluster feature. + * Patch properties of the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1133,26 +688,26 @@ private Response deleteWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterFeatureUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of kubernetesClusterFeature represents the feature of a Kubernetes + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginDeleteAsync( - String resourceGroupName, String kubernetesClusterName, String featureName, String ifMatch, - String ifNoneMatch) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + private PollerFlux, KubernetesClusterFeatureInner> beginUpdateAsync( + String resourceGroupName, String kubernetesClusterName, String featureName, String ifMatch, String ifNoneMatch, + KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, kubernetesClusterName, + featureName, ifMatch, ifNoneMatch, kubernetesClusterFeatureUpdateParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), KubernetesClusterFeatureInner.class, KubernetesClusterFeatureInner.class, this.client.getContext()); } /** - * Delete the Kubernetes cluster feature. - * - * Delete the provided Kubernetes cluster feature. + * Patch properties of the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1160,24 +715,24 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of kubernetesClusterFeature represents the feature of a Kubernetes + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String kubernetesClusterName, String featureName) { + private PollerFlux, KubernetesClusterFeatureInner> + beginUpdateAsync(String resourceGroupName, String kubernetesClusterName, String featureName) { final String ifMatch = null; final String ifNoneMatch = null; - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + final KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters = null; + Mono>> mono = updateWithResponseAsync(resourceGroupName, kubernetesClusterName, + featureName, ifMatch, ifNoneMatch, kubernetesClusterFeatureUpdateParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), KubernetesClusterFeatureInner.class, KubernetesClusterFeatureInner.class, this.client.getContext()); } /** - * Delete the Kubernetes cluster feature. - * - * Delete the provided Kubernetes cluster feature. + * Patch properties of the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1186,25 +741,25 @@ private PollerFlux, OperationStatusResult * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterFeatureUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of kubernetesClusterFeature represents the feature of a Kubernetes + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( - String resourceGroupName, String kubernetesClusterName, String featureName, String ifMatch, - String ifNoneMatch) { - Response response - = deleteWithResponse(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + public SyncPoller, KubernetesClusterFeatureInner> beginUpdate( + String resourceGroupName, String kubernetesClusterName, String featureName, String ifMatch, String ifNoneMatch, + KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, kubernetesClusterName, featureName, + ifMatch, ifNoneMatch, kubernetesClusterFeatureUpdateParameters); + return this.client.getLroResult(response, + KubernetesClusterFeatureInner.class, KubernetesClusterFeatureInner.class, Context.NONE); } /** - * Delete the Kubernetes cluster feature. - * - * Delete the provided Kubernetes cluster feature. + * Patch properties of the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1212,23 +767,23 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of kubernetesClusterFeature represents the feature of a Kubernetes + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String kubernetesClusterName, String featureName) { + public SyncPoller, KubernetesClusterFeatureInner> + beginUpdate(String resourceGroupName, String kubernetesClusterName, String featureName) { final String ifMatch = null; final String ifNoneMatch = null; - Response response - = deleteWithResponse(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + final KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters = null; + Response response = updateWithResponse(resourceGroupName, kubernetesClusterName, featureName, + ifMatch, ifNoneMatch, kubernetesClusterFeatureUpdateParameters); + return this.client.getLroResult(response, + KubernetesClusterFeatureInner.class, KubernetesClusterFeatureInner.class, Context.NONE); } /** - * Delete the Kubernetes cluster feature. - * - * Delete the provided Kubernetes cluster feature. + * Patch properties of the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1237,26 +792,26 @@ public SyncPoller, OperationStatusResultI * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterFeatureUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of kubernetesClusterFeature represents the feature of a Kubernetes + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( + public SyncPoller, KubernetesClusterFeatureInner> beginUpdate( String resourceGroupName, String kubernetesClusterName, String featureName, String ifMatch, String ifNoneMatch, - Context context) { - Response response - = deleteWithResponse(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, kubernetesClusterName, featureName, + ifMatch, ifNoneMatch, kubernetesClusterFeatureUpdateParameters, context); + return this.client.getLroResult(response, + KubernetesClusterFeatureInner.class, KubernetesClusterFeatureInner.class, context); } /** - * Delete the Kubernetes cluster feature. - * - * Delete the provided Kubernetes cluster feature. + * Patch properties of the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1265,22 +820,23 @@ public SyncPoller, OperationStatusResultI * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterFeatureUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return kubernetesClusterFeature represents the feature of a Kubernetes cluster on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String kubernetesClusterName, - String featureName, String ifMatch, String ifNoneMatch) { - return beginDeleteAsync(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String kubernetesClusterName, + String featureName, String ifMatch, String ifNoneMatch, + KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters) { + return beginUpdateAsync(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch, + kubernetesClusterFeatureUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the Kubernetes cluster feature. - * - * Delete the provided Kubernetes cluster feature. + * Patch properties of the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1288,21 +844,21 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return kubernetesClusterFeature represents the feature of a Kubernetes cluster on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String kubernetesClusterName, + private Mono updateAsync(String resourceGroupName, String kubernetesClusterName, String featureName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginDeleteAsync(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + final KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters = null; + return beginUpdateAsync(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch, + kubernetesClusterFeatureUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the Kubernetes cluster feature. - * - * Delete the provided Kubernetes cluster feature. + * Patch properties of the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1310,21 +866,20 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return kubernetesClusterFeature represents the feature of a Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String kubernetesClusterName, + public KubernetesClusterFeatureInner update(String resourceGroupName, String kubernetesClusterName, String featureName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginDelete(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch) - .getFinalResult(); + final KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters = null; + return beginUpdate(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch, + kubernetesClusterFeatureUpdateParameters).getFinalResult(); } /** - * Delete the Kubernetes cluster feature. - * - * Delete the provided Kubernetes cluster feature. + * Patch properties of the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1333,23 +888,23 @@ public OperationStatusResultInner delete(String resourceGroupName, String kubern * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterFeatureUpdateParameters The request body. * @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. + * @return kubernetesClusterFeature represents the feature of a Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String kubernetesClusterName, String featureName, - String ifMatch, String ifNoneMatch, Context context) { - return beginDelete(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch, context) - .getFinalResult(); + public KubernetesClusterFeatureInner update(String resourceGroupName, String kubernetesClusterName, + String featureName, String ifMatch, String ifNoneMatch, + KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch, + kubernetesClusterFeatureUpdateParameters, context).getFinalResult(); } /** - * Patch the Kubernetes cluster feature. - * - * Patch properties of the provided Kubernetes cluster feature. + * Delete the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1358,51 +913,23 @@ public OperationStatusResultInner delete(String resourceGroupName, String kubern * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterFeatureUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return kubernetesClusterFeature represents the feature of a Kubernetes cluster along with {@link Response} on - * successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String kubernetesClusterName, String featureName, String ifMatch, String ifNoneMatch, - KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (featureName == null) { - return Mono.error(new IllegalArgumentException("Parameter featureName is required and cannot be null.")); - } - if (kubernetesClusterFeatureUpdateParameters != null) { - kubernetesClusterFeatureUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String kubernetesClusterName, String featureName, String ifMatch, String ifNoneMatch) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, featureName, ifMatch, - ifNoneMatch, kubernetesClusterFeatureUpdateParameters, accept, context)) + ifNoneMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Patch the Kubernetes cluster feature. - * - * Patch properties of the provided Kubernetes cluster feature. + * Delete the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1411,51 +938,21 @@ private Mono>> updateWithResponseAsync(String resource * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterFeatureUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return kubernetesClusterFeature represents the feature of a Kubernetes cluster along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String kubernetesClusterName, - String featureName, String ifMatch, String ifNoneMatch, - KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (featureName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter featureName is required and cannot be null.")); - } - if (kubernetesClusterFeatureUpdateParameters != null) { - kubernetesClusterFeatureUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + private Response deleteWithResponse(String resourceGroupName, String kubernetesClusterName, + String featureName, String ifMatch, String ifNoneMatch) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, featureName, ifMatch, - ifNoneMatch, kubernetesClusterFeatureUpdateParameters, accept, Context.NONE); + ifNoneMatch, Context.NONE); } /** - * Patch the Kubernetes cluster feature. - * - * Patch properties of the provided Kubernetes cluster feature. + * Delete the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1464,52 +961,22 @@ private Response updateWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterFeatureUpdateParameters The request body. * @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 kubernetesClusterFeature represents the feature of a Kubernetes cluster along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String kubernetesClusterName, - String featureName, String ifMatch, String ifNoneMatch, - KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (featureName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter featureName is required and cannot be null.")); - } - if (kubernetesClusterFeatureUpdateParameters != null) { - kubernetesClusterFeatureUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + private Response deleteWithResponse(String resourceGroupName, String kubernetesClusterName, + String featureName, String ifMatch, String ifNoneMatch, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, featureName, ifMatch, - ifNoneMatch, kubernetesClusterFeatureUpdateParameters, accept, context); + ifNoneMatch, context); } /** - * Patch the Kubernetes cluster feature. - * - * Patch properties of the provided Kubernetes cluster feature. + * Delete the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1518,28 +985,22 @@ private Response updateWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterFeatureUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 kubernetesClusterFeature represents the feature of a Kubernetes - * cluster. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, KubernetesClusterFeatureInner> beginUpdateAsync( - String resourceGroupName, String kubernetesClusterName, String featureName, String ifMatch, String ifNoneMatch, - KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, kubernetesClusterName, - featureName, ifMatch, ifNoneMatch, kubernetesClusterFeatureUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), KubernetesClusterFeatureInner.class, KubernetesClusterFeatureInner.class, + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String kubernetesClusterName, + String featureName, String ifMatch, String ifNoneMatch) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Patch the Kubernetes cluster feature. - * - * Patch properties of the provided Kubernetes cluster feature. + * Delete the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1547,26 +1008,21 @@ private PollerFlux, KubernetesClusterF * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 kubernetesClusterFeature represents the feature of a Kubernetes - * cluster. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, KubernetesClusterFeatureInner> - beginUpdateAsync(String resourceGroupName, String kubernetesClusterName, String featureName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String kubernetesClusterName, + String featureName) { final String ifMatch = null; final String ifNoneMatch = null; - final KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters = null; - Mono>> mono = updateWithResponseAsync(resourceGroupName, kubernetesClusterName, - featureName, ifMatch, ifNoneMatch, kubernetesClusterFeatureUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), KubernetesClusterFeatureInner.class, KubernetesClusterFeatureInner.class, + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Patch the Kubernetes cluster feature. - * - * Patch properties of the provided Kubernetes cluster feature. + * Delete the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1575,27 +1031,21 @@ private PollerFlux, KubernetesClusterF * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterFeatureUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 kubernetesClusterFeature represents the feature of a Kubernetes - * cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, KubernetesClusterFeatureInner> beginUpdate( - String resourceGroupName, String kubernetesClusterName, String featureName, String ifMatch, String ifNoneMatch, - KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, kubernetesClusterName, featureName, - ifMatch, ifNoneMatch, kubernetesClusterFeatureUpdateParameters); - return this.client.getLroResult(response, - KubernetesClusterFeatureInner.class, KubernetesClusterFeatureInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String kubernetesClusterName, + String featureName, String ifMatch, String ifNoneMatch) { + Response response + = deleteWithResponse(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Patch the Kubernetes cluster feature. - * - * Patch properties of the provided Kubernetes cluster feature. + * Delete the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1603,25 +1053,20 @@ public SyncPoller, KubernetesClusterFe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 kubernetesClusterFeature represents the feature of a Kubernetes - * cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, KubernetesClusterFeatureInner> - beginUpdate(String resourceGroupName, String kubernetesClusterName, String featureName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String kubernetesClusterName, + String featureName) { final String ifMatch = null; final String ifNoneMatch = null; - final KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters = null; - Response response = updateWithResponse(resourceGroupName, kubernetesClusterName, featureName, - ifMatch, ifNoneMatch, kubernetesClusterFeatureUpdateParameters); - return this.client.getLroResult(response, - KubernetesClusterFeatureInner.class, KubernetesClusterFeatureInner.class, Context.NONE); + Response response + = deleteWithResponse(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Patch the Kubernetes cluster feature. - * - * Patch properties of the provided Kubernetes cluster feature. + * Delete the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1630,28 +1075,22 @@ public SyncPoller, KubernetesClusterFe * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterFeatureUpdateParameters The request body. * @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 kubernetesClusterFeature represents the feature of a Kubernetes - * cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, KubernetesClusterFeatureInner> beginUpdate( - String resourceGroupName, String kubernetesClusterName, String featureName, String ifMatch, String ifNoneMatch, - KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters, Context context) { - Response response = updateWithResponse(resourceGroupName, kubernetesClusterName, featureName, - ifMatch, ifNoneMatch, kubernetesClusterFeatureUpdateParameters, context); - return this.client.getLroResult(response, - KubernetesClusterFeatureInner.class, KubernetesClusterFeatureInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String kubernetesClusterName, + String featureName, String ifMatch, String ifNoneMatch, Context context) { + Response response + = deleteWithResponse(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Patch the Kubernetes cluster feature. - * - * Patch properties of the provided Kubernetes cluster feature. + * Delete the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1660,25 +1099,20 @@ public SyncPoller, KubernetesClusterFe * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterFeatureUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return kubernetesClusterFeature represents the feature of a Kubernetes cluster on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String kubernetesClusterName, - String featureName, String ifMatch, String ifNoneMatch, - KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters) { - return beginUpdateAsync(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch, - kubernetesClusterFeatureUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + private Mono deleteAsync(String resourceGroupName, String kubernetesClusterName, String featureName, + String ifMatch, String ifNoneMatch) { + return beginDeleteAsync(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Patch the Kubernetes cluster feature. - * - * Patch properties of the provided Kubernetes cluster feature. + * Delete the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1686,23 +1120,18 @@ private Mono updateAsync(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return kubernetesClusterFeature represents the feature of a Kubernetes cluster on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String kubernetesClusterName, - String featureName) { + private Mono deleteAsync(String resourceGroupName, String kubernetesClusterName, String featureName) { final String ifMatch = null; final String ifNoneMatch = null; - final KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters = null; - return beginUpdateAsync(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch, - kubernetesClusterFeatureUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + return beginDeleteAsync(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Patch the Kubernetes cluster feature. - * - * Patch properties of the provided Kubernetes cluster feature. + * Delete the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1710,22 +1139,16 @@ private Mono updateAsync(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return kubernetesClusterFeature represents the feature of a Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public KubernetesClusterFeatureInner update(String resourceGroupName, String kubernetesClusterName, - String featureName) { + public void delete(String resourceGroupName, String kubernetesClusterName, String featureName) { final String ifMatch = null; final String ifNoneMatch = null; - final KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters = null; - return beginUpdate(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch, - kubernetesClusterFeatureUpdateParameters).getFinalResult(); + beginDelete(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch).getFinalResult(); } /** - * Patch the Kubernetes cluster feature. - * - * Patch properties of the provided Kubernetes cluster feature. + * Delete the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. @@ -1734,24 +1157,178 @@ public KubernetesClusterFeatureInner update(String resourceGroupName, String kub * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterFeatureUpdateParameters The request body. * @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 kubernetesClusterFeature represents the feature of a Kubernetes cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public KubernetesClusterFeatureInner update(String resourceGroupName, String kubernetesClusterName, - String featureName, String ifMatch, String ifNoneMatch, - KubernetesClusterFeaturePatchParameters kubernetesClusterFeatureUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch, - kubernetesClusterFeatureUpdateParameters, context).getFinalResult(); + public void delete(String resourceGroupName, String kubernetesClusterName, String featureName, String ifMatch, + String ifNoneMatch, Context context) { + beginDelete(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch, context) + .getFinalResult(); + } + + /** + * Get a list of features for the provided Kubernetes cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 features for the provided Kubernetes cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByKubernetesClusterSinglePageAsync( + String resourceGroupName, String kubernetesClusterName, Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByKubernetesCluster(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, + top, skipToken, 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 a list of features for the provided Kubernetes cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 features for the provided Kubernetes cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByKubernetesClusterAsync(String resourceGroupName, + String kubernetesClusterName, Integer top, String skipToken) { + return new PagedFlux<>( + () -> listByKubernetesClusterSinglePageAsync(resourceGroupName, kubernetesClusterName, top, skipToken), + nextLink -> listByKubernetesClusterNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of features for the provided Kubernetes cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 features for the provided Kubernetes cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByKubernetesClusterAsync(String resourceGroupName, + String kubernetesClusterName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>( + () -> listByKubernetesClusterSinglePageAsync(resourceGroupName, kubernetesClusterName, top, skipToken), + nextLink -> listByKubernetesClusterNextSinglePageAsync(nextLink)); } /** - * List features for the Kubernetes cluster. + * Get a list of features for the provided Kubernetes cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 features for the provided Kubernetes cluster along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByKubernetesClusterSinglePage(String resourceGroupName, + String kubernetesClusterName, Integer top, String skipToken) { + final String accept = "application/json"; + Response res = service.listByKubernetesClusterSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, top, + skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of features for the provided Kubernetes cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 features for the provided Kubernetes cluster along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByKubernetesClusterSinglePage(String resourceGroupName, + String kubernetesClusterName, Integer top, String skipToken, Context context) { + final String accept = "application/json"; + Response res = service.listByKubernetesClusterSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, top, + skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of features for the provided Kubernetes cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 features for the provided Kubernetes cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByKubernetesCluster(String resourceGroupName, + String kubernetesClusterName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>( + () -> listByKubernetesClusterSinglePage(resourceGroupName, kubernetesClusterName, top, skipToken), + nextLink -> listByKubernetesClusterNextSinglePage(nextLink)); + } + + /** + * Get a list of features for the provided Kubernetes cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 features for the provided Kubernetes cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByKubernetesCluster(String resourceGroupName, + String kubernetesClusterName, Integer top, String skipToken, Context context) { + return new PagedIterable<>( + () -> listByKubernetesClusterSinglePage(resourceGroupName, kubernetesClusterName, top, skipToken, context), + nextLink -> listByKubernetesClusterNextSinglePage(nextLink, context)); + } + + /** * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1764,13 +1341,6 @@ public KubernetesClusterFeatureInner update(String resourceGroupName, String kub @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByKubernetesClusterNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1781,8 +1351,6 @@ public KubernetesClusterFeatureInner update(String resourceGroupName, String kub } /** - * List features for the Kubernetes cluster. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1793,15 +1361,6 @@ public KubernetesClusterFeatureInner update(String resourceGroupName, String kub */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByKubernetesClusterNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByKubernetesClusterNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1810,8 +1369,6 @@ private PagedResponse listByKubernetesClusterNext } /** - * List features for the Kubernetes cluster. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1824,21 +1381,10 @@ private PagedResponse listByKubernetesClusterNext @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByKubernetesClusterNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByKubernetesClusterNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(KubernetesClusterFeaturesClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterFeaturesImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterFeaturesImpl.java index 6a41a2aca1ae..44586db81b6a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterFeaturesImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterFeaturesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -11,10 +11,8 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.KubernetesClusterFeaturesClient; import com.azure.resourcemanager.networkcloud.fluent.models.KubernetesClusterFeatureInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.KubernetesClusterFeature; import com.azure.resourcemanager.networkcloud.models.KubernetesClusterFeatures; -import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; public final class KubernetesClusterFeaturesImpl implements KubernetesClusterFeatures { private static final ClientLogger LOGGER = new ClientLogger(KubernetesClusterFeaturesImpl.class); @@ -29,30 +27,12 @@ public KubernetesClusterFeaturesImpl(KubernetesClusterFeaturesClient innerClient this.serviceManager = serviceManager; } - public PagedIterable listByKubernetesCluster(String resourceGroupName, - String kubernetesClusterName) { - PagedIterable inner - = this.serviceClient().listByKubernetesCluster(resourceGroupName, kubernetesClusterName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new KubernetesClusterFeatureImpl(inner1, this.manager())); - } - - public PagedIterable listByKubernetesCluster(String resourceGroupName, - String kubernetesClusterName, Integer top, String skipToken, Context context) { - PagedIterable inner = this.serviceClient() - .listByKubernetesCluster(resourceGroupName, kubernetesClusterName, top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new KubernetesClusterFeatureImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String kubernetesClusterName, String featureName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, kubernetesClusterName, featureName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new KubernetesClusterFeatureImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new KubernetesClusterFeatureImpl(inner.getValue(), this.manager())); } public KubernetesClusterFeature get(String resourceGroupName, String kubernetesClusterName, String featureName) { @@ -65,25 +45,28 @@ public KubernetesClusterFeature get(String resourceGroupName, String kubernetesC } } - public OperationStatusResult delete(String resourceGroupName, String kubernetesClusterName, String featureName) { - OperationStatusResultInner inner - = this.serviceClient().delete(resourceGroupName, kubernetesClusterName, featureName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String kubernetesClusterName, String featureName) { + this.serviceClient().delete(resourceGroupName, kubernetesClusterName, featureName); } - public OperationStatusResult delete(String resourceGroupName, String kubernetesClusterName, String featureName, - String ifMatch, String ifNoneMatch, Context context) { - OperationStatusResultInner inner = this.serviceClient() + public void delete(String resourceGroupName, String kubernetesClusterName, String featureName, String ifMatch, + String ifNoneMatch, Context context) { + this.serviceClient() .delete(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + } + + public PagedIterable listByKubernetesCluster(String resourceGroupName, + String kubernetesClusterName) { + PagedIterable inner + = this.serviceClient().listByKubernetesCluster(resourceGroupName, kubernetesClusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new KubernetesClusterFeatureImpl(inner1, this.manager())); + } + + public PagedIterable listByKubernetesCluster(String resourceGroupName, + String kubernetesClusterName, Integer top, String skipToken, Context context) { + PagedIterable inner = this.serviceClient() + .listByKubernetesCluster(resourceGroupName, kubernetesClusterName, top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new KubernetesClusterFeatureImpl(inner1, this.manager())); } public KubernetesClusterFeature getById(String id) { @@ -124,7 +107,7 @@ public Response getByIdWithResponse(String id, Context return this.getWithResponse(resourceGroupName, kubernetesClusterName, featureName, context); } - public OperationStatusResult deleteById(String id) { + public void deleteById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -142,12 +125,11 @@ public OperationStatusResult deleteById(String id) { } String localIfMatch = null; String localIfNoneMatch = null; - return this.delete(resourceGroupName, kubernetesClusterName, featureName, localIfMatch, localIfNoneMatch, + this.delete(resourceGroupName, kubernetesClusterName, featureName, localIfMatch, localIfNoneMatch, Context.NONE); } - public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, - Context context) { + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -163,7 +145,7 @@ public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'features'.", id))); } - return this.delete(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch, context); + this.delete(resourceGroupName, kubernetesClusterName, featureName, ifMatch, ifNoneMatch, context); } private KubernetesClusterFeaturesClient serviceClient() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterImpl.java index 26cf845f4c9b..e30aea5a4bce 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -81,6 +81,31 @@ public AdministratorConfiguration administratorConfiguration() { return this.innerModel().administratorConfiguration(); } + public ControlPlaneNodeConfiguration controlPlaneNodeConfiguration() { + return this.innerModel().controlPlaneNodeConfiguration(); + } + + public List initialAgentPoolConfigurations() { + List inner = this.innerModel().initialAgentPoolConfigurations(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String kubernetesVersion() { + return this.innerModel().kubernetesVersion(); + } + + public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { + return this.innerModel().managedResourceGroupConfiguration(); + } + + public NetworkConfiguration networkConfiguration() { + return this.innerModel().networkConfiguration(); + } + public List attachedNetworkIds() { List inner = this.innerModel().attachedNetworkIds(); if (inner != null) { @@ -111,10 +136,6 @@ public String controlPlaneKubernetesVersion() { return this.innerModel().controlPlaneKubernetesVersion(); } - public ControlPlaneNodeConfiguration controlPlaneNodeConfiguration() { - return this.innerModel().controlPlaneNodeConfiguration(); - } - public KubernetesClusterDetailedStatus detailedStatus() { return this.innerModel().detailedStatus(); } @@ -132,27 +153,6 @@ public List featureStatuses() { } } - public List initialAgentPoolConfigurations() { - List inner = this.innerModel().initialAgentPoolConfigurations(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String kubernetesVersion() { - return this.innerModel().kubernetesVersion(); - } - - public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { - return this.innerModel().managedResourceGroupConfiguration(); - } - - public NetworkConfiguration networkConfiguration() { - return this.innerModel().networkConfiguration(); - } - public List nodes() { List inner = this.innerModel().nodes(); if (inner != null) { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClustersClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClustersClientImpl.java index 85403b557b9a..e09b669976f9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClustersClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClustersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -32,15 +32,14 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.KubernetesClustersClient; import com.azure.resourcemanager.networkcloud.fluent.models.KubernetesClusterInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; -import com.azure.resourcemanager.networkcloud.models.KubernetesClusterList; +import com.azure.resourcemanager.networkcloud.implementation.models.KubernetesClusterList; import com.azure.resourcemanager.networkcloud.models.KubernetesClusterPatchParameters; import com.azure.resourcemanager.networkcloud.models.KubernetesClusterRestartNodeParameters; +import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -57,67 +56,31 @@ public final class KubernetesClustersClientImpl implements KubernetesClustersCli /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of KubernetesClustersClientImpl. * * @param client the instance of the service client containing this operation class. */ - KubernetesClustersClientImpl(NetworkCloudImpl client) { + KubernetesClustersClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(KubernetesClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudKubernetesClusters to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for NetworkCloudManagementClientKubernetesClusters to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudKubernetesClusters") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientKubernetesClusters") public interface KubernetesClustersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/kubernetesClusters") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/kubernetesClusters") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @HeaderParam("Accept") String accept, @@ -127,637 +90,548 @@ Mono> getByResourceGroup(@HostParam("$host") St @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") KubernetesClusterInner kubernetesClusterParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") KubernetesClusterInner kubernetesClusterParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") KubernetesClusterInner kubernetesClusterParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") KubernetesClusterInner kubernetesClusterParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") KubernetesClusterPatchParameters kubernetesClusterUpdateParameters, + Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") KubernetesClusterPatchParameters kubernetesClusterUpdateParameters, + Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") KubernetesClusterPatchParameters kubernetesClusterUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") KubernetesClusterPatchParameters kubernetesClusterUpdateParameters, + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/kubernetesClusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/kubernetesClusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/restartNode") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restartNode(@HostParam("$host") String endpoint, + Mono>> restartNode(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/restartNode") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response restartNodeSync(@HostParam("$host") String endpoint, + Response restartNodeSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("kubernetesClusterName") String kubernetesClusterName, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + 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 listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + 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> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listBySubscriptionNext( + @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("$host") String endpoint, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List Kubernetes clusters in the subscription. - * - * Get a list of Kubernetes clusters in the provided subscription. + * Get properties of the provided the Kubernetes cluster. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Kubernetes clusters in the provided subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return properties of the provided the Kubernetes cluster along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String kubernetesClusterName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Kubernetes clusters in the subscription. - * - * Get a list of Kubernetes clusters in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Kubernetes clusters in the provided subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer top, String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List Kubernetes clusters in the subscription. - * - * Get a list of Kubernetes clusters in the provided subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Kubernetes clusters in the provided subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List Kubernetes clusters in the subscription. - * - * Get a list of Kubernetes clusters in the provided subscription. + * Get properties of the provided the Kubernetes cluster. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Kubernetes clusters in the provided subscription along with {@link PagedResponse}. + * @return properties of the provided the Kubernetes cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + private Mono getByResourceGroupAsync(String resourceGroupName, + String kubernetesClusterName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, kubernetesClusterName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List Kubernetes clusters in the subscription. - * - * Get a list of Kubernetes clusters in the provided subscription. + * Get properties of the provided the Kubernetes cluster. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. * @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 Kubernetes clusters in the provided subscription along with {@link PagedResponse}. + * @return properties of the provided the Kubernetes cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + public Response getByResourceGroupWithResponse(String resourceGroupName, + String kubernetesClusterName, Context context) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, accept, context); } /** - * List Kubernetes clusters in the subscription. - * - * Get a list of Kubernetes clusters in the provided subscription. + * Get properties of the provided the Kubernetes cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Kubernetes clusters in the provided subscription as paginated response with - * {@link PagedIterable}. + * @return properties of the provided the Kubernetes cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listSinglePage(top, skipToken), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public KubernetesClusterInner getByResourceGroup(String resourceGroupName, String kubernetesClusterName) { + return getByResourceGroupWithResponse(resourceGroupName, kubernetesClusterName, Context.NONE).getValue(); } /** - * List Kubernetes clusters in the subscription. - * - * Get a list of Kubernetes clusters in the provided subscription. + * Create a new Kubernetes cluster or update the properties of the existing one. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param kubernetesClusterParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Kubernetes clusters in the provided subscription as paginated response with - * {@link PagedIterable}. + * @return kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud along with {@link Response} + * on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Integer top, String skipToken, Context context) { - return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String kubernetesClusterName, KubernetesClusterInner kubernetesClusterParameters, String ifMatch, + String ifNoneMatch) { + 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, kubernetesClusterName, ifMatch, ifNoneMatch, + contentType, accept, kubernetesClusterParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Kubernetes clusters in the resource group. - * - * Get a list of Kubernetes clusters in the provided resource group. + * Create a new Kubernetes cluster or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param kubernetesClusterParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Kubernetes clusters in the provided resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String kubernetesClusterName, + KubernetesClusterInner kubernetesClusterParameters, String ifMatch, String ifNoneMatch) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, + contentType, accept, kubernetesClusterParameters, Context.NONE); } /** - * List Kubernetes clusters in the resource group. - * - * Get a list of Kubernetes clusters in the provided resource group. + * Create a new Kubernetes cluster or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param kubernetesClusterParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 Kubernetes clusters in the provided resource group as paginated response with - * {@link PagedFlux}. + * @return kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, - String skipToken) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String kubernetesClusterName, + KubernetesClusterInner kubernetesClusterParameters, String ifMatch, String ifNoneMatch, 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, kubernetesClusterName, ifMatch, ifNoneMatch, + contentType, accept, kubernetesClusterParameters, context); } /** - * List Kubernetes clusters in the resource group. - * - * Get a list of Kubernetes clusters in the provided resource group. + * Create a new Kubernetes cluster or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param kubernetesClusterParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Kubernetes clusters in the provided resource group as paginated response with - * {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of kubernetesCluster represents the Kubernetes cluster hosted on + * Network Cloud. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, KubernetesClusterInner> beginCreateOrUpdateAsync( + String resourceGroupName, String kubernetesClusterName, KubernetesClusterInner kubernetesClusterParameters, + String ifMatch, String ifNoneMatch) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + kubernetesClusterName, kubernetesClusterParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), KubernetesClusterInner.class, KubernetesClusterInner.class, + this.client.getContext()); } /** - * List Kubernetes clusters in the resource group. - * - * Get a list of Kubernetes clusters in the provided resource group. + * Create a new Kubernetes cluster or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param kubernetesClusterParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Kubernetes clusters in the provided resource group along with {@link PagedResponse}. + * @return the {@link PollerFlux} for polling of kubernetesCluster represents the Kubernetes cluster hosted on + * Network Cloud. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, KubernetesClusterInner> beginCreateOrUpdateAsync( + String resourceGroupName, String kubernetesClusterName, KubernetesClusterInner kubernetesClusterParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + kubernetesClusterName, kubernetesClusterParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), KubernetesClusterInner.class, KubernetesClusterInner.class, + this.client.getContext()); } /** - * List Kubernetes clusters in the resource group. - * - * Get a list of Kubernetes clusters in the provided resource group. + * Create a new Kubernetes cluster or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param kubernetesClusterParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Kubernetes clusters in the provided resource group along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + * @return the {@link SyncPoller} for polling of kubernetesCluster represents the Kubernetes cluster hosted on + * Network Cloud. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, KubernetesClusterInner> beginCreateOrUpdate( + String resourceGroupName, String kubernetesClusterName, KubernetesClusterInner kubernetesClusterParameters, + String ifMatch, String ifNoneMatch) { + Response response = createOrUpdateWithResponse(resourceGroupName, kubernetesClusterName, + kubernetesClusterParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, + KubernetesClusterInner.class, KubernetesClusterInner.class, Context.NONE); } /** - * List Kubernetes clusters in the resource group. - * - * Get a list of Kubernetes clusters in the provided resource group. + * Create a new Kubernetes cluster or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param kubernetesClusterParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Kubernetes clusters in the provided resource group as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of kubernetesCluster represents the Kubernetes cluster hosted on + * Network Cloud. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, KubernetesClusterInner> beginCreateOrUpdate( + String resourceGroupName, String kubernetesClusterName, KubernetesClusterInner kubernetesClusterParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Response response = createOrUpdateWithResponse(resourceGroupName, kubernetesClusterName, + kubernetesClusterParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, + KubernetesClusterInner.class, KubernetesClusterInner.class, Context.NONE); } /** - * List Kubernetes clusters in the resource group. - * - * Get a list of Kubernetes clusters in the provided resource group. + * Create a new Kubernetes cluster or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param kubernetesClusterParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 Kubernetes clusters in the provided resource group as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of kubernetesCluster represents the Kubernetes cluster hosted on + * Network Cloud. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, - String skipToken, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, KubernetesClusterInner> beginCreateOrUpdate( + String resourceGroupName, String kubernetesClusterName, KubernetesClusterInner kubernetesClusterParameters, + String ifMatch, String ifNoneMatch, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, kubernetesClusterName, + kubernetesClusterParameters, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, + KubernetesClusterInner.class, KubernetesClusterInner.class, context); } /** - * Retrieve the Kubernetes cluster. - * - * Get properties of the provided the Kubernetes cluster. + * Create a new Kubernetes cluster or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param kubernetesClusterParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided the Kubernetes cluster along with {@link Response} on successful completion of + * @return kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String kubernetesClusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono createOrUpdateAsync(String resourceGroupName, String kubernetesClusterName, + KubernetesClusterInner kubernetesClusterParameters, String ifMatch, String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, kubernetesClusterName, kubernetesClusterParameters, ifMatch, + ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieve the Kubernetes cluster. - * - * Get properties of the provided the Kubernetes cluster. + * Create a new Kubernetes cluster or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param kubernetesClusterParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided the Kubernetes cluster on successful completion of {@link Mono}. + * @return kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String kubernetesClusterName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, kubernetesClusterName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, String kubernetesClusterName, + KubernetesClusterInner kubernetesClusterParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdateAsync(resourceGroupName, kubernetesClusterName, kubernetesClusterParameters, ifMatch, + ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieve the Kubernetes cluster. - * - * Get properties of the provided the Kubernetes cluster. + * Create a new Kubernetes cluster or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param context The context to associate with this operation. + * @param kubernetesClusterParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided the Kubernetes cluster along with {@link Response}. + * @return kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String kubernetesClusterName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, accept, context); + public KubernetesClusterInner createOrUpdate(String resourceGroupName, String kubernetesClusterName, + KubernetesClusterInner kubernetesClusterParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdate(resourceGroupName, kubernetesClusterName, kubernetesClusterParameters, ifMatch, + ifNoneMatch).getFinalResult(); } /** - * Retrieve the Kubernetes cluster. - * - * Get properties of the provided the Kubernetes cluster. + * Create a new Kubernetes cluster or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param kubernetesClusterParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 properties of the provided the Kubernetes cluster. + * @return kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud. */ @ServiceMethod(returns = ReturnType.SINGLE) - public KubernetesClusterInner getByResourceGroup(String resourceGroupName, String kubernetesClusterName) { - return getByResourceGroupWithResponse(resourceGroupName, kubernetesClusterName, Context.NONE).getValue(); + public KubernetesClusterInner createOrUpdate(String resourceGroupName, String kubernetesClusterName, + KubernetesClusterInner kubernetesClusterParameters, String ifMatch, String ifNoneMatch, Context context) { + return beginCreateOrUpdate(resourceGroupName, kubernetesClusterName, kubernetesClusterParameters, ifMatch, + ifNoneMatch, context).getFinalResult(); } /** - * Create or update the Kubernetes cluster. - * - * Create a new Kubernetes cluster or update the properties of the existing one. + * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes + * cluster. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -765,102 +639,53 @@ public KubernetesClusterInner getByResourceGroup(String resourceGroupName, Strin * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String kubernetesClusterName, KubernetesClusterInner kubernetesClusterParameters, String ifMatch, - String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (kubernetesClusterParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter kubernetesClusterParameters is required and cannot be null.")); - } else { - kubernetesClusterParameters.validate(); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, + String kubernetesClusterName, String ifMatch, String ifNoneMatch, + KubernetesClusterPatchParameters kubernetesClusterUpdateParameters) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, - kubernetesClusterParameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, accept, + kubernetesClusterUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update the Kubernetes cluster. - * - * Create a new Kubernetes cluster or update the properties of the existing one. + * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes + * cluster. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String kubernetesClusterName, - KubernetesClusterInner kubernetesClusterParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (kubernetesClusterParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter kubernetesClusterParameters is required and cannot be null.")); - } else { - kubernetesClusterParameters.validate(); - } + private Response updateWithResponse(String resourceGroupName, String kubernetesClusterName, + String ifMatch, String ifNoneMatch, KubernetesClusterPatchParameters kubernetesClusterUpdateParameters) { final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, - kubernetesClusterParameters, accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, accept, + kubernetesClusterUpdateParameters, Context.NONE); } /** - * Create or update the Kubernetes cluster. - * - * Create a new Kubernetes cluster or update the properties of the existing one. + * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes + * cluster. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterUpdateParameters The request body. * @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. @@ -868,51 +693,26 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @return kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String kubernetesClusterName, - KubernetesClusterInner kubernetesClusterParameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (kubernetesClusterParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter kubernetesClusterParameters is required and cannot be null.")); - } else { - kubernetesClusterParameters.validate(); - } + private Response updateWithResponse(String resourceGroupName, String kubernetesClusterName, + String ifMatch, String ifNoneMatch, KubernetesClusterPatchParameters kubernetesClusterUpdateParameters, + Context context) { final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, - kubernetesClusterParameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, accept, + kubernetesClusterUpdateParameters, context); } /** - * Create or update the Kubernetes cluster. - * - * Create a new Kubernetes cluster or update the properties of the existing one. + * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes + * cluster. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -920,24 +720,22 @@ private Response createOrUpdateWithResponse(String resourceGroupName * Network Cloud. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, KubernetesClusterInner> beginCreateOrUpdateAsync( - String resourceGroupName, String kubernetesClusterName, KubernetesClusterInner kubernetesClusterParameters, - String ifMatch, String ifNoneMatch) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, - kubernetesClusterName, kubernetesClusterParameters, ifMatch, ifNoneMatch); + private PollerFlux, KubernetesClusterInner> beginUpdateAsync( + String resourceGroupName, String kubernetesClusterName, String ifMatch, String ifNoneMatch, + KubernetesClusterPatchParameters kubernetesClusterUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, kubernetesClusterName, + ifMatch, ifNoneMatch, kubernetesClusterUpdateParameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), KubernetesClusterInner.class, KubernetesClusterInner.class, this.client.getContext()); } /** - * Create or update the Kubernetes cluster. - * - * Create a new Kubernetes cluster or update the properties of the existing one. + * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes + * cluster. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -945,29 +743,29 @@ private PollerFlux, KubernetesClusterInner> b * Network Cloud. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, KubernetesClusterInner> beginCreateOrUpdateAsync( - String resourceGroupName, String kubernetesClusterName, KubernetesClusterInner kubernetesClusterParameters) { + private PollerFlux, KubernetesClusterInner> + beginUpdateAsync(String resourceGroupName, String kubernetesClusterName) { final String ifMatch = null; final String ifNoneMatch = null; - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, - kubernetesClusterName, kubernetesClusterParameters, ifMatch, ifNoneMatch); + final KubernetesClusterPatchParameters kubernetesClusterUpdateParameters = null; + Mono>> mono = updateWithResponseAsync(resourceGroupName, kubernetesClusterName, + ifMatch, ifNoneMatch, kubernetesClusterUpdateParameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), KubernetesClusterInner.class, KubernetesClusterInner.class, this.client.getContext()); } /** - * Create or update the Kubernetes cluster. - * - * Create a new Kubernetes cluster or update the properties of the existing one. + * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes + * cluster. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -975,23 +773,21 @@ private PollerFlux, KubernetesClusterInner> b * Network Cloud. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, KubernetesClusterInner> beginCreateOrUpdate( - String resourceGroupName, String kubernetesClusterName, KubernetesClusterInner kubernetesClusterParameters, - String ifMatch, String ifNoneMatch) { - Response response = createOrUpdateWithResponse(resourceGroupName, kubernetesClusterName, - kubernetesClusterParameters, ifMatch, ifNoneMatch); + public SyncPoller, KubernetesClusterInner> beginUpdate(String resourceGroupName, + String kubernetesClusterName, String ifMatch, String ifNoneMatch, + KubernetesClusterPatchParameters kubernetesClusterUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, kubernetesClusterName, ifMatch, + ifNoneMatch, kubernetesClusterUpdateParameters); return this.client.getLroResult(response, KubernetesClusterInner.class, KubernetesClusterInner.class, Context.NONE); } /** - * Create or update the Kubernetes cluster. - * - * Create a new Kubernetes cluster or update the properties of the existing one. + * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes + * cluster. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -999,28 +795,28 @@ public SyncPoller, KubernetesClusterInner> be * Network Cloud. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, KubernetesClusterInner> beginCreateOrUpdate( - String resourceGroupName, String kubernetesClusterName, KubernetesClusterInner kubernetesClusterParameters) { + public SyncPoller, KubernetesClusterInner> beginUpdate(String resourceGroupName, + String kubernetesClusterName) { final String ifMatch = null; final String ifNoneMatch = null; - Response response = createOrUpdateWithResponse(resourceGroupName, kubernetesClusterName, - kubernetesClusterParameters, ifMatch, ifNoneMatch); + final KubernetesClusterPatchParameters kubernetesClusterUpdateParameters = null; + Response response = updateWithResponse(resourceGroupName, kubernetesClusterName, ifMatch, + ifNoneMatch, kubernetesClusterUpdateParameters); return this.client.getLroResult(response, KubernetesClusterInner.class, KubernetesClusterInner.class, Context.NONE); } /** - * Create or update the Kubernetes cluster. - * - * Create a new Kubernetes cluster or update the properties of the existing one. + * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes + * cluster. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterUpdateParameters The request body. * @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. @@ -1029,27 +825,26 @@ public SyncPoller, KubernetesClusterInner> be * Network Cloud. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, KubernetesClusterInner> beginCreateOrUpdate( - String resourceGroupName, String kubernetesClusterName, KubernetesClusterInner kubernetesClusterParameters, - String ifMatch, String ifNoneMatch, Context context) { - Response response = createOrUpdateWithResponse(resourceGroupName, kubernetesClusterName, - kubernetesClusterParameters, ifMatch, ifNoneMatch, context); + public SyncPoller, KubernetesClusterInner> beginUpdate(String resourceGroupName, + String kubernetesClusterName, String ifMatch, String ifNoneMatch, + KubernetesClusterPatchParameters kubernetesClusterUpdateParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, kubernetesClusterName, ifMatch, + ifNoneMatch, kubernetesClusterUpdateParameters, context); return this.client.getLroResult(response, KubernetesClusterInner.class, KubernetesClusterInner.class, context); } /** - * Create or update the Kubernetes cluster. - * - * Create a new Kubernetes cluster or update the properties of the existing one. + * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes + * cluster. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1057,20 +852,18 @@ public SyncPoller, KubernetesClusterInner> be * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String kubernetesClusterName, - KubernetesClusterInner kubernetesClusterParameters, String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, kubernetesClusterName, kubernetesClusterParameters, ifMatch, - ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String kubernetesClusterName, + String ifMatch, String ifNoneMatch, KubernetesClusterPatchParameters kubernetesClusterUpdateParameters) { + return beginUpdateAsync(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, + kubernetesClusterUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update the Kubernetes cluster. - * - * Create a new Kubernetes cluster or update the properties of the existing one. + * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes + * cluster. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1078,48 +871,45 @@ private Mono createOrUpdateAsync(String resourceGroupNam * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String kubernetesClusterName, - KubernetesClusterInner kubernetesClusterParameters) { + private Mono updateAsync(String resourceGroupName, String kubernetesClusterName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, kubernetesClusterName, kubernetesClusterParameters, ifMatch, - ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + final KubernetesClusterPatchParameters kubernetesClusterUpdateParameters = null; + return beginUpdateAsync(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, + kubernetesClusterUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update the Kubernetes cluster. - * - * Create a new Kubernetes cluster or update the properties of the existing one. + * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes + * cluster. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud. */ @ServiceMethod(returns = ReturnType.SINGLE) - public KubernetesClusterInner createOrUpdate(String resourceGroupName, String kubernetesClusterName, - KubernetesClusterInner kubernetesClusterParameters) { + public KubernetesClusterInner update(String resourceGroupName, String kubernetesClusterName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateOrUpdate(resourceGroupName, kubernetesClusterName, kubernetesClusterParameters, ifMatch, - ifNoneMatch).getFinalResult(); + final KubernetesClusterPatchParameters kubernetesClusterUpdateParameters = null; + return beginUpdate(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, + kubernetesClusterUpdateParameters).getFinalResult(); } /** - * Create or update the Kubernetes cluster. - * - * Create a new Kubernetes cluster or update the properties of the existing one. + * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes + * cluster. Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param kubernetesClusterUpdateParameters The request body. * @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. @@ -1127,15 +917,13 @@ public KubernetesClusterInner createOrUpdate(String resourceGroupName, String ku * @return kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud. */ @ServiceMethod(returns = ReturnType.SINGLE) - public KubernetesClusterInner createOrUpdate(String resourceGroupName, String kubernetesClusterName, - KubernetesClusterInner kubernetesClusterParameters, String ifMatch, String ifNoneMatch, Context context) { - return beginCreateOrUpdate(resourceGroupName, kubernetesClusterName, kubernetesClusterParameters, ifMatch, - ifNoneMatch, context).getFinalResult(); + public KubernetesClusterInner update(String resourceGroupName, String kubernetesClusterName, String ifMatch, + String ifNoneMatch, KubernetesClusterPatchParameters kubernetesClusterUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, + kubernetesClusterUpdateParameters, context).getFinalResult(); } /** - * Delete the Kubernetes cluster. - * * Delete the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1147,39 +935,17 @@ public KubernetesClusterInner createOrUpdate(String resourceGroupName, String ku * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String kubernetesClusterName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, accept, - context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the Kubernetes cluster. - * * Delete the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1191,38 +957,17 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String kubernetesClusterName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, accept, + this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, Context.NONE); } /** - * Delete the Kubernetes cluster. - * * Delete the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1235,38 +980,16 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String kubernetesClusterName, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, accept, - context); + this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, context); } /** - * Delete the Kubernetes cluster. - * * Delete the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1278,21 +1001,18 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String kubernetesClusterName, String ifMatch, String ifNoneMatch) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String kubernetesClusterName, + String ifMatch, String ifNoneMatch) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the Kubernetes cluster. - * * Delete the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1300,23 +1020,20 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String kubernetesClusterName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String kubernetesClusterName) { final String ifMatch = null; final String ifNoneMatch = null; Mono>> mono = deleteWithResponseAsync(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the Kubernetes cluster. - * * Delete the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1328,20 +1045,17 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String kubernetesClusterName, String ifMatch, String ifNoneMatch) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String kubernetesClusterName, + String ifMatch, String ifNoneMatch) { Response response = deleteWithResponse(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the Kubernetes cluster. - * * Delete the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1349,22 +1063,18 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String kubernetesClusterName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String kubernetesClusterName) { final String ifMatch = null; final String ifNoneMatch = null; Response response = deleteWithResponse(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the Kubernetes cluster. - * * Delete the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1377,20 +1087,17 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( - String resourceGroupName, String kubernetesClusterName, String ifMatch, String ifNoneMatch, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String kubernetesClusterName, + String ifMatch, String ifNoneMatch, Context context) { Response response = deleteWithResponse(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Delete the Kubernetes cluster. - * * Delete the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1402,18 +1109,16 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String kubernetesClusterName, - String ifMatch, String ifNoneMatch) { + private Mono deleteAsync(String resourceGroupName, String kubernetesClusterName, String ifMatch, + String ifNoneMatch) { return beginDeleteAsync(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the Kubernetes cluster. - * * Delete the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1421,10 +1126,10 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String kubernetesClusterName) { + private Mono deleteAsync(String resourceGroupName, String kubernetesClusterName) { final String ifMatch = null; final String ifNoneMatch = null; return beginDeleteAsync(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch).last() @@ -1432,8 +1137,6 @@ private Mono deleteAsync(String resourceGroupName, S } /** - * Delete the Kubernetes cluster. - * * Delete the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1441,18 +1144,15 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String kubernetesClusterName) { + public void delete(String resourceGroupName, String kubernetesClusterName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginDelete(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch).getFinalResult(); + beginDelete(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch).getFinalResult(); } /** - * Delete the Kubernetes cluster. - * * Delete the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1465,404 +1165,294 @@ public OperationStatusResultInner delete(String resourceGroupName, String kubern * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 delete(String resourceGroupName, String kubernetesClusterName, String ifMatch, - String ifNoneMatch, Context context) { - return beginDelete(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, context).getFinalResult(); + public void delete(String resourceGroupName, String kubernetesClusterName, String ifMatch, String ifNoneMatch, + Context context) { + beginDelete(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, context).getFinalResult(); } /** - * Patch the Kubernetes cluster. - * - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes - * cluster. Properties and tag updates can be done independently. + * Get a list of Kubernetes clusters in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud along with {@link Response} - * on successful completion of {@link Mono}. + * @return a list of Kubernetes clusters in the provided resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String kubernetesClusterName, String ifMatch, String ifNoneMatch, - KubernetesClusterPatchParameters kubernetesClusterUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (kubernetesClusterUpdateParameters != null) { - kubernetesClusterUpdateParameters.validate(); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Integer top, String skipToken) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, - kubernetesClusterUpdateParameters, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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())); } /** - * Patch the Kubernetes cluster. + * Get a list of Kubernetes clusters in the provided resource group. * - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes - * cluster. Properties and tag updates can be done independently. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kubernetes clusters in the provided resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, + String skipToken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of Kubernetes clusters in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud along with {@link Response}. + * @return a list of Kubernetes clusters in the provided resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of Kubernetes clusters in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kubernetes clusters in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String kubernetesClusterName, - String ifMatch, String ifNoneMatch, KubernetesClusterPatchParameters kubernetesClusterUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (kubernetesClusterUpdateParameters != null) { - kubernetesClusterUpdateParameters.validate(); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken) { final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, - kubernetesClusterUpdateParameters, accept, Context.NONE); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the Kubernetes cluster. - * - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes - * cluster. Properties and tag updates can be done independently. + * Get a list of Kubernetes clusters in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud along with {@link Response}. + * @return a list of Kubernetes clusters in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String kubernetesClusterName, - String ifMatch, String ifNoneMatch, KubernetesClusterPatchParameters kubernetesClusterUpdateParameters, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (kubernetesClusterUpdateParameters != null) { - kubernetesClusterUpdateParameters.validate(); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken, Context context) { final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, - kubernetesClusterUpdateParameters, accept, context); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the Kubernetes cluster. - * - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes - * cluster. Properties and tag updates can be done independently. + * Get a list of Kubernetes clusters in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 kubernetesCluster represents the Kubernetes cluster hosted on - * Network Cloud. + * @return a list of Kubernetes clusters in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, KubernetesClusterInner> beginUpdateAsync( - String resourceGroupName, String kubernetesClusterName, String ifMatch, String ifNoneMatch, - KubernetesClusterPatchParameters kubernetesClusterUpdateParameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, kubernetesClusterName, - ifMatch, ifNoneMatch, kubernetesClusterUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), KubernetesClusterInner.class, KubernetesClusterInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Patch the Kubernetes cluster. - * - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes - * cluster. Properties and tag updates can be done independently. + * Get a list of Kubernetes clusters in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of kubernetesCluster represents the Kubernetes cluster hosted on - * Network Cloud. + * @return a list of Kubernetes clusters in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, KubernetesClusterInner> - beginUpdateAsync(String resourceGroupName, String kubernetesClusterName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final KubernetesClusterPatchParameters kubernetesClusterUpdateParameters = null; - Mono>> mono = updateWithResponseAsync(resourceGroupName, kubernetesClusterName, - ifMatch, ifNoneMatch, kubernetesClusterUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), KubernetesClusterInner.class, KubernetesClusterInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, + String skipToken, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Patch the Kubernetes cluster. - * - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes - * cluster. Properties and tag updates can be done independently. + * Get a list of Kubernetes clusters in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 kubernetesCluster represents the Kubernetes cluster hosted on - * Network Cloud. + * @return a list of Kubernetes clusters in the provided subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, KubernetesClusterInner> beginUpdate(String resourceGroupName, - String kubernetesClusterName, String ifMatch, String ifNoneMatch, - KubernetesClusterPatchParameters kubernetesClusterUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, kubernetesClusterName, ifMatch, - ifNoneMatch, kubernetesClusterUpdateParameters); - return this.client.getLroResult(response, - KubernetesClusterInner.class, KubernetesClusterInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, 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())); } /** - * Patch the Kubernetes cluster. - * - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes - * cluster. Properties and tag updates can be done independently. + * Get a list of Kubernetes clusters in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 kubernetesCluster represents the Kubernetes cluster hosted on - * Network Cloud. + * @return a list of Kubernetes clusters in the provided subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, KubernetesClusterInner> beginUpdate(String resourceGroupName, - String kubernetesClusterName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final KubernetesClusterPatchParameters kubernetesClusterUpdateParameters = null; - Response response = updateWithResponse(resourceGroupName, kubernetesClusterName, ifMatch, - ifNoneMatch, kubernetesClusterUpdateParameters); - return this.client.getLroResult(response, - KubernetesClusterInner.class, KubernetesClusterInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Integer top, String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Patch the Kubernetes cluster. - * - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes - * cluster. Properties and tag updates can be done independently. + * Get a list of Kubernetes clusters in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterUpdateParameters The request body. - * @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 kubernetesCluster represents the Kubernetes cluster hosted on - * Network Cloud. + * @return a list of Kubernetes clusters in the provided subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, KubernetesClusterInner> beginUpdate(String resourceGroupName, - String kubernetesClusterName, String ifMatch, String ifNoneMatch, - KubernetesClusterPatchParameters kubernetesClusterUpdateParameters, Context context) { - Response response = updateWithResponse(resourceGroupName, kubernetesClusterName, ifMatch, - ifNoneMatch, kubernetesClusterUpdateParameters, context); - return this.client.getLroResult(response, - KubernetesClusterInner.class, KubernetesClusterInner.class, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Patch the Kubernetes cluster. - * - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes - * cluster. Properties and tag updates can be done independently. + * Get a list of Kubernetes clusters in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud on successful completion of - * {@link Mono}. + * @return a list of Kubernetes clusters in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String kubernetesClusterName, - String ifMatch, String ifNoneMatch, KubernetesClusterPatchParameters kubernetesClusterUpdateParameters) { - return beginUpdateAsync(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, - kubernetesClusterUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(Integer top, String skipToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the Kubernetes cluster. - * - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes - * cluster. Properties and tag updates can be done independently. + * Get a list of Kubernetes clusters in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud on successful completion of - * {@link Mono}. + * @return a list of Kubernetes clusters in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String kubernetesClusterName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final KubernetesClusterPatchParameters kubernetesClusterUpdateParameters = null; - return beginUpdateAsync(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, - kubernetesClusterUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the Kubernetes cluster. - * - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes - * cluster. Properties and tag updates can be done independently. + * Get a list of Kubernetes clusters in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud. + * @return a list of Kubernetes clusters in the provided subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public KubernetesClusterInner update(String resourceGroupName, String kubernetesClusterName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final KubernetesClusterPatchParameters kubernetesClusterUpdateParameters = null; - return beginUpdate(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, - kubernetesClusterUpdateParameters).getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listSinglePage(top, skipToken), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * Patch the Kubernetes cluster. - * - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes - * cluster. Properties and tag updates can be done independently. + * Get a list of Kubernetes clusters in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param kubernetesClusterUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 kubernetesCluster represents the Kubernetes cluster hosted on Network Cloud. + * @return a list of Kubernetes clusters in the provided subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public KubernetesClusterInner update(String resourceGroupName, String kubernetesClusterName, String ifMatch, - String ifNoneMatch, KubernetesClusterPatchParameters kubernetesClusterUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, - kubernetesClusterUpdateParameters, context).getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Integer top, String skipToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * Restart a targeted node. - * * Restart a targeted node of a Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1871,45 +1461,20 @@ public KubernetesClusterInner update(String resourceGroupName, String kubernetes * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> restartNodeWithResponseAsync(String resourceGroupName, String kubernetesClusterName, KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (kubernetesClusterRestartNodeParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter kubernetesClusterRestartNodeParameters is required and cannot be null.")); - } else { - kubernetesClusterRestartNodeParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.restartNode(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, - kubernetesClusterRestartNodeParameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, contentType, + kubernetesClusterRestartNodeParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Restart a targeted node. - * * Restart a targeted node of a Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1918,45 +1483,18 @@ private Mono>> restartNodeWithResponseAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response restartNodeWithResponse(String resourceGroupName, String kubernetesClusterName, KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (kubernetesClusterRestartNodeParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter kubernetesClusterRestartNodeParameters is required and cannot be null.")); - } else { - kubernetesClusterRestartNodeParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.restartNodeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, - kubernetesClusterRestartNodeParameters, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, contentType, + kubernetesClusterRestartNodeParameters, Context.NONE); } /** - * Restart a targeted node. - * * Restart a targeted node of a Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1966,45 +1504,18 @@ private Response restartNodeWithResponse(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response restartNodeWithResponse(String resourceGroupName, String kubernetesClusterName, KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (kubernetesClusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter kubernetesClusterName is required and cannot be null.")); - } - if (kubernetesClusterRestartNodeParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter kubernetesClusterRestartNodeParameters is required and cannot be null.")); - } else { - kubernetesClusterRestartNodeParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.restartNodeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, - kubernetesClusterRestartNodeParameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, kubernetesClusterName, contentType, + kubernetesClusterRestartNodeParameters, context); } /** - * Restart a targeted node. - * * Restart a targeted node of a Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2013,22 +1524,20 @@ private Response restartNodeWithResponse(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginRestartNodeAsync( + private PollerFlux, OperationStatusResult> beginRestartNodeAsync( String resourceGroupName, String kubernetesClusterName, KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters) { Mono>> mono = restartNodeWithResponseAsync(resourceGroupName, kubernetesClusterName, kubernetesClusterRestartNodeParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Restart a targeted node. - * * Restart a targeted node of a Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2037,21 +1546,19 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginRestartNode( + public SyncPoller, OperationStatusResult> beginRestartNode( String resourceGroupName, String kubernetesClusterName, KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters) { Response response = restartNodeWithResponse(resourceGroupName, kubernetesClusterName, kubernetesClusterRestartNodeParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Restart a targeted node. - * * Restart a targeted node of a Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2061,21 +1568,19 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginRestartNode( + public SyncPoller, OperationStatusResult> beginRestartNode( String resourceGroupName, String kubernetesClusterName, KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters, Context context) { Response response = restartNodeWithResponse(resourceGroupName, kubernetesClusterName, kubernetesClusterRestartNodeParameters, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Restart a targeted node. - * * Restart a targeted node of a Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2084,10 +1589,10 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restartNodeAsync(String resourceGroupName, String kubernetesClusterName, + private Mono restartNodeAsync(String resourceGroupName, String kubernetesClusterName, KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters) { return beginRestartNodeAsync(resourceGroupName, kubernetesClusterName, kubernetesClusterRestartNodeParameters) .last() @@ -2095,8 +1600,6 @@ private Mono restartNodeAsync(String resourceGroupNa } /** - * Restart a targeted node. - * * Restart a targeted node of a Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2105,18 +1608,16 @@ private Mono restartNodeAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner restartNode(String resourceGroupName, String kubernetesClusterName, + public OperationStatusResult restartNode(String resourceGroupName, String kubernetesClusterName, KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters) { return beginRestartNode(resourceGroupName, kubernetesClusterName, kubernetesClusterRestartNodeParameters) .getFinalResult(); } /** - * Restart a targeted node. - * * Restart a targeted node of a Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2126,77 +1627,55 @@ public OperationStatusResultInner restartNode(String resourceGroupName, String k * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner restartNode(String resourceGroupName, String kubernetesClusterName, + public OperationStatusResult restartNode(String resourceGroupName, String kubernetesClusterName, KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters, Context context) { return beginRestartNode(resourceGroupName, kubernetesClusterName, kubernetesClusterRestartNodeParameters, context).getFinalResult(); } /** - * List Kubernetes clusters in the subscription. - * * 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 Kubernetes clusters in the provided subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of Kubernetes clusters in the provided resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); } /** - * List Kubernetes clusters in the subscription. - * * 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 Kubernetes clusters in the provided subscription along with {@link PagedResponse}. + * @return a list of Kubernetes clusters in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = 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); } /** - * List Kubernetes clusters in the subscription. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2204,88 +1683,57 @@ private PagedResponse listBySubscriptionNextSinglePage(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Kubernetes clusters in the provided subscription along with {@link PagedResponse}. + * @return a list of Kubernetes clusters in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List Kubernetes clusters in the resource group. - * * 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 Kubernetes clusters in the provided resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of Kubernetes clusters in the provided subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(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())); } /** - * List Kubernetes clusters in the resource group. - * * 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 Kubernetes clusters in the provided resource group along with {@link PagedResponse}. + * @return a list of Kubernetes clusters in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List Kubernetes clusters in the resource group. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2293,25 +1741,14 @@ private PagedResponse listByResourceGroupNextSinglePage( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Kubernetes clusters in the provided resource group along with {@link PagedResponse}. + * @return a list of Kubernetes clusters in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(KubernetesClustersClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClustersImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClustersImpl.java index 2d10b740f4ff..83f80670f897 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClustersImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClustersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -11,7 +11,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.KubernetesClustersClient; import com.azure.resourcemanager.networkcloud.fluent.models.KubernetesClusterInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.KubernetesCluster; import com.azure.resourcemanager.networkcloud.models.KubernetesClusterRestartNodeParameters; import com.azure.resourcemanager.networkcloud.models.KubernetesClusters; @@ -30,38 +29,12 @@ public KubernetesClustersImpl(KubernetesClustersClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new KubernetesClusterImpl(inner1, this.manager())); - } - - public PagedIterable list(Integer top, String skipToken, Context context) { - PagedIterable inner = this.serviceClient().list(top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new KubernetesClusterImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new KubernetesClusterImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new KubernetesClusterImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String kubernetesClusterName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, kubernetesClusterName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new KubernetesClusterImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new KubernetesClusterImpl(inner.getValue(), this.manager())); } public KubernetesCluster getByResourceGroup(String resourceGroupName, String kubernetesClusterName) { @@ -74,46 +47,47 @@ public KubernetesCluster getByResourceGroup(String resourceGroupName, String kub } } - public OperationStatusResult deleteByResourceGroup(String resourceGroupName, String kubernetesClusterName) { - OperationStatusResultInner inner = this.serviceClient().delete(resourceGroupName, kubernetesClusterName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public void deleteByResourceGroup(String resourceGroupName, String kubernetesClusterName) { + this.serviceClient().delete(resourceGroupName, kubernetesClusterName); } - public OperationStatusResult delete(String resourceGroupName, String kubernetesClusterName, String ifMatch, - String ifNoneMatch, Context context) { - OperationStatusResultInner inner - = this.serviceClient().delete(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String kubernetesClusterName, String ifMatch, String ifNoneMatch, + Context context) { + this.serviceClient().delete(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new KubernetesClusterImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new KubernetesClusterImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new KubernetesClusterImpl(inner1, this.manager())); + } + + public PagedIterable list(Integer top, String skipToken, Context context) { + PagedIterable inner = this.serviceClient().list(top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new KubernetesClusterImpl(inner1, this.manager())); } public OperationStatusResult restartNode(String resourceGroupName, String kubernetesClusterName, KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .restartNode(resourceGroupName, kubernetesClusterName, kubernetesClusterRestartNodeParameters); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public OperationStatusResult restartNode(String resourceGroupName, String kubernetesClusterName, KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters, Context context) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .restartNode(resourceGroupName, kubernetesClusterName, kubernetesClusterRestartNodeParameters, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public KubernetesCluster getById(String id) { @@ -144,7 +118,7 @@ public Response getByIdWithResponse(String id, Context contex return this.getByResourceGroupWithResponse(resourceGroupName, kubernetesClusterName, context); } - public OperationStatusResult deleteById(String id) { + public void deleteById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -157,11 +131,10 @@ public OperationStatusResult deleteById(String id) { } String localIfMatch = null; String localIfNoneMatch = null; - return this.delete(resourceGroupName, kubernetesClusterName, localIfMatch, localIfNoneMatch, Context.NONE); + this.delete(resourceGroupName, kubernetesClusterName, localIfMatch, localIfNoneMatch, Context.NONE); } - public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, - Context context) { + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -172,7 +145,7 @@ public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'kubernetesClusters'.", id))); } - return this.delete(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, context); + this.delete(resourceGroupName, kubernetesClusterName, ifMatch, ifNoneMatch, context); } private KubernetesClustersClient serviceClient() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesVersionImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesVersionImpl.java new file mode 100644 index 000000000000..3442e2c1efed --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesVersionImpl.java @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.networkcloud.fluent.models.KubernetesVersionInner; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.KubernetesVersion; +import com.azure.resourcemanager.networkcloud.models.KubernetesVersionPatchParameters; +import com.azure.resourcemanager.networkcloud.models.KubernetesVersionProvisioningState; +import com.azure.resourcemanager.networkcloud.models.KubernetesVersionValue; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class KubernetesVersionImpl + implements KubernetesVersion, KubernetesVersion.Definition, KubernetesVersion.Update { + private KubernetesVersionInner innerObject; + + private final com.azure.resourcemanager.networkcloud.NetworkCloudManager 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 String etag() { + return this.innerModel().etag(); + } + + public ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public List values() { + List inner = this.innerModel().values(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public KubernetesVersionProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public KubernetesVersionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.networkcloud.NetworkCloudManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String kubernetesVersionName; + + private String createIfMatch; + + private String createIfNoneMatch; + + private String updateIfMatch; + + private String updateIfNoneMatch; + + private KubernetesVersionPatchParameters updateKubernetesVersionPatchParameters; + + public KubernetesVersionImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public KubernetesVersion create() { + this.innerObject = serviceManager.serviceClient() + .getKubernetesVersions() + .createOrUpdate(resourceGroupName, kubernetesVersionName, this.innerModel(), createIfMatch, + createIfNoneMatch, Context.NONE); + return this; + } + + public KubernetesVersion create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getKubernetesVersions() + .createOrUpdate(resourceGroupName, kubernetesVersionName, this.innerModel(), createIfMatch, + createIfNoneMatch, context); + return this; + } + + KubernetesVersionImpl(String name, com.azure.resourcemanager.networkcloud.NetworkCloudManager serviceManager) { + this.innerObject = new KubernetesVersionInner(); + this.serviceManager = serviceManager; + this.kubernetesVersionName = name; + this.createIfMatch = null; + this.createIfNoneMatch = null; + } + + public KubernetesVersionImpl update() { + this.updateIfMatch = null; + this.updateIfNoneMatch = null; + this.updateKubernetesVersionPatchParameters = new KubernetesVersionPatchParameters(); + return this; + } + + public KubernetesVersion apply() { + this.innerObject = serviceManager.serviceClient() + .getKubernetesVersions() + .update(resourceGroupName, kubernetesVersionName, updateIfMatch, updateIfNoneMatch, + updateKubernetesVersionPatchParameters, Context.NONE); + return this; + } + + public KubernetesVersion apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getKubernetesVersions() + .update(resourceGroupName, kubernetesVersionName, updateIfMatch, updateIfNoneMatch, + updateKubernetesVersionPatchParameters, context); + return this; + } + + KubernetesVersionImpl(KubernetesVersionInner innerObject, + com.azure.resourcemanager.networkcloud.NetworkCloudManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.kubernetesVersionName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "kubernetesVersions"); + } + + public KubernetesVersion refresh() { + this.innerObject = serviceManager.serviceClient() + .getKubernetesVersions() + .getByResourceGroupWithResponse(resourceGroupName, kubernetesVersionName, Context.NONE) + .getValue(); + return this; + } + + public KubernetesVersion refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getKubernetesVersions() + .getByResourceGroupWithResponse(resourceGroupName, kubernetesVersionName, context) + .getValue(); + return this; + } + + public KubernetesVersionImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public KubernetesVersionImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public KubernetesVersionImpl withExtendedLocation(ExtendedLocation extendedLocation) { + this.innerModel().withExtendedLocation(extendedLocation); + return this; + } + + public KubernetesVersionImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateKubernetesVersionPatchParameters.withTags(tags); + return this; + } + } + + public KubernetesVersionImpl withIfMatch(String ifMatch) { + if (isInCreateMode()) { + this.createIfMatch = ifMatch; + return this; + } else { + this.updateIfMatch = ifMatch; + return this; + } + } + + public KubernetesVersionImpl withIfNoneMatch(String ifNoneMatch) { + if (isInCreateMode()) { + this.createIfNoneMatch = ifNoneMatch; + return this; + } else { + this.updateIfNoneMatch = ifNoneMatch; + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesVersionsClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesVersionsClientImpl.java new file mode 100644 index 000000000000..55772294c472 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesVersionsClientImpl.java @@ -0,0 +1,1546 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.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.networkcloud.fluent.KubernetesVersionsClient; +import com.azure.resourcemanager.networkcloud.fluent.models.KubernetesVersionInner; +import com.azure.resourcemanager.networkcloud.implementation.models.KubernetesVersionList; +import com.azure.resourcemanager.networkcloud.models.KubernetesVersionPatchParameters; +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 KubernetesVersionsClient. + */ +public final class KubernetesVersionsClientImpl implements KubernetesVersionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final KubernetesVersionsService service; + + /** + * The service client containing this operation class. + */ + private final NetworkCloudManagementClientImpl client; + + /** + * Initializes an instance of KubernetesVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + KubernetesVersionsClientImpl(NetworkCloudManagementClientImpl client) { + this.service = RestProxy.create(KubernetesVersionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetworkCloudManagementClientKubernetesVersions to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientKubernetesVersions") + public interface KubernetesVersionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesVersions/{kubernetesVersionName}") + @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("kubernetesVersionName") String kubernetesVersionName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesVersions/{kubernetesVersionName}") + @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("kubernetesVersionName") String kubernetesVersionName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesVersions/{kubernetesVersionName}") + @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("kubernetesVersionName") String kubernetesVersionName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") KubernetesVersionInner kubernetesVersionParameters, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesVersions/{kubernetesVersionName}") + @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("kubernetesVersionName") String kubernetesVersionName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") KubernetesVersionInner kubernetesVersionParameters, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesVersions/{kubernetesVersionName}") + @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("kubernetesVersionName") String kubernetesVersionName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") KubernetesVersionPatchParameters kubernetesVersionPatchParameters, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesVersions/{kubernetesVersionName}") + @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("kubernetesVersionName") String kubernetesVersionName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") KubernetesVersionPatchParameters kubernetesVersionPatchParameters, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesVersions/{kubernetesVersionName}") + @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("kubernetesVersionName") String kubernetesVersionName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesVersions/{kubernetesVersionName}") + @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("kubernetesVersionName") String kubernetesVersionName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/kubernetesVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/kubernetesVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, + @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> listBySubscriptionNext( + @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 listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return kubernetesVersion represents the available Kubernetes versions for a cluster along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String kubernetesVersionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kubernetesVersionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return kubernetesVersion represents the available Kubernetes versions for a cluster on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String kubernetesVersionName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, kubernetesVersionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @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 kubernetesVersion represents the available Kubernetes versions for a cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String kubernetesVersionName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kubernetesVersionName, accept, context); + } + + /** + * Retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return kubernetesVersion represents the available Kubernetes versions for a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KubernetesVersionInner getByResourceGroup(String resourceGroupName, String kubernetesVersionName) { + return getByResourceGroupWithResponse(resourceGroupName, kubernetesVersionName, Context.NONE).getValue(); + } + + /** + * Create the Kubernetes version resource or update its tags. This resource is system managed and should only be + * created with the name "default". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param kubernetesVersionParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return kubernetesVersion represents the available Kubernetes versions for a cluster along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String kubernetesVersionName, KubernetesVersionInner kubernetesVersionParameters, String ifMatch, + String ifNoneMatch) { + 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, kubernetesVersionName, ifMatch, ifNoneMatch, + contentType, accept, kubernetesVersionParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create the Kubernetes version resource or update its tags. This resource is system managed and should only be + * created with the name "default". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param kubernetesVersionParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return kubernetesVersion represents the available Kubernetes versions for a cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String kubernetesVersionName, + KubernetesVersionInner kubernetesVersionParameters, String ifMatch, String ifNoneMatch) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch, + contentType, accept, kubernetesVersionParameters, Context.NONE); + } + + /** + * Create the Kubernetes version resource or update its tags. This resource is system managed and should only be + * created with the name "default". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param kubernetesVersionParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 kubernetesVersion represents the available Kubernetes versions for a cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String kubernetesVersionName, + KubernetesVersionInner kubernetesVersionParameters, String ifMatch, String ifNoneMatch, 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, kubernetesVersionName, ifMatch, ifNoneMatch, + contentType, accept, kubernetesVersionParameters, context); + } + + /** + * Create the Kubernetes version resource or update its tags. This resource is system managed and should only be + * created with the name "default". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param kubernetesVersionParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 kubernetesVersion represents the available Kubernetes versions for + * a cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, KubernetesVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String kubernetesVersionName, KubernetesVersionInner kubernetesVersionParameters, + String ifMatch, String ifNoneMatch) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + kubernetesVersionName, kubernetesVersionParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), KubernetesVersionInner.class, KubernetesVersionInner.class, + this.client.getContext()); + } + + /** + * Create the Kubernetes version resource or update its tags. This resource is system managed and should only be + * created with the name "default". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param kubernetesVersionParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 kubernetesVersion represents the available Kubernetes versions for + * a cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, KubernetesVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String kubernetesVersionName, KubernetesVersionInner kubernetesVersionParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + kubernetesVersionName, kubernetesVersionParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), KubernetesVersionInner.class, KubernetesVersionInner.class, + this.client.getContext()); + } + + /** + * Create the Kubernetes version resource or update its tags. This resource is system managed and should only be + * created with the name "default". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param kubernetesVersionParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 kubernetesVersion represents the available Kubernetes versions for + * a cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, KubernetesVersionInner> beginCreateOrUpdate( + String resourceGroupName, String kubernetesVersionName, KubernetesVersionInner kubernetesVersionParameters, + String ifMatch, String ifNoneMatch) { + Response response = createOrUpdateWithResponse(resourceGroupName, kubernetesVersionName, + kubernetesVersionParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, + KubernetesVersionInner.class, KubernetesVersionInner.class, Context.NONE); + } + + /** + * Create the Kubernetes version resource or update its tags. This resource is system managed and should only be + * created with the name "default". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param kubernetesVersionParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 kubernetesVersion represents the available Kubernetes versions for + * a cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, KubernetesVersionInner> beginCreateOrUpdate( + String resourceGroupName, String kubernetesVersionName, KubernetesVersionInner kubernetesVersionParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Response response = createOrUpdateWithResponse(resourceGroupName, kubernetesVersionName, + kubernetesVersionParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, + KubernetesVersionInner.class, KubernetesVersionInner.class, Context.NONE); + } + + /** + * Create the Kubernetes version resource or update its tags. This resource is system managed and should only be + * created with the name "default". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param kubernetesVersionParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 kubernetesVersion represents the available Kubernetes versions for + * a cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, KubernetesVersionInner> beginCreateOrUpdate( + String resourceGroupName, String kubernetesVersionName, KubernetesVersionInner kubernetesVersionParameters, + String ifMatch, String ifNoneMatch, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, kubernetesVersionName, + kubernetesVersionParameters, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, + KubernetesVersionInner.class, KubernetesVersionInner.class, context); + } + + /** + * Create the Kubernetes version resource or update its tags. This resource is system managed and should only be + * created with the name "default". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param kubernetesVersionParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return kubernetesVersion represents the available Kubernetes versions for a cluster on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String kubernetesVersionName, + KubernetesVersionInner kubernetesVersionParameters, String ifMatch, String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, kubernetesVersionName, kubernetesVersionParameters, ifMatch, + ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create the Kubernetes version resource or update its tags. This resource is system managed and should only be + * created with the name "default". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param kubernetesVersionParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return kubernetesVersion represents the available Kubernetes versions for a cluster on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String kubernetesVersionName, + KubernetesVersionInner kubernetesVersionParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdateAsync(resourceGroupName, kubernetesVersionName, kubernetesVersionParameters, ifMatch, + ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create the Kubernetes version resource or update its tags. This resource is system managed and should only be + * created with the name "default". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param kubernetesVersionParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return kubernetesVersion represents the available Kubernetes versions for a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KubernetesVersionInner createOrUpdate(String resourceGroupName, String kubernetesVersionName, + KubernetesVersionInner kubernetesVersionParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdate(resourceGroupName, kubernetesVersionName, kubernetesVersionParameters, ifMatch, + ifNoneMatch).getFinalResult(); + } + + /** + * Create the Kubernetes version resource or update its tags. This resource is system managed and should only be + * created with the name "default". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param kubernetesVersionParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 kubernetesVersion represents the available Kubernetes versions for a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KubernetesVersionInner createOrUpdate(String resourceGroupName, String kubernetesVersionName, + KubernetesVersionInner kubernetesVersionParameters, String ifMatch, String ifNoneMatch, Context context) { + return beginCreateOrUpdate(resourceGroupName, kubernetesVersionName, kubernetesVersionParameters, ifMatch, + ifNoneMatch, context).getFinalResult(); + } + + /** + * Update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param kubernetesVersionPatchParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return kubernetesVersion represents the available Kubernetes versions for a cluster along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String kubernetesVersionName, String ifMatch, String ifNoneMatch, + KubernetesVersionPatchParameters kubernetesVersionPatchParameters) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch, accept, + kubernetesVersionPatchParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param kubernetesVersionPatchParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return kubernetesVersion represents the available Kubernetes versions for a cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String kubernetesVersionName, + String ifMatch, String ifNoneMatch, KubernetesVersionPatchParameters kubernetesVersionPatchParameters) { + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch, accept, + kubernetesVersionPatchParameters, Context.NONE); + } + + /** + * Update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param kubernetesVersionPatchParameters The request body. + * @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 kubernetesVersion represents the available Kubernetes versions for a cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String kubernetesVersionName, + String ifMatch, String ifNoneMatch, KubernetesVersionPatchParameters kubernetesVersionPatchParameters, + Context context) { + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch, accept, + kubernetesVersionPatchParameters, context); + } + + /** + * Update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param kubernetesVersionPatchParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 kubernetesVersion represents the available Kubernetes versions for + * a cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, KubernetesVersionInner> beginUpdateAsync( + String resourceGroupName, String kubernetesVersionName, String ifMatch, String ifNoneMatch, + KubernetesVersionPatchParameters kubernetesVersionPatchParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, kubernetesVersionName, + ifMatch, ifNoneMatch, kubernetesVersionPatchParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), KubernetesVersionInner.class, KubernetesVersionInner.class, + this.client.getContext()); + } + + /** + * Update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of kubernetesVersion represents the available Kubernetes versions for + * a cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, KubernetesVersionInner> + beginUpdateAsync(String resourceGroupName, String kubernetesVersionName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final KubernetesVersionPatchParameters kubernetesVersionPatchParameters = null; + Mono>> mono = updateWithResponseAsync(resourceGroupName, kubernetesVersionName, + ifMatch, ifNoneMatch, kubernetesVersionPatchParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), KubernetesVersionInner.class, KubernetesVersionInner.class, + this.client.getContext()); + } + + /** + * Update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param kubernetesVersionPatchParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 kubernetesVersion represents the available Kubernetes versions for + * a cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, KubernetesVersionInner> beginUpdate(String resourceGroupName, + String kubernetesVersionName, String ifMatch, String ifNoneMatch, + KubernetesVersionPatchParameters kubernetesVersionPatchParameters) { + Response response = updateWithResponse(resourceGroupName, kubernetesVersionName, ifMatch, + ifNoneMatch, kubernetesVersionPatchParameters); + return this.client.getLroResult(response, + KubernetesVersionInner.class, KubernetesVersionInner.class, Context.NONE); + } + + /** + * Update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of kubernetesVersion represents the available Kubernetes versions for + * a cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, KubernetesVersionInner> beginUpdate(String resourceGroupName, + String kubernetesVersionName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final KubernetesVersionPatchParameters kubernetesVersionPatchParameters = null; + Response response = updateWithResponse(resourceGroupName, kubernetesVersionName, ifMatch, + ifNoneMatch, kubernetesVersionPatchParameters); + return this.client.getLroResult(response, + KubernetesVersionInner.class, KubernetesVersionInner.class, Context.NONE); + } + + /** + * Update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param kubernetesVersionPatchParameters The request body. + * @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 kubernetesVersion represents the available Kubernetes versions for + * a cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, KubernetesVersionInner> beginUpdate(String resourceGroupName, + String kubernetesVersionName, String ifMatch, String ifNoneMatch, + KubernetesVersionPatchParameters kubernetesVersionPatchParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, kubernetesVersionName, ifMatch, + ifNoneMatch, kubernetesVersionPatchParameters, context); + return this.client.getLroResult(response, + KubernetesVersionInner.class, KubernetesVersionInner.class, context); + } + + /** + * Update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param kubernetesVersionPatchParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return kubernetesVersion represents the available Kubernetes versions for a cluster on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String kubernetesVersionName, + String ifMatch, String ifNoneMatch, KubernetesVersionPatchParameters kubernetesVersionPatchParameters) { + return beginUpdateAsync(resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch, + kubernetesVersionPatchParameters).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return kubernetesVersion represents the available Kubernetes versions for a cluster on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String kubernetesVersionName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final KubernetesVersionPatchParameters kubernetesVersionPatchParameters = null; + return beginUpdateAsync(resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch, + kubernetesVersionPatchParameters).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return kubernetesVersion represents the available Kubernetes versions for a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KubernetesVersionInner update(String resourceGroupName, String kubernetesVersionName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final KubernetesVersionPatchParameters kubernetesVersionPatchParameters = null; + return beginUpdate(resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch, + kubernetesVersionPatchParameters).getFinalResult(); + } + + /** + * Update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param kubernetesVersionPatchParameters The request body. + * @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 kubernetesVersion represents the available Kubernetes versions for a cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KubernetesVersionInner update(String resourceGroupName, String kubernetesVersionName, String ifMatch, + String ifNoneMatch, KubernetesVersionPatchParameters kubernetesVersionPatchParameters, Context context) { + return beginUpdate(resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch, + kubernetesVersionPatchParameters, context).getFinalResult(); + } + + /** + * Delete the specified Kubernetes version resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 kubernetesVersionName, String ifMatch, String ifNoneMatch) { + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified Kubernetes version resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 kubernetesVersionName, + String ifMatch, String ifNoneMatch) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch, + Context.NONE); + } + + /** + * Delete the specified Kubernetes version resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 kubernetesVersionName, + String ifMatch, String ifNoneMatch, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch, context); + } + + /** + * Delete the specified Kubernetes version resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 kubernetesVersionName, + String ifMatch, String ifNoneMatch) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified Kubernetes version resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String kubernetesVersionName) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified Kubernetes version resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 kubernetesVersionName, + String ifMatch, String ifNoneMatch) { + Response response + = deleteWithResponse(resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified Kubernetes version resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String kubernetesVersionName) { + final String ifMatch = null; + final String ifNoneMatch = null; + Response response + = deleteWithResponse(resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified Kubernetes version resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 kubernetesVersionName, + String ifMatch, String ifNoneMatch, Context context) { + Response response + = deleteWithResponse(resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified Kubernetes version resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 kubernetesVersionName, String ifMatch, + String ifNoneMatch) { + return beginDeleteAsync(resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified Kubernetes version resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String kubernetesVersionName) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginDeleteAsync(resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified Kubernetes version resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String kubernetesVersionName) { + final String ifMatch = null; + final String ifNoneMatch = null; + beginDelete(resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch).getFinalResult(); + } + + /** + * Delete the specified Kubernetes version resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 kubernetesVersionName, String ifMatch, String ifNoneMatch, + Context context) { + beginDelete(resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch, context).getFinalResult(); + } + + /** + * Get a list of Kubernetes version resources in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kubernetes version resources in the provided resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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 a list of Kubernetes version resources in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kubernetes version resources in the provided resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, + String skipToken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of Kubernetes version resources in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Kubernetes version resources in the provided resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of Kubernetes version resources in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kubernetes version resources in the provided resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of Kubernetes version resources in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 Kubernetes version resources in the provided resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of Kubernetes version resources in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Kubernetes version resources in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * Get a list of Kubernetes version resources in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 Kubernetes version resources in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, + String skipToken, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Get a list of Kubernetes version resources in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kubernetes version resources in the provided subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, 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 a list of Kubernetes version resources in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kubernetes version resources in the provided subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Integer top, String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of Kubernetes version resources in the provided subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Kubernetes version resources in the provided subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of Kubernetes version resources in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kubernetes version resources in the provided subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Integer top, String skipToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of Kubernetes version resources in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 Kubernetes version resources in the provided subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of Kubernetes version resources in the provided subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Kubernetes version resources in the provided subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listSinglePage(top, skipToken), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * Get a list of Kubernetes version resources in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 Kubernetes version resources in the provided subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Integer top, String skipToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), + nextLink -> listBySubscriptionNextSinglePage(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 Kubernetes version resources in the provided resource group 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 a list of Kubernetes version resources in the provided resource group 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 a list of Kubernetes version resources in the provided resource group 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 a list of Kubernetes version resources in the provided subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(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 Kubernetes version resources in the provided subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(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 Kubernetes version resources in the provided subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(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/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesVersionsImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesVersionsImpl.java new file mode 100644 index 000000000000..05c665b90ee6 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesVersionsImpl.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.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.networkcloud.fluent.KubernetesVersionsClient; +import com.azure.resourcemanager.networkcloud.fluent.models.KubernetesVersionInner; +import com.azure.resourcemanager.networkcloud.models.KubernetesVersion; +import com.azure.resourcemanager.networkcloud.models.KubernetesVersions; + +public final class KubernetesVersionsImpl implements KubernetesVersions { + private static final ClientLogger LOGGER = new ClientLogger(KubernetesVersionsImpl.class); + + private final KubernetesVersionsClient innerClient; + + private final com.azure.resourcemanager.networkcloud.NetworkCloudManager serviceManager; + + public KubernetesVersionsImpl(KubernetesVersionsClient innerClient, + com.azure.resourcemanager.networkcloud.NetworkCloudManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, + String kubernetesVersionName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, kubernetesVersionName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new KubernetesVersionImpl(inner.getValue(), this.manager())); + } + + public KubernetesVersion getByResourceGroup(String resourceGroupName, String kubernetesVersionName) { + KubernetesVersionInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, kubernetesVersionName); + if (inner != null) { + return new KubernetesVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String kubernetesVersionName) { + this.serviceClient().delete(resourceGroupName, kubernetesVersionName); + } + + public void delete(String resourceGroupName, String kubernetesVersionName, String ifMatch, String ifNoneMatch, + Context context) { + this.serviceClient().delete(resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new KubernetesVersionImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new KubernetesVersionImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new KubernetesVersionImpl(inner1, this.manager())); + } + + public PagedIterable list(Integer top, String skipToken, Context context) { + PagedIterable inner = this.serviceClient().list(top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new KubernetesVersionImpl(inner1, this.manager())); + } + + public KubernetesVersion 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 kubernetesVersionName = ResourceManagerUtils.getValueFromIdByName(id, "kubernetesVersions"); + if (kubernetesVersionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kubernetesVersions'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, kubernetesVersionName, 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 kubernetesVersionName = ResourceManagerUtils.getValueFromIdByName(id, "kubernetesVersions"); + if (kubernetesVersionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kubernetesVersions'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, kubernetesVersionName, 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 kubernetesVersionName = ResourceManagerUtils.getValueFromIdByName(id, "kubernetesVersions"); + if (kubernetesVersionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kubernetesVersions'.", id))); + } + String localIfMatch = null; + String localIfNoneMatch = null; + this.delete(resourceGroupName, kubernetesVersionName, localIfMatch, localIfNoneMatch, Context.NONE); + } + + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, 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 kubernetesVersionName = ResourceManagerUtils.getValueFromIdByName(id, "kubernetesVersions"); + if (kubernetesVersionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kubernetesVersions'.", id))); + } + this.delete(resourceGroupName, kubernetesVersionName, ifMatch, ifNoneMatch, context); + } + + private KubernetesVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.networkcloud.NetworkCloudManager manager() { + return this.serviceManager; + } + + public KubernetesVersionImpl define(String name) { + return new KubernetesVersionImpl(name, this.manager()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L2NetworkImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L2NetworkImpl.java index 94abb504d64b..bcc1ec44927a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L2NetworkImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L2NetworkImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -60,6 +60,18 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public HybridAksPluginType hybridAksPluginType() { + return this.innerModel().hybridAksPluginType(); + } + + public String interfaceName() { + return this.innerModel().interfaceName(); + } + + public String l2IsolationDomainId() { + return this.innerModel().l2IsolationDomainId(); + } + public List associatedResourceIds() { List inner = this.innerModel().associatedResourceIds(); if (inner != null) { @@ -90,22 +102,6 @@ public List hybridAksClustersAssociatedIds() { } } - public HybridAksPluginType hybridAksPluginType() { - return this.innerModel().hybridAksPluginType(); - } - - public String interfaceName() { - return this.innerModel().interfaceName(); - } - - public String l2IsolationDomainId() { - return this.innerModel().l2IsolationDomainId(); - } - - public L2NetworkProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - public List virtualMachinesAssociatedIds() { List inner = this.innerModel().virtualMachinesAssociatedIds(); if (inner != null) { @@ -115,6 +111,10 @@ public List virtualMachinesAssociatedIds() { } } + public L2NetworkProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public Region region() { return Region.fromName(this.regionName()); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L2NetworksClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L2NetworksClientImpl.java index d17b9737c39d..684840918862 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L2NetworksClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L2NetworksClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -31,13 +31,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.L2NetworksClient; import com.azure.resourcemanager.networkcloud.fluent.models.L2NetworkInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; -import com.azure.resourcemanager.networkcloud.models.L2NetworkList; +import com.azure.resourcemanager.networkcloud.implementation.models.L2NetworkList; import com.azure.resourcemanager.networkcloud.models.L2NetworkPatchParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,67 +53,31 @@ public final class L2NetworksClientImpl implements L2NetworksClient { /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of L2NetworksClientImpl. * * @param client the instance of the service client containing this operation class. */ - L2NetworksClientImpl(NetworkCloudImpl client) { + L2NetworksClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(L2NetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudL2Networks to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for NetworkCloudManagementClientL2Networks to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudL2Networks") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientL2Networks") public interface L2NetworksService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/l2Networks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/l2Networks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l2NetworkName") String l2NetworkName, @HeaderParam("Accept") String accept, Context context); @@ -124,89 +86,105 @@ Mono> getByResourceGroup(@HostParam("$host") String end @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l2NetworkName") String l2NetworkName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l2NetworkName") String l2NetworkName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") L2NetworkInner l2NetworkParameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L2NetworkInner l2NetworkParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l2NetworkName") String l2NetworkName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") L2NetworkInner l2NetworkParameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L2NetworkInner l2NetworkParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l2NetworkName") String l2NetworkName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, + @BodyParam("application/json") L2NetworkPatchParameters l2NetworkUpdateParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l2NetworkName") String l2NetworkName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, + @BodyParam("application/json") L2NetworkPatchParameters l2NetworkUpdateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}") + @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("l2NetworkName") String l2NetworkName, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}") + @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("l2NetworkName") String l2NetworkName, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l2NetworkName") String l2NetworkName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") L2NetworkPatchParameters l2NetworkUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l2NetworkName") String l2NetworkName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") L2NetworkPatchParameters l2NetworkUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/l2Networks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/l2Networks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -214,7 +192,7 @@ Response listBySubscriptionNextSync( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -222,391 +200,27 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List layer 2 (L2) networks in the subscription. - * - * Get a list of layer 2 (L2) networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 layer 2 (L2) networks in the provided subscription along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, 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 layer 2 (L2) networks in the subscription. - * - * Get a list of layer 2 (L2) networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 layer 2 (L2) networks in the provided subscription as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer top, String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List layer 2 (L2) networks in the subscription. - * - * Get a list of layer 2 (L2) networks in the provided subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of layer 2 (L2) networks in the provided subscription as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List layer 2 (L2) networks in the subscription. - * - * Get a list of layer 2 (L2) networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 layer 2 (L2) networks in the provided subscription along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List layer 2 (L2) networks in the subscription. - * - * Get a list of layer 2 (L2) networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 layer 2 (L2) networks in the provided subscription along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List layer 2 (L2) networks in the subscription. - * - * Get a list of layer 2 (L2) networks in the provided subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of layer 2 (L2) networks in the provided subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listSinglePage(top, skipToken), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); - } - - /** - * List layer 2 (L2) networks in the subscription. - * - * Get a list of layer 2 (L2) networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 layer 2 (L2) networks in the provided subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Integer top, String skipToken, Context context) { - return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); - } - - /** - * List layer 2 (L2) networks in the resource group. - * - * Get a list of layer 2 (L2) networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 layer 2 (L2) networks in the provided resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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 layer 2 (L2) networks in the resource group. - * - * Get a list of layer 2 (L2) networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 layer 2 (L2) networks in the provided resource group as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, - String skipToken) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List layer 2 (L2) networks in the resource group. - * - * Get a list of layer 2 (L2) networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of layer 2 (L2) networks in the provided resource group as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List layer 2 (L2) networks in the resource group. - * - * Get a list of layer 2 (L2) networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 layer 2 (L2) networks in the provided resource group along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List layer 2 (L2) networks in the resource group. - * - * Get a list of layer 2 (L2) networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 layer 2 (L2) networks in the provided resource group along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List layer 2 (L2) networks in the resource group. - * - * Get a list of layer 2 (L2) networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of layer 2 (L2) networks in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); - } - - /** - * List layer 2 (L2) networks in the resource group. - * - * Get a list of layer 2 (L2) networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 layer 2 (L2) networks in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + @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> listBySubscriptionNext( + @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 listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * Retrieve the layer 2 (L2) network. - * * Get properties of the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -620,21 +234,6 @@ public PagedIterable listByResourceGroup(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String l2NetworkName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2NetworkName == null) { - return Mono.error(new IllegalArgumentException("Parameter l2NetworkName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), @@ -643,8 +242,6 @@ private Mono> getByResourceGroupWithResponseAsync(Strin } /** - * Retrieve the layer 2 (L2) network. - * * Get properties of the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -661,8 +258,6 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S } /** - * Retrieve the layer 2 (L2) network. - * * Get properties of the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -676,32 +271,12 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String l2NetworkName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2NetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter l2NetworkName is required and cannot be null.")); - } final String accept = "application/json"; return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l2NetworkName, accept, context); } /** - * Retrieve the layer 2 (L2) network. - * * Get properties of the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -717,8 +292,6 @@ public L2NetworkInner getByResourceGroup(String resourceGroupName, String l2Netw } /** - * Create or update the layer 2 (L2) network. - * * Create a new layer 2 (L2) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -737,38 +310,16 @@ public L2NetworkInner getByResourceGroup(String resourceGroupName, String l2Netw @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String l2NetworkName, L2NetworkInner l2NetworkParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2NetworkName == null) { - return Mono.error(new IllegalArgumentException("Parameter l2NetworkName is required and cannot be null.")); - } - if (l2NetworkParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter l2NetworkParameters is required and cannot be null.")); - } else { - l2NetworkParameters.validate(); - } + 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, l2NetworkName, ifMatch, ifNoneMatch, - l2NetworkParameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, contentType, + accept, l2NetworkParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update the layer 2 (L2) network. - * * Create a new layer 2 (L2) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -787,39 +338,14 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String l2NetworkName, L2NetworkInner l2NetworkParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2NetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter l2NetworkName is required and cannot be null.")); - } - if (l2NetworkParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter l2NetworkParameters is required and cannot be null.")); - } else { - l2NetworkParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, - l2NetworkParameters, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, contentType, + accept, l2NetworkParameters, Context.NONE); } /** - * Create or update the layer 2 (L2) network. - * * Create a new layer 2 (L2) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -839,39 +365,14 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String l2NetworkName, L2NetworkInner l2NetworkParameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2NetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter l2NetworkName is required and cannot be null.")); - } - if (l2NetworkParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter l2NetworkParameters is required and cannot be null.")); - } else { - l2NetworkParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, - l2NetworkParameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, contentType, + accept, l2NetworkParameters, context); } /** - * Create or update the layer 2 (L2) network. - * * Create a new layer 2 (L2) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -897,8 +398,6 @@ private PollerFlux, L2NetworkInner> beginCreateOrUpda } /** - * Create or update the layer 2 (L2) network. - * * Create a new layer 2 (L2) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -922,8 +421,6 @@ private PollerFlux, L2NetworkInner> beginCreateOrUpda } /** - * Create or update the layer 2 (L2) network. - * * Create a new layer 2 (L2) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -949,8 +446,6 @@ public SyncPoller, L2NetworkInner> beginCreateOrUpdat } /** - * Create or update the layer 2 (L2) network. - * * Create a new layer 2 (L2) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -974,8 +469,6 @@ public SyncPoller, L2NetworkInner> beginCreateOrUpdat } /** - * Create or update the layer 2 (L2) network. - * * Create a new layer 2 (L2) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1002,8 +495,6 @@ public SyncPoller, L2NetworkInner> beginCreateOrUpdat } /** - * Create or update the layer 2 (L2) network. - * * Create a new layer 2 (L2) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1028,8 +519,6 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin } /** - * Create or update the layer 2 (L2) network. - * * Create a new layer 2 (L2) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1052,8 +541,6 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin } /** - * Create or update the layer 2 (L2) network. - * * Create a new layer 2 (L2) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1074,8 +561,6 @@ public L2NetworkInner createOrUpdate(String resourceGroupName, String l2NetworkN } /** - * Create or update the layer 2 (L2) network. - * * Create a new layer 2 (L2) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1099,8 +584,98 @@ public L2NetworkInner createOrUpdate(String resourceGroupName, String l2NetworkN } /** - * Delete the layer 2 (L2) network. + * Update tags associated with the provided layer 2 (L2) network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2NetworkName The name of the L2 network. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param l2NetworkUpdateParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return l2Network represents a network that utilizes a single isolation domain set up for layer-2 resources along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String l2NetworkName, + String ifMatch, String ifNoneMatch, L2NetworkPatchParameters l2NetworkUpdateParameters) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, accept, + l2NetworkUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update tags associated with the provided layer 2 (L2) network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2NetworkName The name of the L2 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 l2Network represents a network that utilizes a single isolation domain set up for layer-2 resources on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String l2NetworkName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final L2NetworkPatchParameters l2NetworkUpdateParameters = null; + return updateWithResponseAsync(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, + l2NetworkUpdateParameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update tags associated with the provided layer 2 (L2) network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2NetworkName The name of the L2 network. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param l2NetworkUpdateParameters The request body. + * @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 l2Network represents a network that utilizes a single isolation domain set up for layer-2 resources along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String l2NetworkName, String ifMatch, + String ifNoneMatch, L2NetworkPatchParameters l2NetworkUpdateParameters, Context context) { + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, accept, + l2NetworkUpdateParameters, context); + } + + /** + * Update tags associated with the provided layer 2 (L2) network. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2NetworkName The name of the L2 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 l2Network represents a network that utilizes a single isolation domain set up for layer-2 resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public L2NetworkInner update(String resourceGroupName, String l2NetworkName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final L2NetworkPatchParameters l2NetworkUpdateParameters = null; + return updateWithResponse(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, l2NetworkUpdateParameters, + Context.NONE).getValue(); + } + + /** * Delete the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1112,36 +687,18 @@ public L2NetworkInner createOrUpdate(String resourceGroupName, String l2NetworkN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String l2NetworkName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2NetworkName == null) { - return Mono.error(new IllegalArgumentException("Parameter l2NetworkName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, accept, context)) + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the layer 2 (L2) network. - * * Delete the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1153,38 +710,16 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String l2NetworkName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2NetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter l2NetworkName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, accept, - Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, Context.NONE); } /** - * Delete the layer 2 (L2) network. - * * Delete the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1197,37 +732,16 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String l2NetworkName, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2NetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter l2NetworkName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, accept, context); + this.client.getSubscriptionId(), resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, context); } /** - * Delete the layer 2 (L2) network. - * * Delete the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1239,21 +753,18 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String l2NetworkName, String ifMatch, String ifNoneMatch) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String l2NetworkName, + String ifMatch, String ifNoneMatch) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the layer 2 (L2) network. - * * Delete the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1261,23 +772,19 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String l2NetworkName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String l2NetworkName) { final String ifMatch = null; final String ifNoneMatch = null; Mono>> mono = deleteWithResponseAsync(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the layer 2 (L2) network. - * * Delete the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1289,19 +796,16 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String l2NetworkName, String ifMatch, String ifNoneMatch) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String l2NetworkName, + String ifMatch, String ifNoneMatch) { Response response = deleteWithResponse(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the layer 2 (L2) network. - * * Delete the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1309,21 +813,17 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String l2NetworkName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String l2NetworkName) { final String ifMatch = null; final String ifNoneMatch = null; Response response = deleteWithResponse(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the layer 2 (L2) network. - * * Delete the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1336,20 +836,71 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( - String resourceGroupName, String l2NetworkName, String ifMatch, String ifNoneMatch, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String l2NetworkName, + String ifMatch, String ifNoneMatch, Context context) { Response response = deleteWithResponse(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the provided layer 2 (L2) network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2NetworkName The name of the L2 network. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 l2NetworkName, String ifMatch, String ifNoneMatch) { + return beginDeleteAsync(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the provided layer 2 (L2) network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2NetworkName The name of the L2 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 l2NetworkName) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginDeleteAsync(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the layer 2 (L2) network. + * Delete the provided layer 2 (L2) network. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2NetworkName The name of the L2 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 l2NetworkName) { + final String ifMatch = null; + final String ifNoneMatch = null; + beginDelete(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch).getFinalResult(); + } + + /** * Delete the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1358,281 +909,339 @@ public SyncPoller, OperationStatusResultI * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @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 l2NetworkName, String ifMatch, String ifNoneMatch, + Context context) { + beginDelete(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, context).getFinalResult(); + } + + /** + * Get a list of layer 2 (L2) networks in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 layer 2 (L2) networks in the provided resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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 a list of layer 2 (L2) networks in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 layer 2 (L2) networks in the provided resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, + String skipToken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of layer 2 (L2) networks in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of layer 2 (L2) networks in the provided resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of layer 2 (L2) networks in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return a list of layer 2 (L2) networks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String l2NetworkName, String ifMatch, - String ifNoneMatch) { - return beginDeleteAsync(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete the layer 2 (L2) network. - * - * Delete the provided layer 2 (L2) network. + * Get a list of layer 2 (L2) networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 on successful completion of {@link Mono}. + * @return a list of layer 2 (L2) networks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String l2NetworkName) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginDeleteAsync(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete the layer 2 (L2) network. - * - * Delete the provided layer 2 (L2) network. + * Get a list of layer 2 (L2) networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 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 current status of an async operation. + * @return a list of layer 2 (L2) networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String l2NetworkName) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginDelete(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch).getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Delete the layer 2 (L2) network. - * - * Delete the provided layer 2 (L2) network. + * Get a list of layer 2 (L2) networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of layer 2 (L2) networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String l2NetworkName, String ifMatch, - String ifNoneMatch, Context context) { - return beginDelete(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, context).getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Patch the layer 2 (L2) network. - * - * Update tags associated with the provided layer 2 (L2) network. + * Get a list of layer 2 (L2) networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param l2NetworkUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return l2Network represents a network that utilizes a single isolation domain set up for layer-2 resources along - * with {@link Response} on successful completion of {@link Mono}. + * @return a list of layer 2 (L2) networks in the provided subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String l2NetworkName, - String ifMatch, String ifNoneMatch, L2NetworkPatchParameters l2NetworkUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2NetworkName == null) { - return Mono.error(new IllegalArgumentException("Parameter l2NetworkName is required and cannot be null.")); - } - if (l2NetworkUpdateParameters != null) { - l2NetworkUpdateParameters.validate(); - } + private Mono> listSinglePageAsync(Integer top, String skipToken) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, - l2NetworkUpdateParameters, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, 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())); } /** - * Patch the layer 2 (L2) network. + * Get a list of layer 2 (L2) networks in the provided subscription. * - * Update tags associated with the provided layer 2 (L2) network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 layer 2 (L2) networks in the provided subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Integer top, String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of layer 2 (L2) networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. + * @throws 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 layer 2 (L2) networks in the provided subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of layer 2 (L2) networks in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return l2Network represents a network that utilizes a single isolation domain set up for layer-2 resources on - * successful completion of {@link Mono}. + * @return a list of layer 2 (L2) networks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String l2NetworkName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final L2NetworkPatchParameters l2NetworkUpdateParameters = null; - return updateWithResponseAsync(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, - l2NetworkUpdateParameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listSinglePage(Integer top, String skipToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the layer 2 (L2) network. - * - * Update tags associated with the provided layer 2 (L2) network. + * Get a list of layer 2 (L2) networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param l2NetworkUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 l2Network represents a network that utilizes a single isolation domain set up for layer-2 resources along - * with {@link Response}. + * @return a list of layer 2 (L2) networks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String l2NetworkName, String ifMatch, - String ifNoneMatch, L2NetworkPatchParameters l2NetworkUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2NetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter l2NetworkName is required and cannot be null.")); - } - if (l2NetworkUpdateParameters != null) { - l2NetworkUpdateParameters.validate(); - } + private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, - l2NetworkUpdateParameters, accept, context); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the layer 2 (L2) network. + * Get a list of layer 2 (L2) networks in the provided subscription. * - * Update tags associated with the provided layer 2 (L2) network. + * @throws 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 layer 2 (L2) networks in the provided subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listSinglePage(top, skipToken), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * Get a list of layer 2 (L2) networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 l2Network represents a network that utilizes a single isolation domain set up for layer-2 resources. + * @return a list of layer 2 (L2) networks in the provided subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public L2NetworkInner update(String resourceGroupName, String l2NetworkName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final L2NetworkPatchParameters l2NetworkUpdateParameters = null; - return updateWithResponse(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, l2NetworkUpdateParameters, - Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Integer top, String skipToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * List layer 2 (L2) networks in the subscription. - * * 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 layer 2 (L2) networks in the provided subscription along with {@link PagedResponse} on + * @return a list of layer 2 (L2) networks in the provided resource group along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); } /** - * List layer 2 (L2) networks in the subscription. - * * 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 layer 2 (L2) networks in the provided subscription along with {@link PagedResponse}. + * @return a list of layer 2 (L2) networks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = 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); } /** - * List layer 2 (L2) networks in the subscription. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1640,88 +1249,57 @@ private PagedResponse listBySubscriptionNextSinglePage(String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of layer 2 (L2) networks in the provided subscription along with {@link PagedResponse}. + * @return a list of layer 2 (L2) networks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List layer 2 (L2) networks in the resource group. - * * 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 layer 2 (L2) networks in the provided resource group along with {@link PagedResponse} on + * @return a list of layer 2 (L2) networks in the provided subscription along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(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())); } /** - * List layer 2 (L2) networks in the resource group. - * * 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 layer 2 (L2) networks in the provided resource group along with {@link PagedResponse}. + * @return a list of layer 2 (L2) networks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List layer 2 (L2) networks in the resource group. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1729,25 +1307,14 @@ private PagedResponse listByResourceGroupNextSinglePage(String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 layer 2 (L2) networks in the provided resource group along with {@link PagedResponse}. + * @return a list of layer 2 (L2) networks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(L2NetworksClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L2NetworksImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L2NetworksImpl.java index 9807898f97f3..6e50afeca93b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L2NetworksImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L2NetworksImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -11,10 +11,8 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.L2NetworksClient; import com.azure.resourcemanager.networkcloud.fluent.models.L2NetworkInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.L2Network; import com.azure.resourcemanager.networkcloud.models.L2Networks; -import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; public final class L2NetworksImpl implements L2Networks { private static final ClientLogger LOGGER = new ClientLogger(L2NetworksImpl.class); @@ -29,14 +27,30 @@ public L2NetworksImpl(L2NetworksClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new L2NetworkImpl(inner1, this.manager())); + public Response getByResourceGroupWithResponse(String resourceGroupName, String l2NetworkName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, l2NetworkName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new L2NetworkImpl(inner.getValue(), this.manager())); } - public PagedIterable list(Integer top, String skipToken, Context context) { - PagedIterable inner = this.serviceClient().list(top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new L2NetworkImpl(inner1, this.manager())); + public L2Network getByResourceGroup(String resourceGroupName, String l2NetworkName) { + L2NetworkInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, l2NetworkName); + if (inner != null) { + return new L2NetworkImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String l2NetworkName) { + this.serviceClient().delete(resourceGroupName, l2NetworkName); + } + + public void delete(String resourceGroupName, String l2NetworkName, String ifMatch, String ifNoneMatch, + Context context) { + this.serviceClient().delete(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, context); } public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -51,45 +65,14 @@ public PagedIterable listByResourceGroup(String resourceGroupName, In return ResourceManagerUtils.mapPage(inner, inner1 -> new L2NetworkImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse(String resourceGroupName, String l2NetworkName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, l2NetworkName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new L2NetworkImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public L2Network getByResourceGroup(String resourceGroupName, String l2NetworkName) { - L2NetworkInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, l2NetworkName); - if (inner != null) { - return new L2NetworkImpl(inner, this.manager()); - } else { - return null; - } - } - - public OperationStatusResult deleteByResourceGroup(String resourceGroupName, String l2NetworkName) { - OperationStatusResultInner inner = this.serviceClient().delete(resourceGroupName, l2NetworkName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new L2NetworkImpl(inner1, this.manager())); } - public OperationStatusResult delete(String resourceGroupName, String l2NetworkName, String ifMatch, - String ifNoneMatch, Context context) { - OperationStatusResultInner inner - = this.serviceClient().delete(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(Integer top, String skipToken, Context context) { + PagedIterable inner = this.serviceClient().list(top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new L2NetworkImpl(inner1, this.manager())); } public L2Network getById(String id) { @@ -120,7 +103,7 @@ public Response getByIdWithResponse(String id, Context context) { return this.getByResourceGroupWithResponse(resourceGroupName, l2NetworkName, context); } - public OperationStatusResult deleteById(String id) { + public void deleteById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -133,11 +116,10 @@ public OperationStatusResult deleteById(String id) { } String localIfMatch = null; String localIfNoneMatch = null; - return this.delete(resourceGroupName, l2NetworkName, localIfMatch, localIfNoneMatch, Context.NONE); + this.delete(resourceGroupName, l2NetworkName, localIfMatch, localIfNoneMatch, Context.NONE); } - public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, - Context context) { + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -148,7 +130,7 @@ public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'l2Networks'.", id))); } - return this.delete(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, context); + this.delete(resourceGroupName, l2NetworkName, ifMatch, ifNoneMatch, context); } private L2NetworksClient serviceClient() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L3NetworkImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L3NetworkImpl.java index 3e811c135004..c0ce369a5640 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L3NetworkImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L3NetworkImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -62,36 +62,6 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public List associatedResourceIds() { - List inner = this.innerModel().associatedResourceIds(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String clusterId() { - return this.innerModel().clusterId(); - } - - public L3NetworkDetailedStatus detailedStatus() { - return this.innerModel().detailedStatus(); - } - - public String detailedStatusMessage() { - return this.innerModel().detailedStatusMessage(); - } - - public List hybridAksClustersAssociatedIds() { - List inner = this.innerModel().hybridAksClustersAssociatedIds(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - public HybridAksIpamEnabled hybridAksIpamEnabled() { return this.innerModel().hybridAksIpamEnabled(); } @@ -120,8 +90,38 @@ public String l3IsolationDomainId() { return this.innerModel().l3IsolationDomainId(); } - public L3NetworkProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public long vlan() { + return this.innerModel().vlan(); + } + + public List associatedResourceIds() { + List inner = this.innerModel().associatedResourceIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String clusterId() { + return this.innerModel().clusterId(); + } + + public L3NetworkDetailedStatus detailedStatus() { + return this.innerModel().detailedStatus(); + } + + public String detailedStatusMessage() { + return this.innerModel().detailedStatusMessage(); + } + + public List hybridAksClustersAssociatedIds() { + List inner = this.innerModel().hybridAksClustersAssociatedIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } public List virtualMachinesAssociatedIds() { @@ -133,8 +133,8 @@ public List virtualMachinesAssociatedIds() { } } - public long vlan() { - return this.innerModel().vlan(); + public L3NetworkProvisioningState provisioningState() { + return this.innerModel().provisioningState(); } public Region region() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L3NetworksClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L3NetworksClientImpl.java index 232bca18870a..576c4a11084e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L3NetworksClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L3NetworksClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -31,13 +31,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.L3NetworksClient; import com.azure.resourcemanager.networkcloud.fluent.models.L3NetworkInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; -import com.azure.resourcemanager.networkcloud.models.L3NetworkList; +import com.azure.resourcemanager.networkcloud.implementation.models.L3NetworkList; import com.azure.resourcemanager.networkcloud.models.L3NetworkPatchParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,67 +53,31 @@ public final class L3NetworksClientImpl implements L3NetworksClient { /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of L3NetworksClientImpl. * * @param client the instance of the service client containing this operation class. */ - L3NetworksClientImpl(NetworkCloudImpl client) { + L3NetworksClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(L3NetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudL3Networks to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for NetworkCloudManagementClientL3Networks to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudL3Networks") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientL3Networks") public interface L3NetworksService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/l3Networks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/l3Networks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3NetworkName") String l3NetworkName, @HeaderParam("Accept") String accept, Context context); @@ -124,89 +86,105 @@ Mono> getByResourceGroup(@HostParam("$host") String end @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3NetworkName") String l3NetworkName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3NetworkName") String l3NetworkName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") L3NetworkInner l3NetworkParameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L3NetworkInner l3NetworkParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3NetworkName") String l3NetworkName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") L3NetworkInner l3NetworkParameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L3NetworkInner l3NetworkParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3NetworkName") String l3NetworkName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, + @BodyParam("application/json") L3NetworkPatchParameters l3NetworkUpdateParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3NetworkName") String l3NetworkName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, + @BodyParam("application/json") L3NetworkPatchParameters l3NetworkUpdateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}") + @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("l3NetworkName") String l3NetworkName, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}") + @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("l3NetworkName") String l3NetworkName, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3NetworkName") String l3NetworkName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") L3NetworkPatchParameters l3NetworkUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3NetworkName") String l3NetworkName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") L3NetworkPatchParameters l3NetworkUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/l3Networks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/l3Networks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -214,7 +192,7 @@ Response listBySubscriptionNextSync( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -222,391 +200,27 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List layer 3 (L3) networks in the subscription. - * - * Get a list of layer 3 (L3) networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 layer 3 (L3) networks in the provided subscription along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, 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 layer 3 (L3) networks in the subscription. - * - * Get a list of layer 3 (L3) networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 layer 3 (L3) networks in the provided subscription as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer top, String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List layer 3 (L3) networks in the subscription. - * - * Get a list of layer 3 (L3) networks in the provided subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of layer 3 (L3) networks in the provided subscription as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List layer 3 (L3) networks in the subscription. - * - * Get a list of layer 3 (L3) networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 layer 3 (L3) networks in the provided subscription along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List layer 3 (L3) networks in the subscription. - * - * Get a list of layer 3 (L3) networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 layer 3 (L3) networks in the provided subscription along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List layer 3 (L3) networks in the subscription. - * - * Get a list of layer 3 (L3) networks in the provided subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of layer 3 (L3) networks in the provided subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listSinglePage(top, skipToken), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); - } - - /** - * List layer 3 (L3) networks in the subscription. - * - * Get a list of layer 3 (L3) networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 layer 3 (L3) networks in the provided subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Integer top, String skipToken, Context context) { - return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); - } - - /** - * List layer 3 (L3) networks in the resource group. - * - * Get a list of layer 3 (L3) networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 layer 3 (L3) networks in the provided resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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 layer 3 (L3) networks in the resource group. - * - * Get a list of layer 3 (L3) networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 layer 3 (L3) networks in the provided resource group as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, - String skipToken) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List layer 3 (L3) networks in the resource group. - * - * Get a list of layer 3 (L3) networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of layer 3 (L3) networks in the provided resource group as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List layer 3 (L3) networks in the resource group. - * - * Get a list of layer 3 (L3) networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 layer 3 (L3) networks in the provided resource group along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List layer 3 (L3) networks in the resource group. - * - * Get a list of layer 3 (L3) networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 layer 3 (L3) networks in the provided resource group along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List layer 3 (L3) networks in the resource group. - * - * Get a list of layer 3 (L3) networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of layer 3 (L3) networks in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); - } - - /** - * List layer 3 (L3) networks in the resource group. - * - * Get a list of layer 3 (L3) networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 layer 3 (L3) networks in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + @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> listBySubscriptionNext( + @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 listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * Retrieve the layer 3 (L3) network. - * * Get properties of the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -620,21 +234,6 @@ public PagedIterable listByResourceGroup(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String l3NetworkName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3NetworkName == null) { - return Mono.error(new IllegalArgumentException("Parameter l3NetworkName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), @@ -643,8 +242,6 @@ private Mono> getByResourceGroupWithResponseAsync(Strin } /** - * Retrieve the layer 3 (L3) network. - * * Get properties of the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -661,8 +258,6 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S } /** - * Retrieve the layer 3 (L3) network. - * * Get properties of the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -676,32 +271,12 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String l3NetworkName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3NetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter l3NetworkName is required and cannot be null.")); - } final String accept = "application/json"; return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3NetworkName, accept, context); } /** - * Retrieve the layer 3 (L3) network. - * * Get properties of the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -717,8 +292,6 @@ public L3NetworkInner getByResourceGroup(String resourceGroupName, String l3Netw } /** - * Create or update the layer 3 (L3) network. - * * Create a new layer 3 (L3) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -737,38 +310,16 @@ public L3NetworkInner getByResourceGroup(String resourceGroupName, String l3Netw @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String l3NetworkName, L3NetworkInner l3NetworkParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3NetworkName == null) { - return Mono.error(new IllegalArgumentException("Parameter l3NetworkName is required and cannot be null.")); - } - if (l3NetworkParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3NetworkParameters is required and cannot be null.")); - } else { - l3NetworkParameters.validate(); - } + 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, l3NetworkName, ifMatch, ifNoneMatch, - l3NetworkParameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, contentType, + accept, l3NetworkParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update the layer 3 (L3) network. - * * Create a new layer 3 (L3) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -787,39 +338,14 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String l3NetworkName, L3NetworkInner l3NetworkParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3NetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter l3NetworkName is required and cannot be null.")); - } - if (l3NetworkParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter l3NetworkParameters is required and cannot be null.")); - } else { - l3NetworkParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, - l3NetworkParameters, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, contentType, + accept, l3NetworkParameters, Context.NONE); } /** - * Create or update the layer 3 (L3) network. - * * Create a new layer 3 (L3) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -839,39 +365,14 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String l3NetworkName, L3NetworkInner l3NetworkParameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3NetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter l3NetworkName is required and cannot be null.")); - } - if (l3NetworkParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter l3NetworkParameters is required and cannot be null.")); - } else { - l3NetworkParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, - l3NetworkParameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, contentType, + accept, l3NetworkParameters, context); } /** - * Create or update the layer 3 (L3) network. - * * Create a new layer 3 (L3) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -897,8 +398,6 @@ private PollerFlux, L3NetworkInner> beginCreateOrUpda } /** - * Create or update the layer 3 (L3) network. - * * Create a new layer 3 (L3) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -922,8 +421,6 @@ private PollerFlux, L3NetworkInner> beginCreateOrUpda } /** - * Create or update the layer 3 (L3) network. - * * Create a new layer 3 (L3) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -949,8 +446,6 @@ public SyncPoller, L3NetworkInner> beginCreateOrUpdat } /** - * Create or update the layer 3 (L3) network. - * * Create a new layer 3 (L3) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -974,8 +469,6 @@ public SyncPoller, L3NetworkInner> beginCreateOrUpdat } /** - * Create or update the layer 3 (L3) network. - * * Create a new layer 3 (L3) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1002,8 +495,6 @@ public SyncPoller, L3NetworkInner> beginCreateOrUpdat } /** - * Create or update the layer 3 (L3) network. - * * Create a new layer 3 (L3) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1028,8 +519,6 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin } /** - * Create or update the layer 3 (L3) network. - * * Create a new layer 3 (L3) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1052,8 +541,6 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin } /** - * Create or update the layer 3 (L3) network. - * * Create a new layer 3 (L3) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1074,8 +561,6 @@ public L3NetworkInner createOrUpdate(String resourceGroupName, String l3NetworkN } /** - * Create or update the layer 3 (L3) network. - * * Create a new layer 3 (L3) network or update the properties of the existing network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1099,8 +584,98 @@ public L3NetworkInner createOrUpdate(String resourceGroupName, String l3NetworkN } /** - * Delete the layer 3 (L3) network. + * Update tags associated with the provided layer 3 (L3) network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3NetworkName The name of the L3 network. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param l3NetworkUpdateParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return l3Network represents a network that utilizes a single isolation domain set up for layer-3 resources along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String l3NetworkName, + String ifMatch, String ifNoneMatch, L3NetworkPatchParameters l3NetworkUpdateParameters) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, accept, + l3NetworkUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update tags associated with the provided layer 3 (L3) network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3NetworkName The name of the L3 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 l3Network represents a network that utilizes a single isolation domain set up for layer-3 resources on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String l3NetworkName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final L3NetworkPatchParameters l3NetworkUpdateParameters = null; + return updateWithResponseAsync(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, + l3NetworkUpdateParameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update tags associated with the provided layer 3 (L3) network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3NetworkName The name of the L3 network. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param l3NetworkUpdateParameters The request body. + * @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 l3Network represents a network that utilizes a single isolation domain set up for layer-3 resources along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String l3NetworkName, String ifMatch, + String ifNoneMatch, L3NetworkPatchParameters l3NetworkUpdateParameters, Context context) { + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, accept, + l3NetworkUpdateParameters, context); + } + + /** + * Update tags associated with the provided layer 3 (L3) network. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3NetworkName The name of the L3 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 l3Network represents a network that utilizes a single isolation domain set up for layer-3 resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public L3NetworkInner update(String resourceGroupName, String l3NetworkName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final L3NetworkPatchParameters l3NetworkUpdateParameters = null; + return updateWithResponse(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, l3NetworkUpdateParameters, + Context.NONE).getValue(); + } + + /** * Delete the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1112,36 +687,18 @@ public L3NetworkInner createOrUpdate(String resourceGroupName, String l3NetworkN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String l3NetworkName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3NetworkName == null) { - return Mono.error(new IllegalArgumentException("Parameter l3NetworkName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, accept, context)) + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the layer 3 (L3) network. - * * Delete the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1153,38 +710,16 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String l3NetworkName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3NetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter l3NetworkName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, accept, - Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, Context.NONE); } /** - * Delete the layer 3 (L3) network. - * * Delete the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1197,37 +732,16 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String l3NetworkName, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3NetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter l3NetworkName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, accept, context); + this.client.getSubscriptionId(), resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, context); } /** - * Delete the layer 3 (L3) network. - * * Delete the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1239,21 +753,18 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String l3NetworkName, String ifMatch, String ifNoneMatch) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String l3NetworkName, + String ifMatch, String ifNoneMatch) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the layer 3 (L3) network. - * * Delete the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1261,23 +772,19 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String l3NetworkName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String l3NetworkName) { final String ifMatch = null; final String ifNoneMatch = null; Mono>> mono = deleteWithResponseAsync(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the layer 3 (L3) network. - * * Delete the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1289,19 +796,16 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String l3NetworkName, String ifMatch, String ifNoneMatch) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String l3NetworkName, + String ifMatch, String ifNoneMatch) { Response response = deleteWithResponse(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the layer 3 (L3) network. - * * Delete the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1309,21 +813,17 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String l3NetworkName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String l3NetworkName) { final String ifMatch = null; final String ifNoneMatch = null; Response response = deleteWithResponse(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the layer 3 (L3) network. - * * Delete the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1336,20 +836,71 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( - String resourceGroupName, String l3NetworkName, String ifMatch, String ifNoneMatch, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String l3NetworkName, + String ifMatch, String ifNoneMatch, Context context) { Response response = deleteWithResponse(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the provided layer 3 (L3) network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3NetworkName The name of the L3 network. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 l3NetworkName, String ifMatch, String ifNoneMatch) { + return beginDeleteAsync(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the provided layer 3 (L3) network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3NetworkName The name of the L3 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 l3NetworkName) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginDeleteAsync(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the layer 3 (L3) network. + * Delete the provided layer 3 (L3) network. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3NetworkName The name of the L3 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 l3NetworkName) { + final String ifMatch = null; + final String ifNoneMatch = null; + beginDelete(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch).getFinalResult(); + } + + /** * Delete the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1358,281 +909,339 @@ public SyncPoller, OperationStatusResultI * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @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 l3NetworkName, String ifMatch, String ifNoneMatch, + Context context) { + beginDelete(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, context).getFinalResult(); + } + + /** + * Get a list of layer 3 (L3) networks in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 layer 3 (L3) networks in the provided resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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 a list of layer 3 (L3) networks in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 layer 3 (L3) networks in the provided resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, + String skipToken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of layer 3 (L3) networks in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of layer 3 (L3) networks in the provided resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of layer 3 (L3) networks in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return a list of layer 3 (L3) networks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String l3NetworkName, String ifMatch, - String ifNoneMatch) { - return beginDeleteAsync(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete the layer 3 (L3) network. - * - * Delete the provided layer 3 (L3) network. + * Get a list of layer 3 (L3) networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 on successful completion of {@link Mono}. + * @return a list of layer 3 (L3) networks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String l3NetworkName) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginDeleteAsync(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete the layer 3 (L3) network. - * - * Delete the provided layer 3 (L3) network. + * Get a list of layer 3 (L3) networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 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 current status of an async operation. + * @return a list of layer 3 (L3) networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String l3NetworkName) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginDelete(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch).getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Delete the layer 3 (L3) network. - * - * Delete the provided layer 3 (L3) network. + * Get a list of layer 3 (L3) networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of layer 3 (L3) networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String l3NetworkName, String ifMatch, - String ifNoneMatch, Context context) { - return beginDelete(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, context).getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Patch the layer 3 (L3) network. - * - * Update tags associated with the provided layer 3 (L3) network. + * Get a list of layer 3 (L3) networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param l3NetworkUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return l3Network represents a network that utilizes a single isolation domain set up for layer-3 resources along - * with {@link Response} on successful completion of {@link Mono}. + * @return a list of layer 3 (L3) networks in the provided subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String l3NetworkName, - String ifMatch, String ifNoneMatch, L3NetworkPatchParameters l3NetworkUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3NetworkName == null) { - return Mono.error(new IllegalArgumentException("Parameter l3NetworkName is required and cannot be null.")); - } - if (l3NetworkUpdateParameters != null) { - l3NetworkUpdateParameters.validate(); - } + private Mono> listSinglePageAsync(Integer top, String skipToken) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, - l3NetworkUpdateParameters, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, 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())); } /** - * Patch the layer 3 (L3) network. + * Get a list of layer 3 (L3) networks in the provided subscription. * - * Update tags associated with the provided layer 3 (L3) network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 layer 3 (L3) networks in the provided subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Integer top, String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of layer 3 (L3) networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. + * @throws 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 layer 3 (L3) networks in the provided subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of layer 3 (L3) networks in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return l3Network represents a network that utilizes a single isolation domain set up for layer-3 resources on - * successful completion of {@link Mono}. + * @return a list of layer 3 (L3) networks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String l3NetworkName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final L3NetworkPatchParameters l3NetworkUpdateParameters = null; - return updateWithResponseAsync(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, - l3NetworkUpdateParameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listSinglePage(Integer top, String skipToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the layer 3 (L3) network. - * - * Update tags associated with the provided layer 3 (L3) network. + * Get a list of layer 3 (L3) networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param l3NetworkUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 l3Network represents a network that utilizes a single isolation domain set up for layer-3 resources along - * with {@link Response}. + * @return a list of layer 3 (L3) networks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String l3NetworkName, String ifMatch, - String ifNoneMatch, L3NetworkPatchParameters l3NetworkUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3NetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter l3NetworkName is required and cannot be null.")); - } - if (l3NetworkUpdateParameters != null) { - l3NetworkUpdateParameters.validate(); - } + private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, - l3NetworkUpdateParameters, accept, context); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the layer 3 (L3) network. + * Get a list of layer 3 (L3) networks in the provided subscription. * - * Update tags associated with the provided layer 3 (L3) network. + * @throws 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 layer 3 (L3) networks in the provided subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listSinglePage(top, skipToken), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * Get a list of layer 3 (L3) networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 l3Network represents a network that utilizes a single isolation domain set up for layer-3 resources. + * @return a list of layer 3 (L3) networks in the provided subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public L3NetworkInner update(String resourceGroupName, String l3NetworkName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final L3NetworkPatchParameters l3NetworkUpdateParameters = null; - return updateWithResponse(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, l3NetworkUpdateParameters, - Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Integer top, String skipToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * List layer 3 (L3) networks in the subscription. - * * 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 layer 3 (L3) networks in the provided subscription along with {@link PagedResponse} on + * @return a list of layer 3 (L3) networks in the provided resource group along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); } /** - * List layer 3 (L3) networks in the subscription. - * * 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 layer 3 (L3) networks in the provided subscription along with {@link PagedResponse}. + * @return a list of layer 3 (L3) networks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = 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); } /** - * List layer 3 (L3) networks in the subscription. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1640,88 +1249,57 @@ private PagedResponse listBySubscriptionNextSinglePage(String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of layer 3 (L3) networks in the provided subscription along with {@link PagedResponse}. + * @return a list of layer 3 (L3) networks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List layer 3 (L3) networks in the resource group. - * * 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 layer 3 (L3) networks in the provided resource group along with {@link PagedResponse} on + * @return a list of layer 3 (L3) networks in the provided subscription along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(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())); } /** - * List layer 3 (L3) networks in the resource group. - * * 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 layer 3 (L3) networks in the provided resource group along with {@link PagedResponse}. + * @return a list of layer 3 (L3) networks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List layer 3 (L3) networks in the resource group. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1729,25 +1307,14 @@ private PagedResponse listByResourceGroupNextSinglePage(String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 layer 3 (L3) networks in the provided resource group along with {@link PagedResponse}. + * @return a list of layer 3 (L3) networks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(L3NetworksClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L3NetworksImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L3NetworksImpl.java index f3e521d01a3d..40b0ff766726 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L3NetworksImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/L3NetworksImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -11,10 +11,8 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.L3NetworksClient; import com.azure.resourcemanager.networkcloud.fluent.models.L3NetworkInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.L3Network; import com.azure.resourcemanager.networkcloud.models.L3Networks; -import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; public final class L3NetworksImpl implements L3Networks { private static final ClientLogger LOGGER = new ClientLogger(L3NetworksImpl.class); @@ -29,14 +27,30 @@ public L3NetworksImpl(L3NetworksClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new L3NetworkImpl(inner1, this.manager())); + public Response getByResourceGroupWithResponse(String resourceGroupName, String l3NetworkName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, l3NetworkName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new L3NetworkImpl(inner.getValue(), this.manager())); } - public PagedIterable list(Integer top, String skipToken, Context context) { - PagedIterable inner = this.serviceClient().list(top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new L3NetworkImpl(inner1, this.manager())); + public L3Network getByResourceGroup(String resourceGroupName, String l3NetworkName) { + L3NetworkInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, l3NetworkName); + if (inner != null) { + return new L3NetworkImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String l3NetworkName) { + this.serviceClient().delete(resourceGroupName, l3NetworkName); + } + + public void delete(String resourceGroupName, String l3NetworkName, String ifMatch, String ifNoneMatch, + Context context) { + this.serviceClient().delete(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, context); } public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -51,45 +65,14 @@ public PagedIterable listByResourceGroup(String resourceGroupName, In return ResourceManagerUtils.mapPage(inner, inner1 -> new L3NetworkImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse(String resourceGroupName, String l3NetworkName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, l3NetworkName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new L3NetworkImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public L3Network getByResourceGroup(String resourceGroupName, String l3NetworkName) { - L3NetworkInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, l3NetworkName); - if (inner != null) { - return new L3NetworkImpl(inner, this.manager()); - } else { - return null; - } - } - - public OperationStatusResult deleteByResourceGroup(String resourceGroupName, String l3NetworkName) { - OperationStatusResultInner inner = this.serviceClient().delete(resourceGroupName, l3NetworkName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new L3NetworkImpl(inner1, this.manager())); } - public OperationStatusResult delete(String resourceGroupName, String l3NetworkName, String ifMatch, - String ifNoneMatch, Context context) { - OperationStatusResultInner inner - = this.serviceClient().delete(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(Integer top, String skipToken, Context context) { + PagedIterable inner = this.serviceClient().list(top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new L3NetworkImpl(inner1, this.manager())); } public L3Network getById(String id) { @@ -120,7 +103,7 @@ public Response getByIdWithResponse(String id, Context context) { return this.getByResourceGroupWithResponse(resourceGroupName, l3NetworkName, context); } - public OperationStatusResult deleteById(String id) { + public void deleteById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -133,11 +116,10 @@ public OperationStatusResult deleteById(String id) { } String localIfMatch = null; String localIfNoneMatch = null; - return this.delete(resourceGroupName, l3NetworkName, localIfMatch, localIfNoneMatch, Context.NONE); + this.delete(resourceGroupName, l3NetworkName, localIfMatch, localIfNoneMatch, Context.NONE); } - public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, - Context context) { + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -148,7 +130,7 @@ public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'l3Networks'.", id))); } - return this.delete(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, context); + this.delete(resourceGroupName, l3NetworkName, ifMatch, ifNoneMatch, context); } private L3NetworksClient serviceClient() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/MetricsConfigurationsClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/MetricsConfigurationsClientImpl.java index ce32138f6e02..f31ff1b08eb5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/MetricsConfigurationsClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/MetricsConfigurationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -31,13 +31,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.MetricsConfigurationsClient; import com.azure.resourcemanager.networkcloud.fluent.models.ClusterMetricsConfigurationInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; -import com.azure.resourcemanager.networkcloud.models.ClusterMetricsConfigurationList; +import com.azure.resourcemanager.networkcloud.implementation.models.ClusterMetricsConfigurationList; import com.azure.resourcemanager.networkcloud.models.ClusterMetricsConfigurationPatchParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,51 +53,31 @@ public final class MetricsConfigurationsClientImpl implements MetricsConfigurati /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of MetricsConfigurationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - MetricsConfigurationsClientImpl(NetworkCloudImpl client) { + MetricsConfigurationsClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(MetricsConfigurationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudMetricsConfigurations to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for NetworkCloudManagementClientMetricsConfigurations to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudMetricsConfigurations") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientMetricsConfigurations") public interface MetricsConfigurationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCluster(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByClusterSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("metricsConfigurationName") String metricsConfigurationName, @@ -109,80 +87,100 @@ Mono> get(@HostParam("$host") String @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("metricsConfigurationName") String metricsConfigurationName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("metricsConfigurationName") String metricsConfigurationName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") ClusterMetricsConfigurationInner metricsConfigurationParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("metricsConfigurationName") String metricsConfigurationName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") ClusterMetricsConfigurationInner metricsConfigurationParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("metricsConfigurationName") String metricsConfigurationName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters, + Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("metricsConfigurationName") String metricsConfigurationName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters, + Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("metricsConfigurationName") String metricsConfigurationName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}") + @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("clusterName") String clusterName, + @PathParam("metricsConfigurationName") String metricsConfigurationName, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response listByClusterSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("metricsConfigurationName") String metricsConfigurationName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -190,7 +188,7 @@ Response updateSync(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByClusterNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -198,234 +196,11 @@ Mono> listByClusterNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByClusterNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List metrics configurations of the cluster. - * - * Get a list of metrics configurations for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 metrics configurations for the provided cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterSinglePageAsync(String resourceGroupName, - String clusterName, Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, top, skipToken, 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 metrics configurations of the cluster. - * - * Get a list of metrics configurations for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 metrics configurations for the provided cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, - Integer top, String skipToken) { - return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, top, skipToken), - nextLink -> listByClusterNextSinglePageAsync(nextLink)); - } - - /** - * List metrics configurations of the cluster. - * - * Get a list of metrics configurations for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 metrics configurations for the provided cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterAsync(String resourceGroupName, - String clusterName) { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, top, skipToken), - nextLink -> listByClusterNextSinglePageAsync(nextLink)); - } - - /** - * List metrics configurations of the cluster. - * - * Get a list of metrics configurations for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 metrics configurations for the provided cluster along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByClusterSinglePage(String resourceGroupName, - String clusterName, Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List metrics configurations of the cluster. - * - * Get a list of metrics configurations for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 metrics configurations for the provided cluster along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByClusterSinglePage(String resourceGroupName, - String clusterName, Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List metrics configurations of the cluster. - * - * Get a list of metrics configurations for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 metrics configurations for the provided cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCluster(String resourceGroupName, String clusterName) { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listByClusterSinglePage(resourceGroupName, clusterName, top, skipToken), - nextLink -> listByClusterNextSinglePage(nextLink)); - } - - /** - * List metrics configurations of the cluster. - * - * Get a list of metrics configurations for the provided cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 metrics configurations for the provided cluster as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCluster(String resourceGroupName, String clusterName, - Integer top, String skipToken, Context context) { - return new PagedIterable<>( - () -> listByClusterSinglePage(resourceGroupName, clusterName, top, skipToken, context), - nextLink -> listByClusterNextSinglePage(nextLink, context)); - } - - /** - * Retrieve the metrics configuration of the cluster. - * * Get metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -440,25 +215,6 @@ public PagedIterable listByCluster(String reso @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String metricsConfigurationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (metricsConfigurationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter metricsConfigurationName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, metricsConfigurationName, accept, context)) @@ -466,8 +222,6 @@ private Mono> getWithResponseAsync(St } /** - * Retrieve the metrics configuration of the cluster. - * * Get metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -486,8 +240,6 @@ private Mono getAsync(String resourceGroupName } /** - * Retrieve the metrics configuration of the cluster. - * * Get metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -502,37 +254,12 @@ private Mono getAsync(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String clusterName, String metricsConfigurationName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (metricsConfigurationName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter metricsConfigurationName is required and cannot be null.")); - } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, metricsConfigurationName, accept, context); } /** - * Retrieve the metrics configuration of the cluster. - * * Get metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -550,8 +277,6 @@ public ClusterMetricsConfigurationInner get(String resourceGroupName, String clu } /** - * Create or update metrics configuration of the cluster. - * * Create new or update the existing metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -572,42 +297,16 @@ public ClusterMetricsConfigurationInner get(String resourceGroupName, String clu private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String clusterName, String metricsConfigurationName, ClusterMetricsConfigurationInner metricsConfigurationParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (metricsConfigurationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter metricsConfigurationName is required and cannot be null.")); - } - if (metricsConfigurationParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter metricsConfigurationParameters is required and cannot be null.")); - } else { - metricsConfigurationParameters.validate(); - } + 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, clusterName, metricsConfigurationName, ifMatch, - ifNoneMatch, metricsConfigurationParameters, accept, context)) + ifNoneMatch, contentType, accept, metricsConfigurationParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update metrics configuration of the cluster. - * * Create new or update the existing metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -628,45 +327,14 @@ private Mono>> createOrUpdateWithResponseAsync(String private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, String metricsConfigurationName, ClusterMetricsConfigurationInner metricsConfigurationParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (metricsConfigurationName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter metricsConfigurationName is required and cannot be null.")); - } - if (metricsConfigurationParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter metricsConfigurationParameters is required and cannot be null.")); - } else { - metricsConfigurationParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, metricsConfigurationName, ifMatch, - ifNoneMatch, metricsConfigurationParameters, accept, Context.NONE); + ifNoneMatch, contentType, accept, metricsConfigurationParameters, Context.NONE); } /** - * Create or update metrics configuration of the cluster. - * * Create new or update the existing metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -688,45 +356,14 @@ private Response createOrUpdateWithResponse(String resourceGroupName private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, String metricsConfigurationName, ClusterMetricsConfigurationInner metricsConfigurationParameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (metricsConfigurationName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter metricsConfigurationName is required and cannot be null.")); - } - if (metricsConfigurationParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter metricsConfigurationParameters is required and cannot be null.")); - } else { - metricsConfigurationParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, metricsConfigurationName, ifMatch, - ifNoneMatch, metricsConfigurationParameters, accept, context); + ifNoneMatch, contentType, accept, metricsConfigurationParameters, context); } /** - * Create or update metrics configuration of the cluster. - * * Create new or update the existing metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -755,8 +392,6 @@ private Response createOrUpdateWithResponse(String resourceGroupName } /** - * Create or update metrics configuration of the cluster. - * * Create new or update the existing metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -783,8 +418,6 @@ private Response createOrUpdateWithResponse(String resourceGroupName } /** - * Create or update metrics configuration of the cluster. - * * Create new or update the existing metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -812,8 +445,6 @@ private Response createOrUpdateWithResponse(String resourceGroupName } /** - * Create or update metrics configuration of the cluster. - * * Create new or update the existing metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -839,8 +470,6 @@ private Response createOrUpdateWithResponse(String resourceGroupName } /** - * Create or update metrics configuration of the cluster. - * * Create new or update the existing metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -870,8 +499,6 @@ private Response createOrUpdateWithResponse(String resourceGroupName } /** - * Create or update metrics configuration of the cluster. - * * Create new or update the existing metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -897,8 +524,6 @@ private Mono createOrUpdateAsync(String resour } /** - * Create or update metrics configuration of the cluster. - * * Create new or update the existing metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -921,8 +546,6 @@ private Mono createOrUpdateAsync(String resour } /** - * Create or update metrics configuration of the cluster. - * * Create new or update the existing metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -944,8 +567,6 @@ public ClusterMetricsConfigurationInner createOrUpdate(String resourceGroupName, } /** - * Create or update metrics configuration of the cluster. - * * Create new or update the existing metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -971,9 +592,8 @@ public ClusterMetricsConfigurationInner createOrUpdate(String resourceGroupName, } /** - * Delete the metrics configuration of the cluster. - * - * Delete the metrics configuration of the provided cluster. + * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -982,46 +602,28 @@ public ClusterMetricsConfigurationInner createOrUpdate(String resourceGroupName, * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param metricsConfigurationUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return clusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster + * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - String metricsConfigurationName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (metricsConfigurationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter metricsConfigurationName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + String metricsConfigurationName, String ifMatch, String ifNoneMatch, + ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, metricsConfigurationName, ifMatch, - ifNoneMatch, accept, context)) + ifNoneMatch, accept, metricsConfigurationUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the metrics configuration of the cluster. - * - * Delete the metrics configuration of the provided cluster. + * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1030,47 +632,26 @@ private Mono>> deleteWithResponseAsync(String resource * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param metricsConfigurationUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return clusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster + * along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String clusterName, - String metricsConfigurationName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (metricsConfigurationName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter metricsConfigurationName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String clusterName, + String metricsConfigurationName, String ifMatch, String ifNoneMatch, + ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters) { final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, metricsConfigurationName, ifMatch, - ifNoneMatch, accept, Context.NONE); + ifNoneMatch, accept, metricsConfigurationUpdateParameters, Context.NONE); } /** - * Delete the metrics configuration of the cluster. - * - * Delete the metrics configuration of the provided cluster. + * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1079,48 +660,27 @@ private Response deleteWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param metricsConfigurationUpdateParameters The request body. * @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}. + * @return clusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster + * along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String clusterName, - String metricsConfigurationName, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (metricsConfigurationName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter metricsConfigurationName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String clusterName, + String metricsConfigurationName, String ifMatch, String ifNoneMatch, + ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters, Context context) { final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, metricsConfigurationName, ifMatch, - ifNoneMatch, accept, context); + ifNoneMatch, accept, metricsConfigurationUpdateParameters, context); } /** - * Delete the metrics configuration of the cluster. - * - * Delete the metrics configuration of the provided cluster. + * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1129,26 +689,27 @@ private Response deleteWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param metricsConfigurationUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of clusterMetricsConfiguration represents the metrics configuration of + * an on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginDeleteAsync( + private PollerFlux, ClusterMetricsConfigurationInner> beginUpdateAsync( String resourceGroupName, String clusterName, String metricsConfigurationName, String ifMatch, - String ifNoneMatch) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, - this.client.getContext()); + String ifNoneMatch, ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, + metricsConfigurationName, ifMatch, ifNoneMatch, metricsConfigurationUpdateParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ClusterMetricsConfigurationInner.class, + ClusterMetricsConfigurationInner.class, this.client.getContext()); } /** - * Delete the metrics configuration of the cluster. - * - * Delete the metrics configuration of the provided cluster. + * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1156,24 +717,25 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of clusterMetricsConfiguration represents the metrics configuration of + * an on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String clusterName, String metricsConfigurationName) { + private PollerFlux, ClusterMetricsConfigurationInner> + beginUpdateAsync(String resourceGroupName, String clusterName, String metricsConfigurationName) { final String ifMatch = null; final String ifNoneMatch = null; - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, - this.client.getContext()); + final ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters = null; + Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, + metricsConfigurationName, ifMatch, ifNoneMatch, metricsConfigurationUpdateParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ClusterMetricsConfigurationInner.class, + ClusterMetricsConfigurationInner.class, this.client.getContext()); } /** - * Delete the metrics configuration of the cluster. - * - * Delete the metrics configuration of the provided cluster. + * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1182,25 +744,26 @@ private PollerFlux, OperationStatusResult * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param metricsConfigurationUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of clusterMetricsConfiguration represents the metrics configuration of + * an on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( + public SyncPoller, ClusterMetricsConfigurationInner> beginUpdate( String resourceGroupName, String clusterName, String metricsConfigurationName, String ifMatch, - String ifNoneMatch) { - Response response - = deleteWithResponse(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + String ifNoneMatch, ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, clusterName, metricsConfigurationName, + ifMatch, ifNoneMatch, metricsConfigurationUpdateParameters); + return this.client.getLroResult(response, + ClusterMetricsConfigurationInner.class, ClusterMetricsConfigurationInner.class, Context.NONE); } /** - * Delete the metrics configuration of the cluster. - * - * Delete the metrics configuration of the provided cluster. + * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1208,23 +771,24 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of clusterMetricsConfiguration represents the metrics configuration of + * an on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String clusterName, String metricsConfigurationName) { + public SyncPoller, ClusterMetricsConfigurationInner> + beginUpdate(String resourceGroupName, String clusterName, String metricsConfigurationName) { final String ifMatch = null; final String ifNoneMatch = null; - Response response - = deleteWithResponse(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + final ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters = null; + Response response = updateWithResponse(resourceGroupName, clusterName, metricsConfigurationName, + ifMatch, ifNoneMatch, metricsConfigurationUpdateParameters); + return this.client.getLroResult(response, + ClusterMetricsConfigurationInner.class, ClusterMetricsConfigurationInner.class, Context.NONE); } /** - * Delete the metrics configuration of the cluster. - * - * Delete the metrics configuration of the provided cluster. + * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1233,26 +797,28 @@ public SyncPoller, OperationStatusResultI * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param metricsConfigurationUpdateParameters The request body. * @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. + * @return the {@link SyncPoller} for polling of clusterMetricsConfiguration represents the metrics configuration of + * an on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( + public SyncPoller, ClusterMetricsConfigurationInner> beginUpdate( String resourceGroupName, String clusterName, String metricsConfigurationName, String ifMatch, - String ifNoneMatch, Context context) { - Response response = deleteWithResponse(resourceGroupName, clusterName, metricsConfigurationName, - ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + String ifNoneMatch, ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters, + Context context) { + Response response = updateWithResponse(resourceGroupName, clusterName, metricsConfigurationName, + ifMatch, ifNoneMatch, metricsConfigurationUpdateParameters, context); + return this.client.getLroResult(response, + ClusterMetricsConfigurationInner.class, ClusterMetricsConfigurationInner.class, context); } /** - * Delete the metrics configuration of the cluster. - * - * Delete the metrics configuration of the provided cluster. + * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1261,22 +827,24 @@ public SyncPoller, OperationStatusResultI * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param metricsConfigurationUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return clusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName, - String metricsConfigurationName, String ifMatch, String ifNoneMatch) { - return beginDeleteAsync(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String clusterName, + String metricsConfigurationName, String ifMatch, String ifNoneMatch, + ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters) { + return beginUpdateAsync(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch, + metricsConfigurationUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the metrics configuration of the cluster. - * - * Delete the metrics configuration of the provided cluster. + * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1284,21 +852,22 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return clusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName, + private Mono updateAsync(String resourceGroupName, String clusterName, String metricsConfigurationName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginDeleteAsync(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + final ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters = null; + return beginUpdateAsync(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch, + metricsConfigurationUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the metrics configuration of the cluster. - * - * Delete the metrics configuration of the provided cluster. + * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1306,21 +875,21 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return clusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String clusterName, + public ClusterMetricsConfigurationInner update(String resourceGroupName, String clusterName, String metricsConfigurationName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginDelete(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch) - .getFinalResult(); + final ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters = null; + return beginUpdate(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch, + metricsConfigurationUpdateParameters).getFinalResult(); } /** - * Delete the metrics configuration of the cluster. - * - * Delete the metrics configuration of the provided cluster. + * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1329,24 +898,23 @@ public OperationStatusResultInner delete(String resourceGroupName, String cluste * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param metricsConfigurationUpdateParameters The request body. * @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. + * @return clusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String clusterName, - String metricsConfigurationName, String ifMatch, String ifNoneMatch, Context context) { - return beginDelete(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch, context) - .getFinalResult(); + public ClusterMetricsConfigurationInner update(String resourceGroupName, String clusterName, + String metricsConfigurationName, String ifMatch, String ifNoneMatch, + ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch, + metricsConfigurationUpdateParameters, context).getFinalResult(); } /** - * Patch metrics configuration of the cluster. - * - * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1355,52 +923,23 @@ public OperationStatusResultInner delete(String resourceGroupName, String cluste * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param metricsConfigurationUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster - * along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, - String metricsConfigurationName, String ifMatch, String ifNoneMatch, - ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (metricsConfigurationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter metricsConfigurationName is required and cannot be null.")); - } - if (metricsConfigurationUpdateParameters != null) { - metricsConfigurationUpdateParameters.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String metricsConfigurationName, String ifMatch, String ifNoneMatch) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, metricsConfigurationName, ifMatch, - ifNoneMatch, metricsConfigurationUpdateParameters, accept, context)) + ifNoneMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Patch metrics configuration of the cluster. - * - * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1409,54 +948,21 @@ private Mono>> updateWithResponseAsync(String resource * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param metricsConfigurationUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster - * along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String clusterName, - String metricsConfigurationName, String ifMatch, String ifNoneMatch, - ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (metricsConfigurationName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter metricsConfigurationName is required and cannot be null.")); - } - if (metricsConfigurationUpdateParameters != null) { - metricsConfigurationUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + private Response deleteWithResponse(String resourceGroupName, String clusterName, + String metricsConfigurationName, String ifMatch, String ifNoneMatch) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, metricsConfigurationName, ifMatch, - ifNoneMatch, metricsConfigurationUpdateParameters, accept, Context.NONE); + ifNoneMatch, Context.NONE); } /** - * Patch metrics configuration of the cluster. - * - * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1465,55 +971,22 @@ private Response updateWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param metricsConfigurationUpdateParameters The request body. * @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 clusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster - * along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String clusterName, - String metricsConfigurationName, String ifMatch, String ifNoneMatch, - ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (metricsConfigurationName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter metricsConfigurationName is required and cannot be null.")); - } - if (metricsConfigurationUpdateParameters != null) { - metricsConfigurationUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + private Response deleteWithResponse(String resourceGroupName, String clusterName, + String metricsConfigurationName, String ifMatch, String ifNoneMatch, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, metricsConfigurationName, ifMatch, - ifNoneMatch, metricsConfigurationUpdateParameters, accept, context); + ifNoneMatch, context); } /** - * Patch metrics configuration of the cluster. - * - * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1522,29 +995,22 @@ private Response updateWithResponse(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param metricsConfigurationUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 clusterMetricsConfiguration represents the metrics configuration of - * an on-premises Network Cloud cluster. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterMetricsConfigurationInner> beginUpdateAsync( - String resourceGroupName, String clusterName, String metricsConfigurationName, String ifMatch, - String ifNoneMatch, ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, - metricsConfigurationName, ifMatch, ifNoneMatch, metricsConfigurationUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ClusterMetricsConfigurationInner.class, - ClusterMetricsConfigurationInner.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String metricsConfigurationName, String ifMatch, String ifNoneMatch) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Patch metrics configuration of the cluster. - * - * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1552,27 +1018,21 @@ private PollerFlux, ClusterMetricsC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 clusterMetricsConfiguration represents the metrics configuration of - * an on-premises Network Cloud cluster. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterMetricsConfigurationInner> - beginUpdateAsync(String resourceGroupName, String clusterName, String metricsConfigurationName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String metricsConfigurationName) { final String ifMatch = null; final String ifNoneMatch = null; - final ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters = null; - Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, - metricsConfigurationName, ifMatch, ifNoneMatch, metricsConfigurationUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ClusterMetricsConfigurationInner.class, - ClusterMetricsConfigurationInner.class, this.client.getContext()); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Patch metrics configuration of the cluster. - * - * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1581,28 +1041,21 @@ private PollerFlux, ClusterMetricsC * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param metricsConfigurationUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 clusterMetricsConfiguration represents the metrics configuration of - * an on-premises Network Cloud cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterMetricsConfigurationInner> beginUpdate( - String resourceGroupName, String clusterName, String metricsConfigurationName, String ifMatch, - String ifNoneMatch, ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, clusterName, metricsConfigurationName, - ifMatch, ifNoneMatch, metricsConfigurationUpdateParameters); - return this.client.getLroResult(response, - ClusterMetricsConfigurationInner.class, ClusterMetricsConfigurationInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String metricsConfigurationName, String ifMatch, String ifNoneMatch) { + Response response + = deleteWithResponse(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Patch metrics configuration of the cluster. - * - * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1610,26 +1063,20 @@ public SyncPoller, ClusterMetricsCo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 clusterMetricsConfiguration represents the metrics configuration of - * an on-premises Network Cloud cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterMetricsConfigurationInner> - beginUpdate(String resourceGroupName, String clusterName, String metricsConfigurationName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String metricsConfigurationName) { final String ifMatch = null; final String ifNoneMatch = null; - final ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters = null; - Response response = updateWithResponse(resourceGroupName, clusterName, metricsConfigurationName, - ifMatch, ifNoneMatch, metricsConfigurationUpdateParameters); - return this.client.getLroResult(response, - ClusterMetricsConfigurationInner.class, ClusterMetricsConfigurationInner.class, Context.NONE); + Response response + = deleteWithResponse(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Patch metrics configuration of the cluster. - * - * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1638,30 +1085,22 @@ public SyncPoller, ClusterMetricsCo * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param metricsConfigurationUpdateParameters The request body. * @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 clusterMetricsConfiguration represents the metrics configuration of - * an on-premises Network Cloud cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterMetricsConfigurationInner> beginUpdate( - String resourceGroupName, String clusterName, String metricsConfigurationName, String ifMatch, - String ifNoneMatch, ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters, - Context context) { - Response response = updateWithResponse(resourceGroupName, clusterName, metricsConfigurationName, - ifMatch, ifNoneMatch, metricsConfigurationUpdateParameters, context); - return this.client.getLroResult(response, - ClusterMetricsConfigurationInner.class, ClusterMetricsConfigurationInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String metricsConfigurationName, String ifMatch, String ifNoneMatch, Context context) { + Response response = deleteWithResponse(resourceGroupName, clusterName, metricsConfigurationName, + ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Patch metrics configuration of the cluster. - * - * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1670,26 +1109,20 @@ public SyncPoller, ClusterMetricsCo * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param metricsConfigurationUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster - * on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String clusterName, - String metricsConfigurationName, String ifMatch, String ifNoneMatch, - ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters) { - return beginUpdateAsync(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch, - metricsConfigurationUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + private Mono deleteAsync(String resourceGroupName, String clusterName, String metricsConfigurationName, + String ifMatch, String ifNoneMatch) { + return beginDeleteAsync(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Patch metrics configuration of the cluster. - * - * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1697,24 +1130,18 @@ private Mono updateAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster - * on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String clusterName, - String metricsConfigurationName) { + private Mono deleteAsync(String resourceGroupName, String clusterName, String metricsConfigurationName) { final String ifMatch = null; final String ifNoneMatch = null; - final ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters = null; - return beginUpdateAsync(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch, - metricsConfigurationUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + return beginDeleteAsync(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Patch metrics configuration of the cluster. - * - * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1722,23 +1149,16 @@ private Mono updateAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterMetricsConfigurationInner update(String resourceGroupName, String clusterName, - String metricsConfigurationName) { + public void delete(String resourceGroupName, String clusterName, String metricsConfigurationName) { final String ifMatch = null; final String ifNoneMatch = null; - final ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters = null; - return beginUpdate(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch, - metricsConfigurationUpdateParameters).getFinalResult(); + beginDelete(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch).getFinalResult(); } /** - * Patch metrics configuration of the cluster. - * - * Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. - * Properties and tag updates can be done independently. + * Delete the metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. @@ -1747,24 +1167,175 @@ public ClusterMetricsConfigurationInner update(String resourceGroupName, String * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. - * @param metricsConfigurationUpdateParameters The request body. * @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 clusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterMetricsConfigurationInner update(String resourceGroupName, String clusterName, - String metricsConfigurationName, String ifMatch, String ifNoneMatch, - ClusterMetricsConfigurationPatchParameters metricsConfigurationUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch, - metricsConfigurationUpdateParameters, context).getFinalResult(); + public void delete(String resourceGroupName, String clusterName, String metricsConfigurationName, String ifMatch, + String ifNoneMatch, Context context) { + beginDelete(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch, context) + .getFinalResult(); + } + + /** + * Get a list of metrics configurations for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metrics configurations for the provided cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClusterSinglePageAsync(String resourceGroupName, + String clusterName, Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, top, skipToken, 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 metrics configurations of the cluster. + * Get a list of metrics configurations for the provided cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metrics configurations for the provided cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, + Integer top, String skipToken) { + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, top, skipToken), + nextLink -> listByClusterNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of metrics configurations for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metrics configurations for the provided cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClusterAsync(String resourceGroupName, + String clusterName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, top, skipToken), + nextLink -> listByClusterNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of metrics configurations for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metrics configurations for the provided cluster along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByClusterSinglePage(String resourceGroupName, + String clusterName, Integer top, String skipToken) { + final String accept = "application/json"; + Response res + = service.listByClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of metrics configurations for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 metrics configurations for the provided cluster along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByClusterSinglePage(String resourceGroupName, + String clusterName, Integer top, String skipToken, Context context) { + final String accept = "application/json"; + Response res + = service.listByClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of metrics configurations for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metrics configurations for the provided cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCluster(String resourceGroupName, String clusterName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listByClusterSinglePage(resourceGroupName, clusterName, top, skipToken), + nextLink -> listByClusterNextSinglePage(nextLink)); + } + + /** + * Get a list of metrics configurations for the provided cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 metrics configurations for the provided cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCluster(String resourceGroupName, String clusterName, + Integer top, String skipToken, Context context) { + return new PagedIterable<>( + () -> listByClusterSinglePage(resourceGroupName, clusterName, top, skipToken, context), + nextLink -> listByClusterNextSinglePage(nextLink, context)); + } + + /** * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1776,13 +1347,6 @@ public ClusterMetricsConfigurationInner update(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1792,8 +1356,6 @@ private Mono> listByClusterNextS } /** - * List metrics configurations of the cluster. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1804,15 +1366,6 @@ private Mono> listByClusterNextS */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByClusterNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByClusterNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1821,8 +1374,6 @@ private PagedResponse listByClusterNextSingleP } /** - * List metrics configurations of the cluster. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1835,21 +1386,10 @@ private PagedResponse listByClusterNextSingleP @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByClusterNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByClusterNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(MetricsConfigurationsClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/MetricsConfigurationsImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/MetricsConfigurationsImpl.java index 223dd1b8f4b9..a39c4d5b8bce 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/MetricsConfigurationsImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/MetricsConfigurationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -11,10 +11,8 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.MetricsConfigurationsClient; import com.azure.resourcemanager.networkcloud.fluent.models.ClusterMetricsConfigurationInner; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.models.ClusterMetricsConfiguration; import com.azure.resourcemanager.networkcloud.models.MetricsConfigurations; -import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; public final class MetricsConfigurationsImpl implements MetricsConfigurations { private static final ClientLogger LOGGER = new ClientLogger(MetricsConfigurationsImpl.class); @@ -29,31 +27,12 @@ public MetricsConfigurationsImpl(MetricsConfigurationsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByCluster(String resourceGroupName, String clusterName) { - PagedIterable inner - = this.serviceClient().listByCluster(resourceGroupName, clusterName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ClusterMetricsConfigurationImpl(inner1, this.manager())); - } - - public PagedIterable listByCluster(String resourceGroupName, String clusterName, - Integer top, String skipToken, Context context) { - PagedIterable inner - = this.serviceClient().listByCluster(resourceGroupName, clusterName, top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ClusterMetricsConfigurationImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String clusterName, String metricsConfigurationName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, clusterName, metricsConfigurationName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ClusterMetricsConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ClusterMetricsConfigurationImpl(inner.getValue(), this.manager())); } public ClusterMetricsConfiguration get(String resourceGroupName, String clusterName, @@ -67,25 +46,29 @@ public ClusterMetricsConfiguration get(String resourceGroupName, String clusterN } } - public OperationStatusResult delete(String resourceGroupName, String clusterName, String metricsConfigurationName) { - OperationStatusResultInner inner - = this.serviceClient().delete(resourceGroupName, clusterName, metricsConfigurationName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String clusterName, String metricsConfigurationName) { + this.serviceClient().delete(resourceGroupName, clusterName, metricsConfigurationName); } - public OperationStatusResult delete(String resourceGroupName, String clusterName, String metricsConfigurationName, - String ifMatch, String ifNoneMatch, Context context) { - OperationStatusResultInner inner = this.serviceClient() + public void delete(String resourceGroupName, String clusterName, String metricsConfigurationName, String ifMatch, + String ifNoneMatch, Context context) { + this.serviceClient() .delete(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + } + + public PagedIterable listByCluster(String resourceGroupName, String clusterName) { + PagedIterable inner + = this.serviceClient().listByCluster(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ClusterMetricsConfigurationImpl(inner1, this.manager())); + } + + public PagedIterable listByCluster(String resourceGroupName, String clusterName, + Integer top, String skipToken, Context context) { + PagedIterable inner + = this.serviceClient().listByCluster(resourceGroupName, clusterName, top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ClusterMetricsConfigurationImpl(inner1, this.manager())); } public ClusterMetricsConfiguration getById(String id) { @@ -126,7 +109,7 @@ public Response getByIdWithResponse(String id, Cont return this.getWithResponse(resourceGroupName, clusterName, metricsConfigurationName, context); } - public OperationStatusResult deleteById(String id) { + public void deleteById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -144,12 +127,11 @@ public OperationStatusResult deleteById(String id) { } String localIfMatch = null; String localIfNoneMatch = null; - return this.delete(resourceGroupName, clusterName, metricsConfigurationName, localIfMatch, localIfNoneMatch, + this.delete(resourceGroupName, clusterName, metricsConfigurationName, localIfMatch, localIfNoneMatch, Context.NONE); } - public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, - Context context) { + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -165,7 +147,7 @@ public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'metricsConfigurations'.", id))); } - return this.delete(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch, context); + this.delete(resourceGroupName, clusterName, metricsConfigurationName, ifMatch, ifNoneMatch, context); } private MetricsConfigurationsClient serviceClient() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudBuilder.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudManagementClientBuilder.java similarity index 65% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudBuilder.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudManagementClientBuilder.java index f63b25a03e44..80cf1a548af5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudBuilder.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -15,39 +15,39 @@ import java.time.Duration; /** - * A builder for creating a new instance of the NetworkCloudImpl type. + * A builder for creating a new instance of the NetworkCloudManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = { NetworkCloudImpl.class }) -public final class NetworkCloudBuilder { +@ServiceClientBuilder(serviceClients = { NetworkCloudManagementClientImpl.class }) +public final class NetworkCloudManagementClientBuilder { /* - * The ID of the target subscription. The value must be an UUID. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. - * @return the NetworkCloudBuilder. + * @param endpoint the endpoint value. + * @return the NetworkCloudManagementClientBuilder. */ - public NetworkCloudBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public NetworkCloudManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. - * @return the NetworkCloudBuilder. + * @param subscriptionId the subscriptionId value. + * @return the NetworkCloudManagementClientBuilder. */ - public NetworkCloudBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public NetworkCloudManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -60,9 +60,9 @@ public NetworkCloudBuilder endpoint(String endpoint) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the NetworkCloudBuilder. + * @return the NetworkCloudManagementClientBuilder. */ - public NetworkCloudBuilder environment(AzureEnvironment environment) { + public NetworkCloudManagementClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -76,9 +76,9 @@ public NetworkCloudBuilder environment(AzureEnvironment environment) { * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the NetworkCloudBuilder. + * @return the NetworkCloudManagementClientBuilder. */ - public NetworkCloudBuilder pipeline(HttpPipeline pipeline) { + public NetworkCloudManagementClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -92,9 +92,9 @@ public NetworkCloudBuilder pipeline(HttpPipeline pipeline) { * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the NetworkCloudBuilder. + * @return the NetworkCloudManagementClientBuilder. */ - public NetworkCloudBuilder defaultPollInterval(Duration defaultPollInterval) { + public NetworkCloudManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -108,19 +108,19 @@ public NetworkCloudBuilder defaultPollInterval(Duration defaultPollInterval) { * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the NetworkCloudBuilder. + * @return the NetworkCloudManagementClientBuilder. */ - public NetworkCloudBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public NetworkCloudManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of NetworkCloudImpl with the provided parameters. + * Builds an instance of NetworkCloudManagementClientImpl with the provided parameters. * - * @return an instance of NetworkCloudImpl. + * @return an instance of NetworkCloudManagementClientImpl. */ - public NetworkCloudImpl buildClient() { + public NetworkCloudManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; HttpPipeline localPipeline = (pipeline != null) @@ -131,8 +131,8 @@ public NetworkCloudImpl buildClient() { SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); - NetworkCloudImpl client = new NetworkCloudImpl(localPipeline, localSerializerAdapter, localDefaultPollInterval, - localEnvironment, this.subscriptionId, localEndpoint); + NetworkCloudManagementClientImpl client = new NetworkCloudManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudManagementClientImpl.java similarity index 91% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudImpl.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudManagementClientImpl.java index 558d849c0045..13176f41a5b7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -26,6 +26,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.networkcloud.fluent.AccessBridgesClient; import com.azure.resourcemanager.networkcloud.fluent.AgentPoolsClient; import com.azure.resourcemanager.networkcloud.fluent.BareMetalMachineKeySetsClient; import com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient; @@ -36,10 +37,11 @@ import com.azure.resourcemanager.networkcloud.fluent.ConsolesClient; import com.azure.resourcemanager.networkcloud.fluent.KubernetesClusterFeaturesClient; import com.azure.resourcemanager.networkcloud.fluent.KubernetesClustersClient; +import com.azure.resourcemanager.networkcloud.fluent.KubernetesVersionsClient; import com.azure.resourcemanager.networkcloud.fluent.L2NetworksClient; import com.azure.resourcemanager.networkcloud.fluent.L3NetworksClient; import com.azure.resourcemanager.networkcloud.fluent.MetricsConfigurationsClient; -import com.azure.resourcemanager.networkcloud.fluent.NetworkCloud; +import com.azure.resourcemanager.networkcloud.fluent.NetworkCloudManagementClient; import com.azure.resourcemanager.networkcloud.fluent.OperationsClient; import com.azure.resourcemanager.networkcloud.fluent.RackSkusClient; import com.azure.resourcemanager.networkcloud.fluent.RacksClient; @@ -57,31 +59,17 @@ import reactor.core.publisher.Mono; /** - * Initializes a new instance of the NetworkCloudImpl type. + * Initializes a new instance of the NetworkCloudManagementClientImpl type. */ -@ServiceClient(builder = NetworkCloudBuilder.class) -public final class NetworkCloudImpl implements NetworkCloud { +@ServiceClient(builder = NetworkCloudManagementClientBuilder.class) +public final class NetworkCloudManagementClientImpl implements NetworkCloudManagementClient { /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -90,12 +78,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -103,6 +91,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -159,6 +161,20 @@ public OperationsClient getOperations() { return this.operations; } + /** + * The AccessBridgesClient object to access its operations. + */ + private final AccessBridgesClient accessBridges; + + /** + * Gets the AccessBridgesClient object to access its operations. + * + * @return the AccessBridgesClient object. + */ + public AccessBridgesClient getAccessBridges() { + return this.accessBridges; + } + /** * The BareMetalMachinesClient object to access its operations. */ @@ -229,6 +245,20 @@ public KubernetesClustersClient getKubernetesClusters() { return this.kubernetesClusters; } + /** + * The KubernetesVersionsClient object to access its operations. + */ + private final KubernetesVersionsClient kubernetesVersions; + + /** + * Gets the KubernetesVersionsClient object to access its operations. + * + * @return the KubernetesVersionsClient object. + */ + public KubernetesVersionsClient getKubernetesVersions() { + return this.kubernetesVersions; + } + /** * The L2NetworksClient object to access its operations. */ @@ -369,20 +399,6 @@ public BmcKeySetsClient getBmcKeySets() { return this.bmcKeySets; } - /** - * The MetricsConfigurationsClient object to access its operations. - */ - private final MetricsConfigurationsClient metricsConfigurations; - - /** - * Gets the MetricsConfigurationsClient object to access its operations. - * - * @return the MetricsConfigurationsClient object. - */ - public MetricsConfigurationsClient getMetricsConfigurations() { - return this.metricsConfigurations; - } - /** * The AgentPoolsClient object to access its operations. */ @@ -426,29 +442,45 @@ public ConsolesClient getConsoles() { } /** - * Initializes an instance of NetworkCloud client. + * The MetricsConfigurationsClient object to access its operations. + */ + private final MetricsConfigurationsClient metricsConfigurations; + + /** + * Gets the MetricsConfigurationsClient object to access its operations. + * + * @return the MetricsConfigurationsClient object. + */ + public MetricsConfigurationsClient getMetricsConfigurations() { + return this.metricsConfigurations; + } + + /** + * Initializes an instance of NetworkCloudManagementClient client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. + * @param endpoint Service host. * @param subscriptionId The ID of the target subscription. The value must be an UUID. - * @param endpoint server parameter. */ - NetworkCloudImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, - AzureEnvironment environment, String subscriptionId, String endpoint) { + NetworkCloudManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2025-09-01"; + this.subscriptionId = subscriptionId; + this.apiVersion = "2026-05-01-preview"; this.operations = new OperationsClientImpl(this); + this.accessBridges = new AccessBridgesClientImpl(this); this.bareMetalMachines = new BareMetalMachinesClientImpl(this); this.cloudServicesNetworks = new CloudServicesNetworksClientImpl(this); this.clusterManagers = new ClusterManagersClientImpl(this); this.clusters = new ClustersClientImpl(this); this.kubernetesClusters = new KubernetesClustersClientImpl(this); + this.kubernetesVersions = new KubernetesVersionsClientImpl(this); this.l2Networks = new L2NetworksClientImpl(this); this.l3Networks = new L3NetworksClientImpl(this); this.rackSkus = new RackSkusClientImpl(this); @@ -459,10 +491,10 @@ public ConsolesClient getConsoles() { this.volumes = new VolumesClientImpl(this); this.bareMetalMachineKeySets = new BareMetalMachineKeySetsClientImpl(this); this.bmcKeySets = new BmcKeySetsClientImpl(this); - this.metricsConfigurations = new MetricsConfigurationsClientImpl(this); this.agentPools = new AgentPoolsClientImpl(this); this.kubernetesClusterFeatures = new KubernetesClusterFeaturesClientImpl(this); this.consoles = new ConsolesClientImpl(this); + this.metricsConfigurations = new MetricsConfigurationsClientImpl(this); } /** @@ -608,5 +640,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(NetworkCloudImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(NetworkCloudManagementClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/OperationImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/OperationImpl.java index 6c8d0cbef11c..606cb59d2381 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/OperationImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/OperationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/OperationStatusResultImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/OperationStatusResultImpl.java deleted file mode 100644 index d04aee707889..000000000000 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/OperationStatusResultImpl.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.networkcloud.implementation; - -import com.azure.core.management.exception.ManagementError; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; -import com.azure.resourcemanager.networkcloud.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.networkcloud.NetworkCloudManager serviceManager; - - OperationStatusResultImpl(OperationStatusResultInner innerObject, - com.azure.resourcemanager.networkcloud.NetworkCloudManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public OffsetDateTime endTime() { - return this.innerModel().endTime(); - } - - public ManagementError error() { - return this.innerModel().error(); - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - 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 Float percentComplete() { - return this.innerModel().percentComplete(); - } - - public String resourceId() { - return this.innerModel().resourceId(); - } - - public OffsetDateTime startTime() { - return this.innerModel().startTime(); - } - - public String status() { - return this.innerModel().status(); - } - - public String exitCode() { - return this.innerModel().exitCode(); - } - - public String outputHead() { - return this.innerModel().outputHead(); - } - - public String resultRef() { - return this.innerModel().resultRef(); - } - - public String resultUrl() { - return this.innerModel().resultUrl(); - } - - public OperationStatusResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.networkcloud.NetworkCloudManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/OperationsClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/OperationsClientImpl.java index eb4491501073..1c99913252e4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/OperationsClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -25,10 +25,9 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.OperationsClient; import com.azure.resourcemanager.networkcloud.fluent.models.OperationInner; -import com.azure.resourcemanager.networkcloud.models.OperationListResult; +import com.azure.resourcemanager.networkcloud.implementation.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -43,38 +42,38 @@ public final class OperationsClientImpl implements OperationsClient { /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(NetworkCloudImpl client) { + OperationsClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudOperations to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for NetworkCloudManagementClientOperations to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudOperations") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.NetworkCloud/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.NetworkCloud/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -82,32 +81,26 @@ Response listSync(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List resource provider operations. - * - * Get a list of all available resource provider operations. It contains a URL link to get the next set of results. + * 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 all available resource provider operations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @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() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -118,13 +111,12 @@ private Mono> listSinglePageAsync() { } /** - * List resource provider operations. - * - * Get a list of all available resource provider operations. It contains a URL link to get the next set of results. + * 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 all available resource provider operations as paginated response with {@link PagedFlux}. + * @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() { @@ -132,21 +124,14 @@ private PagedFlux listAsync() { } /** - * List resource provider operations. - * - * Get a list of all available resource provider operations. It contains a URL link to get the next set of results. + * 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 all available resource provider operations along with {@link PagedResponse}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage() { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); @@ -155,23 +140,16 @@ private PagedResponse listSinglePage() { } /** - * List resource provider operations. - * - * Get a list of all available resource provider operations. It contains a URL link to get the next set of results. + * 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 all available resource provider operations along with {@link PagedResponse}. + * @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) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); @@ -180,13 +158,12 @@ private PagedResponse listSinglePage(Context context) { } /** - * List resource provider operations. - * - * Get a list of all available resource provider operations. It contains a URL link to get the next set of results. + * 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 all available resource provider operations as paginated response with {@link PagedIterable}. + * @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() { @@ -194,15 +171,14 @@ public PagedIterable list() { } /** - * List resource provider operations. - * - * Get a list of all available resource provider operations. It contains a URL link to get the next set of results. + * 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 all available resource provider operations as paginated response with {@link PagedIterable}. + * @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) { @@ -210,26 +186,17 @@ public PagedIterable list(Context context) { } /** - * List resource provider operations. - * * 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 all available resource provider operations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @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) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -238,27 +205,16 @@ private Mono> listNextSinglePageAsync(String nextL } /** - * List resource provider operations. - * * 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 all available resource provider operations along with {@link PagedResponse}. + * @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) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -267,8 +223,6 @@ private PagedResponse listNextSinglePage(String nextLink) { } /** - * List resource provider operations. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -276,24 +230,13 @@ private PagedResponse listNextSinglePage(String nextLink) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 all available resource provider operations along with {@link PagedResponse}. + * @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) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(OperationsClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/OperationsImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/OperationsImpl.java index 6f7ea399bdd2..310e7779bae6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/OperationsImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackImpl.java index 61cdcf2210f1..e31fbe9886c1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -62,6 +62,18 @@ public String availabilityZone() { return this.innerModel().availabilityZone(); } + public String rackLocation() { + return this.innerModel().rackLocation(); + } + + public String rackSerialNumber() { + return this.innerModel().rackSerialNumber(); + } + + public String rackSkuId() { + return this.innerModel().rackSkuId(); + } + public String clusterId() { return this.innerModel().clusterId(); } @@ -78,18 +90,6 @@ public RackProvisioningState provisioningState() { return this.innerModel().provisioningState(); } - public String rackLocation() { - return this.innerModel().rackLocation(); - } - - public String rackSerialNumber() { - return this.innerModel().rackSerialNumber(); - } - - public String rackSkuId() { - return this.innerModel().rackSkuId(); - } - public Region region() { return Region.fromName(this.regionName()); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackSkuImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackSkuImpl.java index 2afa12520b9b..7b41897ea1db 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackSkuImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackSkuImpl.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; import com.azure.core.management.SystemData; import com.azure.resourcemanager.networkcloud.fluent.models.RackSkuInner; +import com.azure.resourcemanager.networkcloud.models.DeploymentType; import com.azure.resourcemanager.networkcloud.models.MachineSkuSlot; import com.azure.resourcemanager.networkcloud.models.RackSku; import com.azure.resourcemanager.networkcloud.models.RackSkuProvisioningState; @@ -58,6 +59,10 @@ public List controllerMachines() { } } + public DeploymentType deploymentType() { + return this.innerModel().deploymentType(); + } + public String description() { return this.innerModel().description(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackSkusClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackSkusClientImpl.java index 58367c9f5cf4..9fac1e3f898e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackSkusClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackSkusClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -25,10 +25,9 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.RackSkusClient; import com.azure.resourcemanager.networkcloud.fluent.models.RackSkuInner; -import com.azure.resourcemanager.networkcloud.models.RackSkuList; +import com.azure.resourcemanager.networkcloud.implementation.models.RackSkuList; import reactor.core.publisher.Mono; /** @@ -43,63 +42,63 @@ public final class RackSkusClientImpl implements RackSkusClient { /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of RackSkusClientImpl. * * @param client the instance of the service client containing this operation class. */ - RackSkusClientImpl(NetworkCloudImpl client) { + RackSkusClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(RackSkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudRackSkus to be used by the proxy service to perform REST - * calls. + * The interface defining all the services for NetworkCloudManagementClientRackSkus to be used by the proxy service + * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudRackSkus") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientRackSkus") public interface RackSkusService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/rackSkus") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/rackSkus/{rackSkuName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + @PathParam("rackSkuName") String rackSkuName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/rackSkus") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/rackSkus/{rackSkuName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + @PathParam("rackSkuName") String rackSkuName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/rackSkus/{rackSkuName}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/rackSkus") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("rackSkuName") String rackSkuName, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/rackSkus/{rackSkuName}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/rackSkus") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("rackSkuName") String rackSkuName, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -107,12 +106,74 @@ Mono> listBySubscriptionNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listBySubscriptionNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the properties of the provided rack SKU. + * + * @param rackSkuName The name of the rack SKU. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the provided rack SKU along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String rackSkuName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), rackSkuName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the properties of the provided rack SKU. + * + * @param rackSkuName The name of the rack SKU. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the provided rack SKU on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String rackSkuName) { + return getWithResponseAsync(rackSkuName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List rack SKUs in the subscription. + * Get the properties of the provided rack SKU. * + * @param rackSkuName The name of the rack SKU. + * @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 properties of the provided rack SKU along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String rackSkuName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + rackSkuName, accept, context); + } + + /** + * Get the properties of the provided rack SKU. + * + * @param rackSkuName The name of the rack SKU. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the provided rack SKU. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RackSkuInner get(String rackSkuName) { + return getWithResponse(rackSkuName, Context.NONE).getValue(); + } + + /** * Get a list of rack SKUs in the provided subscription. * * @throws ManagementException thrown if the request is rejected by server. @@ -122,14 +183,6 @@ Response listBySubscriptionNextSync(@PathParam(value = "nextLink", */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -140,8 +193,6 @@ private Mono> listSinglePageAsync() { } /** - * List rack SKUs in the subscription. - * * Get a list of rack SKUs in the provided subscription. * * @throws ManagementException thrown if the request is rejected by server. @@ -155,8 +206,6 @@ private PagedFlux listAsync() { } /** - * List rack SKUs in the subscription. - * * Get a list of rack SKUs in the provided subscription. * * @throws ManagementException thrown if the request is rejected by server. @@ -165,16 +214,6 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage() { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); @@ -183,8 +222,6 @@ private PagedResponse listSinglePage() { } /** - * List rack SKUs in the subscription. - * * Get a list of rack SKUs in the provided subscription. * * @param context The context to associate with this operation. @@ -195,16 +232,6 @@ private PagedResponse listSinglePage() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); @@ -213,8 +240,6 @@ private PagedResponse listSinglePage(Context context) { } /** - * List rack SKUs in the subscription. - * * Get a list of rack SKUs in the provided subscription. * * @throws ManagementException thrown if the request is rejected by server. @@ -227,8 +252,6 @@ public PagedIterable list() { } /** - * List rack SKUs in the subscription. - * * Get a list of rack SKUs in the provided subscription. * * @param context The context to associate with this operation. @@ -244,105 +267,6 @@ public PagedIterable list(Context context) { } /** - * Retrieve the rack SKU. - * - * Get the properties of the provided rack SKU. - * - * @param rackSkuName The name of the rack SKU. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the provided rack SKU along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String rackSkuName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (rackSkuName == null) { - return Mono.error(new IllegalArgumentException("Parameter rackSkuName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), rackSkuName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieve the rack SKU. - * - * Get the properties of the provided rack SKU. - * - * @param rackSkuName The name of the rack SKU. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the provided rack SKU on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String rackSkuName) { - return getWithResponseAsync(rackSkuName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Retrieve the rack SKU. - * - * Get the properties of the provided rack SKU. - * - * @param rackSkuName The name of the rack SKU. - * @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 properties of the provided rack SKU along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String rackSkuName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (rackSkuName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter rackSkuName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - rackSkuName, accept, context); - } - - /** - * Retrieve the rack SKU. - * - * Get the properties of the provided rack SKU. - * - * @param rackSkuName The name of the rack SKU. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the provided rack SKU. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RackSkuInner get(String rackSkuName) { - return getWithResponse(rackSkuName, Context.NONE).getValue(); - } - - /** - * List rack SKUs in the subscription. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -354,13 +278,6 @@ public RackSkuInner get(String rackSkuName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -371,8 +288,6 @@ private Mono> listBySubscriptionNextSinglePageAsync( } /** - * List rack SKUs in the subscription. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -383,15 +298,6 @@ private Mono> listBySubscriptionNextSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -400,8 +306,6 @@ private PagedResponse listBySubscriptionNextSinglePage(String next } /** - * List rack SKUs in the subscription. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -413,21 +317,10 @@ private PagedResponse listBySubscriptionNextSinglePage(String next */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(RackSkusClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackSkusImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackSkusImpl.java index 41228cae5bb0..1d31af84ed37 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackSkusImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackSkusImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -27,24 +27,10 @@ public RackSkusImpl(RackSkusClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RackSkuImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RackSkuImpl(inner1, this.manager())); - } - public Response getWithResponse(String rackSkuName, Context context) { Response inner = this.serviceClient().getWithResponse(rackSkuName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RackSkuImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RackSkuImpl(inner.getValue(), this.manager())); } public RackSku get(String rackSkuName) { @@ -56,6 +42,16 @@ public RackSku get(String rackSkuName) { } } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RackSkuImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RackSkuImpl(inner1, this.manager())); + } + private RackSkusClient serviceClient() { return this.innerClient; } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RacksClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RacksClientImpl.java index 90ff55a4dc85..4d3370822919 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RacksClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RacksClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -31,13 +31,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.RacksClient; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.fluent.models.RackInner; -import com.azure.resourcemanager.networkcloud.models.RackList; +import com.azure.resourcemanager.networkcloud.implementation.models.RackList; import com.azure.resourcemanager.networkcloud.models.RackPatchParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,64 +53,30 @@ public final class RacksClientImpl implements RacksClient { /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of RacksClientImpl. * * @param client the instance of the service client containing this operation class. */ - RacksClientImpl(NetworkCloudImpl client) { + RacksClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(RacksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudRacks to be used by the proxy service to perform REST - * calls. + * The interface defining all the services for NetworkCloudManagementClientRacks to be used by the proxy service to + * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudRacks") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientRacks") public interface RacksService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/racks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/racks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("rackName") String rackName, @HeaderParam("Accept") String accept, Context context); @@ -121,594 +85,512 @@ Mono> getByResourceGroup(@HostParam("$host") String endpoint @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("rackName") String rackName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("rackName") String rackName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") RackInner rackParameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RackInner rackParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("rackName") String rackName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") RackInner rackParameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RackInner rackParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("rackName") String rackName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, + @BodyParam("application/json") RackPatchParameters rackUpdateParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("rackName") String rackName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, + @BodyParam("application/json") RackPatchParameters rackUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("rackName") String rackName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") RackPatchParameters rackUpdateParameters, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}") + @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("rackName") String rackName, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/racks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/racks") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("rackName") String rackName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") RackPatchParameters rackUpdateParameters, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + 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 listBySubscriptionNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + 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> listByResourceGroupNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + Mono> listBySubscriptionNext(@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("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + Response listBySubscriptionNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List racks in the subscription. - * - * Get a list of racks in the provided subscription. + * Get properties of the provided rack. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rackName The name of the rack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 racks in the provided subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return properties of the provided rack along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String rackName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, rackName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List racks in the subscription. - * - * Get a list of racks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 racks in the provided subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer top, String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List racks in the subscription. - * - * Get a list of racks in the provided subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of racks in the provided subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List racks in the subscription. - * - * Get a list of racks in the provided subscription. + * Get properties of the provided rack. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rackName The name of the rack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 racks in the provided subscription along with {@link PagedResponse}. + * @return properties of the provided rack on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + private Mono getByResourceGroupAsync(String resourceGroupName, String rackName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, rackName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List racks in the subscription. - * - * Get a list of racks in the provided subscription. + * Get properties of the provided rack. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rackName The name of the rack. * @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 racks in the provided subscription along with {@link PagedResponse}. + * @return properties of the provided rack along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + public Response getByResourceGroupWithResponse(String resourceGroupName, String rackName, + Context context) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, rackName, accept, context); } /** - * List racks in the subscription. - * - * Get a list of racks in the provided subscription. + * Get properties of the provided rack. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rackName The name of the rack. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 racks in the provided subscription as paginated response with {@link PagedIterable}. + * @return properties of the provided rack. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listSinglePage(top, skipToken), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public RackInner getByResourceGroup(String resourceGroupName, String rackName) { + return getByResourceGroupWithResponse(resourceGroupName, rackName, Context.NONE).getValue(); } /** - * List racks in the subscription. - * - * Get a list of racks in the provided subscription. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rackName The name of the rack. + * @param rackParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 racks in the provided subscription as paginated response with {@link PagedIterable}. + * @return rack represents the hardware of the rack and is dependent upon the cluster for lifecycle along with + * {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Integer top, String skipToken, Context context) { - return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String rackName, + RackInner rackParameters, String ifMatch, String ifNoneMatch) { + 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, rackName, ifMatch, ifNoneMatch, contentType, accept, + rackParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List racks in the resource group. - * - * Get a list of racks in the provided resource group. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param rackName The name of the rack. + * @param rackParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 racks in the provided resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return rack represents the hardware of the rack and is dependent upon the cluster for lifecycle along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String rackName, + RackInner rackParameters, String ifMatch, String ifNoneMatch) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, rackName, ifMatch, ifNoneMatch, contentType, accept, + rackParameters, Context.NONE); } /** - * List racks in the resource group. - * - * Get a list of racks in the provided resource group. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param rackName The name of the rack. + * @param rackParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 racks in the provided resource group as paginated response with {@link PagedFlux}. + * @return rack represents the hardware of the rack and is dependent upon the cluster for lifecycle along with + * {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, String skipToken) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String rackName, + RackInner rackParameters, String ifMatch, String ifNoneMatch, 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, rackName, ifMatch, ifNoneMatch, contentType, accept, + rackParameters, context); } /** - * List racks in the resource group. - * - * Get a list of racks in the provided resource group. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rackName The name of the rack. + * @param rackParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 racks in the provided resource group as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of rack represents the hardware of the rack and is dependent upon the + * cluster for lifecycle. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RackInner> beginCreateOrUpdateAsync(String resourceGroupName, + String rackName, RackInner rackParameters, String ifMatch, String ifNoneMatch) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, rackName, rackParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), RackInner.class, + RackInner.class, this.client.getContext()); } /** - * List racks in the resource group. - * - * Get a list of racks in the provided resource group. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param rackName The name of the rack. + * @param rackParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 racks in the provided resource group along with {@link PagedResponse}. + * @return the {@link PollerFlux} for polling of rack represents the hardware of the rack and is dependent upon the + * cluster for lifecycle. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RackInner> beginCreateOrUpdateAsync(String resourceGroupName, + String rackName, RackInner rackParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, rackName, rackParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), RackInner.class, + RackInner.class, this.client.getContext()); } /** - * List racks in the resource group. - * - * Get a list of racks in the provided resource group. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param rackName The name of the rack. + * @param rackParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 racks in the provided resource group along with {@link PagedResponse}. + * @return the {@link SyncPoller} for polling of rack represents the hardware of the rack and is dependent upon the + * cluster for lifecycle. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RackInner> beginCreateOrUpdate(String resourceGroupName, String rackName, + RackInner rackParameters, String ifMatch, String ifNoneMatch) { + Response response + = createOrUpdateWithResponse(resourceGroupName, rackName, rackParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, RackInner.class, RackInner.class, Context.NONE); } /** - * List racks in the resource group. - * - * Get a list of racks in the provided resource group. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rackName The name of the rack. + * @param rackParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 racks in the provided resource group as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of rack represents the hardware of the rack and is dependent upon the + * cluster for lifecycle. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RackInner> beginCreateOrUpdate(String resourceGroupName, String rackName, + RackInner rackParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Response response + = createOrUpdateWithResponse(resourceGroupName, rackName, rackParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, RackInner.class, RackInner.class, Context.NONE); } /** - * List racks in the resource group. - * - * Get a list of racks in the provided resource group. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param rackName The name of the rack. + * @param rackParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 racks in the provided resource group as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of rack represents the hardware of the rack and is dependent upon the + * cluster for lifecycle. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RackInner> beginCreateOrUpdate(String resourceGroupName, String rackName, + RackInner rackParameters, String ifMatch, String ifNoneMatch, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, rackName, rackParameters, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, RackInner.class, RackInner.class, context); } /** - * Retrieve the rack. - * - * Get properties of the provided rack. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. + * @param rackParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided rack along with {@link Response} on successful completion of {@link Mono}. + * @return rack represents the hardware of the rack and is dependent upon the cluster for lifecycle on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String rackName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (rackName == null) { - return Mono.error(new IllegalArgumentException("Parameter rackName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, rackName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono createOrUpdateAsync(String resourceGroupName, String rackName, RackInner rackParameters, + String ifMatch, String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, rackName, rackParameters, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieve the rack. - * - * Get properties of the provided rack. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. + * @param rackParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided rack on successful completion of {@link Mono}. + * @return rack represents the hardware of the rack and is dependent upon the cluster for lifecycle on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String rackName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, rackName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, String rackName, RackInner rackParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdateAsync(resourceGroupName, rackName, rackParameters, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieve the rack. - * - * Get properties of the provided rack. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. - * @param context The context to associate with this operation. + * @param rackParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided rack along with {@link Response}. + * @return rack represents the hardware of the rack and is dependent upon the cluster for lifecycle. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String rackName, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (rackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter rackName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, rackName, accept, context); + public RackInner createOrUpdate(String resourceGroupName, String rackName, RackInner rackParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdate(resourceGroupName, rackName, rackParameters, ifMatch, ifNoneMatch).getFinalResult(); } /** - * Retrieve the rack. - * - * Get properties of the provided rack. + * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as + * the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. + * @param rackParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 properties of the provided rack. + * @return rack represents the hardware of the rack and is dependent upon the cluster for lifecycle. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RackInner getByResourceGroup(String resourceGroupName, String rackName) { - return getByResourceGroupWithResponse(resourceGroupName, rackName, Context.NONE).getValue(); + public RackInner createOrUpdate(String resourceGroupName, String rackName, RackInner rackParameters, String ifMatch, + String ifNoneMatch, Context context) { + return beginCreateOrUpdate(resourceGroupName, rackName, rackParameters, ifMatch, ifNoneMatch, context) + .getFinalResult(); } /** - * Create or update the rack. - * - * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as - * the life cycle of this resource is managed by the system. + * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates + * can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. - * @param rackParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param rackUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -716,49 +598,27 @@ public RackInner getByResourceGroup(String resourceGroupName, String rackName) { * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String rackName, - RackInner rackParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (rackName == null) { - return Mono.error(new IllegalArgumentException("Parameter rackName is required and cannot be null.")); - } - if (rackParameters == null) { - return Mono.error(new IllegalArgumentException("Parameter rackParameters is required and cannot be null.")); - } else { - rackParameters.validate(); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String rackName, + String ifMatch, String ifNoneMatch, RackPatchParameters rackUpdateParameters) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, rackName, ifMatch, ifNoneMatch, rackParameters, - accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, rackName, ifMatch, ifNoneMatch, accept, + rackUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update the rack. - * - * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as - * the life cycle of this resource is managed by the system. + * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates + * can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. - * @param rackParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param rackUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -766,51 +626,25 @@ private Mono>> createOrUpdateWithResponseAsync(String * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String rackName, - RackInner rackParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (rackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter rackName is required and cannot be null.")); - } - if (rackParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter rackParameters is required and cannot be null.")); - } else { - rackParameters.validate(); - } + private Response updateWithResponse(String resourceGroupName, String rackName, String ifMatch, + String ifNoneMatch, RackPatchParameters rackUpdateParameters) { final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, rackName, ifMatch, ifNoneMatch, rackParameters, accept, - Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, rackName, ifMatch, ifNoneMatch, accept, + rackUpdateParameters, Context.NONE); } /** - * Create or update the rack. - * - * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as - * the life cycle of this resource is managed by the system. + * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates + * can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. - * @param rackParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param rackUpdateParameters The request body. * @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. @@ -819,51 +653,25 @@ private Response createOrUpdateWithResponse(String resourceGroupName * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String rackName, - RackInner rackParameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (rackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter rackName is required and cannot be null.")); - } - if (rackParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter rackParameters is required and cannot be null.")); - } else { - rackParameters.validate(); - } + private Response updateWithResponse(String resourceGroupName, String rackName, String ifMatch, + String ifNoneMatch, RackPatchParameters rackUpdateParameters, Context context) { final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, rackName, ifMatch, ifNoneMatch, rackParameters, accept, - context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, rackName, ifMatch, ifNoneMatch, accept, + rackUpdateParameters, context); } /** - * Create or update the rack. - * - * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as - * the life cycle of this resource is managed by the system. + * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates + * can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. - * @param rackParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param rackUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -871,23 +679,20 @@ private Response createOrUpdateWithResponse(String resourceGroupName * cluster for lifecycle. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RackInner> beginCreateOrUpdateAsync(String resourceGroupName, - String rackName, RackInner rackParameters, String ifMatch, String ifNoneMatch) { + private PollerFlux, RackInner> beginUpdateAsync(String resourceGroupName, String rackName, + String ifMatch, String ifNoneMatch, RackPatchParameters rackUpdateParameters) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, rackName, rackParameters, ifMatch, ifNoneMatch); + = updateWithResponseAsync(resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), RackInner.class, RackInner.class, this.client.getContext()); } /** - * Create or update the rack. - * - * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as - * the life cycle of this resource is managed by the system. + * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates + * can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. - * @param rackParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -895,29 +700,27 @@ private PollerFlux, RackInner> beginCreateOrUpdateAsync(St * cluster for lifecycle. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RackInner> beginCreateOrUpdateAsync(String resourceGroupName, - String rackName, RackInner rackParameters) { + private PollerFlux, RackInner> beginUpdateAsync(String resourceGroupName, String rackName) { final String ifMatch = null; final String ifNoneMatch = null; + final RackPatchParameters rackUpdateParameters = null; Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, rackName, rackParameters, ifMatch, ifNoneMatch); + = updateWithResponseAsync(resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), RackInner.class, RackInner.class, this.client.getContext()); } /** - * Create or update the rack. - * - * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as - * the life cycle of this resource is managed by the system. + * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates + * can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. - * @param rackParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param rackUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -925,22 +728,19 @@ private PollerFlux, RackInner> beginCreateOrUpdateAsync(St * cluster for lifecycle. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RackInner> beginCreateOrUpdate(String resourceGroupName, String rackName, - RackInner rackParameters, String ifMatch, String ifNoneMatch) { + public SyncPoller, RackInner> beginUpdate(String resourceGroupName, String rackName, + String ifMatch, String ifNoneMatch, RackPatchParameters rackUpdateParameters) { Response response - = createOrUpdateWithResponse(resourceGroupName, rackName, rackParameters, ifMatch, ifNoneMatch); + = updateWithResponse(resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters); return this.client.getLroResult(response, RackInner.class, RackInner.class, Context.NONE); } /** - * Create or update the rack. - * - * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as - * the life cycle of this resource is managed by the system. + * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates + * can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. - * @param rackParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -948,28 +748,26 @@ public SyncPoller, RackInner> beginCreateOrUpdate(String r * cluster for lifecycle. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RackInner> beginCreateOrUpdate(String resourceGroupName, String rackName, - RackInner rackParameters) { + public SyncPoller, RackInner> beginUpdate(String resourceGroupName, String rackName) { final String ifMatch = null; final String ifNoneMatch = null; + final RackPatchParameters rackUpdateParameters = null; Response response - = createOrUpdateWithResponse(resourceGroupName, rackName, rackParameters, ifMatch, ifNoneMatch); + = updateWithResponse(resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters); return this.client.getLroResult(response, RackInner.class, RackInner.class, Context.NONE); } /** - * Create or update the rack. - * - * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as - * the life cycle of this resource is managed by the system. + * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates + * can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. - * @param rackParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param rackUpdateParameters The request body. * @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. @@ -978,26 +776,24 @@ public SyncPoller, RackInner> beginCreateOrUpdate(String r * cluster for lifecycle. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RackInner> beginCreateOrUpdate(String resourceGroupName, String rackName, - RackInner rackParameters, String ifMatch, String ifNoneMatch, Context context) { + public SyncPoller, RackInner> beginUpdate(String resourceGroupName, String rackName, + String ifMatch, String ifNoneMatch, RackPatchParameters rackUpdateParameters, Context context) { Response response - = createOrUpdateWithResponse(resourceGroupName, rackName, rackParameters, ifMatch, ifNoneMatch, context); + = updateWithResponse(resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters, context); return this.client.getLroResult(response, RackInner.class, RackInner.class, context); } /** - * Create or update the rack. - * - * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as - * the life cycle of this resource is managed by the system. + * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates + * can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. - * @param rackParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param rackUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1005,21 +801,18 @@ public SyncPoller, RackInner> beginCreateOrUpdate(String r * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String rackName, RackInner rackParameters, - String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, rackName, rackParameters, ifMatch, ifNoneMatch).last() + private Mono updateAsync(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch, + RackPatchParameters rackUpdateParameters) { + return beginUpdateAsync(resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update the rack. - * - * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as - * the life cycle of this resource is managed by the system. + * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates + * can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. - * @param rackParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1027,47 +820,44 @@ private Mono createOrUpdateAsync(String resourceGroupName, String rac * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String rackName, RackInner rackParameters) { + private Mono updateAsync(String resourceGroupName, String rackName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, rackName, rackParameters, ifMatch, ifNoneMatch).last() + final RackPatchParameters rackUpdateParameters = null; + return beginUpdateAsync(resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update the rack. - * - * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as - * the life cycle of this resource is managed by the system. + * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates + * can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. - * @param rackParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return rack represents the hardware of the rack and is dependent upon the cluster for lifecycle. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RackInner createOrUpdate(String resourceGroupName, String rackName, RackInner rackParameters) { + public RackInner update(String resourceGroupName, String rackName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateOrUpdate(resourceGroupName, rackName, rackParameters, ifMatch, ifNoneMatch).getFinalResult(); + final RackPatchParameters rackUpdateParameters = null; + return beginUpdate(resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters).getFinalResult(); } /** - * Create or update the rack. - * - * Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as - * the life cycle of this resource is managed by the system. + * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates + * can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param rackName The name of the rack. - * @param rackParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param rackUpdateParameters The request body. * @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. @@ -1075,15 +865,13 @@ public RackInner createOrUpdate(String resourceGroupName, String rackName, RackI * @return rack represents the hardware of the rack and is dependent upon the cluster for lifecycle. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RackInner createOrUpdate(String resourceGroupName, String rackName, RackInner rackParameters, String ifMatch, - String ifNoneMatch, Context context) { - return beginCreateOrUpdate(resourceGroupName, rackName, rackParameters, ifMatch, ifNoneMatch, context) + public RackInner update(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch, + RackPatchParameters rackUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters, context) .getFinalResult(); } /** - * Delete the rack. - * * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is * managed by the system. * @@ -1096,37 +884,18 @@ public RackInner createOrUpdate(String resourceGroupName, String rackName, RackI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (rackName == null) { - return Mono.error(new IllegalArgumentException("Parameter rackName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, rackName, ifMatch, ifNoneMatch, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, rackName, ifMatch, ifNoneMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the rack. - * * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is * managed by the system. * @@ -1139,37 +908,16 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (rackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter rackName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, rackName, ifMatch, ifNoneMatch, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, rackName, ifMatch, ifNoneMatch, Context.NONE); } /** - * Delete the rack. - * * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is * managed by the system. * @@ -1183,37 +931,16 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (rackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter rackName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, rackName, ifMatch, ifNoneMatch, accept, context); + this.client.getSubscriptionId(), resourceGroupName, rackName, ifMatch, ifNoneMatch, context); } /** - * Delete the rack. - * * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is * managed by the system. * @@ -1226,21 +953,18 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String rackName, + String ifMatch, String ifNoneMatch) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, rackName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the rack. - * * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is * managed by the system. * @@ -1249,23 +973,19 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String rackName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String rackName) { final String ifMatch = null; final String ifNoneMatch = null; Mono>> mono = deleteWithResponseAsync(resourceGroupName, rackName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the rack. - * * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is * managed by the system. * @@ -1278,19 +998,16 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String rackName, String ifMatch, + String ifNoneMatch) { Response response = deleteWithResponse(resourceGroupName, rackName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the rack. - * * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is * managed by the system. * @@ -1299,21 +1016,17 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String rackName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String rackName) { final String ifMatch = null; final String ifNoneMatch = null; Response response = deleteWithResponse(resourceGroupName, rackName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the rack. - * * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is * managed by the system. * @@ -1327,19 +1040,16 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String rackName, String ifMatch, + String ifNoneMatch, Context context) { Response response = deleteWithResponse(resourceGroupName, rackName, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Delete the rack. - * * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is * managed by the system. * @@ -1352,18 +1062,15 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String rackName, String ifMatch, - String ifNoneMatch) { + private Mono deleteAsync(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch) { return beginDeleteAsync(resourceGroupName, rackName, ifMatch, ifNoneMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the rack. - * * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is * managed by the system. * @@ -1372,10 +1079,10 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String rackName) { + private Mono deleteAsync(String resourceGroupName, String rackName) { final String ifMatch = null; final String ifNoneMatch = null; return beginDeleteAsync(resourceGroupName, rackName, ifMatch, ifNoneMatch).last() @@ -1383,8 +1090,6 @@ private Mono deleteAsync(String resourceGroupName, S } /** - * Delete the rack. - * * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is * managed by the system. * @@ -1393,18 +1098,15 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String rackName) { + public void delete(String resourceGroupName, String rackName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginDelete(resourceGroupName, rackName, ifMatch, ifNoneMatch).getFinalResult(); + beginDelete(resourceGroupName, rackName, ifMatch, ifNoneMatch).getFinalResult(); } /** - * Delete the rack. - * * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is * managed by the system. * @@ -1418,451 +1120,323 @@ public OperationStatusResultInner delete(String resourceGroupName, String rackNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 delete(String resourceGroupName, String rackName, String ifMatch, - String ifNoneMatch, Context context) { - return beginDelete(resourceGroupName, rackName, ifMatch, ifNoneMatch, context).getFinalResult(); + public void delete(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch, Context context) { + beginDelete(resourceGroupName, rackName, ifMatch, ifNoneMatch, context).getFinalResult(); } /** - * Patch the rack. - * - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates - * can be done independently. + * Get a list of racks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param rackUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return rack represents the hardware of the rack and is dependent upon the cluster for lifecycle along with - * {@link Response} on successful completion of {@link Mono}. + * @return a list of racks in the provided resource group along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String rackName, - String ifMatch, String ifNoneMatch, RackPatchParameters rackUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (rackName == null) { - return Mono.error(new IllegalArgumentException("Parameter rackName is required and cannot be null.")); - } - if (rackUpdateParameters != null) { - rackUpdateParameters.validate(); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, Integer top, + String skipToken) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, rackName, ifMatch, ifNoneMatch, - rackUpdateParameters, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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())); } /** - * Patch the rack. + * Get a list of racks in the provided resource group. * - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates - * can be done independently. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 racks in the provided resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, String skipToken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of racks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param rackUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return rack represents the hardware of the rack and is dependent upon the cluster for lifecycle along with - * {@link Response}. + * @return a list of racks in the provided resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of racks in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 racks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String rackName, String ifMatch, - String ifNoneMatch, RackPatchParameters rackUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (rackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter rackName is required and cannot be null.")); - } - if (rackUpdateParameters != null) { - rackUpdateParameters.validate(); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken) { final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters, - accept, Context.NONE); + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the rack. - * - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates - * can be done independently. + * Get a list of racks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param rackUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 rack represents the hardware of the rack and is dependent upon the cluster for lifecycle along with - * {@link Response}. + * @return a list of racks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String rackName, String ifMatch, - String ifNoneMatch, RackPatchParameters rackUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (rackName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter rackName is required and cannot be null.")); - } - if (rackUpdateParameters != null) { - rackUpdateParameters.validate(); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken, Context context) { final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters, - accept, context); + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the rack. - * - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates - * can be done independently. + * Get a list of racks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param rackUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 rack represents the hardware of the rack and is dependent upon the - * cluster for lifecycle. + * @return a list of racks in the provided resource group as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RackInner> beginUpdateAsync(String resourceGroupName, String rackName, - String ifMatch, String ifNoneMatch, RackPatchParameters rackUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), RackInner.class, - RackInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Patch the rack. - * - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates - * can be done independently. + * Get a list of racks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of rack represents the hardware of the rack and is dependent upon the - * cluster for lifecycle. + * @return a list of racks in the provided resource group as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RackInner> beginUpdateAsync(String resourceGroupName, String rackName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final RackPatchParameters rackUpdateParameters = null; - Mono>> mono - = updateWithResponseAsync(resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), RackInner.class, - RackInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Patch the rack. - * - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates - * can be done independently. + * Get a list of racks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param rackUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 rack represents the hardware of the rack and is dependent upon the - * cluster for lifecycle. + * @return a list of racks in the provided subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RackInner> beginUpdate(String resourceGroupName, String rackName, - String ifMatch, String ifNoneMatch, RackPatchParameters rackUpdateParameters) { - Response response - = updateWithResponse(resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters); - return this.client.getLroResult(response, RackInner.class, RackInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, 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())); } /** - * Patch the rack. - * - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates - * can be done independently. + * Get a list of racks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 rack represents the hardware of the rack and is dependent upon the - * cluster for lifecycle. + * @return a list of racks in the provided subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RackInner> beginUpdate(String resourceGroupName, String rackName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final RackPatchParameters rackUpdateParameters = null; - Response response - = updateWithResponse(resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters); - return this.client.getLroResult(response, RackInner.class, RackInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Integer top, String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Patch the rack. - * - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates - * can be done independently. + * Get a list of racks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param rackUpdateParameters The request body. - * @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 rack represents the hardware of the rack and is dependent upon the - * cluster for lifecycle. + * @return a list of racks in the provided subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RackInner> beginUpdate(String resourceGroupName, String rackName, - String ifMatch, String ifNoneMatch, RackPatchParameters rackUpdateParameters, Context context) { - Response response - = updateWithResponse(resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters, context); - return this.client.getLroResult(response, RackInner.class, RackInner.class, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Patch the rack. - * - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates - * can be done independently. + * Get a list of racks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param rackUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return rack represents the hardware of the rack and is dependent upon the cluster for lifecycle on successful - * completion of {@link Mono}. + * @return a list of racks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch, - RackPatchParameters rackUpdateParameters) { - return beginUpdateAsync(resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(Integer top, String skipToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the rack. - * - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates - * can be done independently. + * Get a list of racks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 rack represents the hardware of the rack and is dependent upon the cluster for lifecycle on successful - * completion of {@link Mono}. + * @return a list of racks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String rackName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final RackPatchParameters rackUpdateParameters = null; - return beginUpdateAsync(resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the rack. - * - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates - * can be done independently. + * Get a list of racks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return rack represents the hardware of the rack and is dependent upon the cluster for lifecycle. + * @return a list of racks in the provided subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RackInner update(String resourceGroupName, String rackName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final RackPatchParameters rackUpdateParameters = null; - return beginUpdate(resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters).getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listSinglePage(top, skipToken), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * Patch the rack. - * - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates - * can be done independently. + * Get a list of racks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param rackUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 rack represents the hardware of the rack and is dependent upon the cluster for lifecycle. + * @return a list of racks in the provided subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RackInner update(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch, - RackPatchParameters rackUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, rackName, ifMatch, ifNoneMatch, rackUpdateParameters, context) - .getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Integer top, String skipToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * List racks in the subscription. - * * 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 racks in the provided subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of racks in the provided resource group along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); } /** - * List racks in the subscription. - * * 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 racks in the provided subscription along with {@link PagedResponse}. + * @return a list of racks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = 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); } /** - * List racks in the subscription. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1870,88 +1444,57 @@ private PagedResponse listBySubscriptionNextSinglePage(String nextLin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 racks in the provided subscription along with {@link PagedResponse}. + * @return a list of racks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List racks in the resource group. - * * 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 racks in the provided resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of racks in the provided subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(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())); } /** - * List racks in the resource group. - * * 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 racks in the provided resource group along with {@link PagedResponse}. + * @return a list of racks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List racks in the resource group. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1959,25 +1502,14 @@ private PagedResponse listByResourceGroupNextSinglePage(String nextLi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 racks in the provided resource group along with {@link PagedResponse}. + * @return a list of racks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(RacksClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RacksImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RacksImpl.java index d2a9f57c284b..4003482fd203 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RacksImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/RacksImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -10,9 +10,7 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.RacksClient; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.fluent.models.RackInner; -import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; import com.azure.resourcemanager.networkcloud.models.Rack; import com.azure.resourcemanager.networkcloud.models.Racks; @@ -29,14 +27,28 @@ public RacksImpl(RacksClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RackImpl(inner1, this.manager())); + public Response getByResourceGroupWithResponse(String resourceGroupName, String rackName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, rackName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RackImpl(inner.getValue(), this.manager())); } - public PagedIterable list(Integer top, String skipToken, Context context) { - PagedIterable inner = this.serviceClient().list(top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RackImpl(inner1, this.manager())); + public Rack getByResourceGroup(String resourceGroupName, String rackName) { + RackInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, rackName); + if (inner != null) { + return new RackImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String rackName) { + this.serviceClient().delete(resourceGroupName, rackName); + } + + public void delete(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch, Context context) { + this.serviceClient().delete(resourceGroupName, rackName, ifMatch, ifNoneMatch, context); } public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -51,44 +63,14 @@ public PagedIterable listByResourceGroup(String resourceGroupName, Integer return ResourceManagerUtils.mapPage(inner, inner1 -> new RackImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse(String resourceGroupName, String rackName, Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, rackName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RackImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Rack getByResourceGroup(String resourceGroupName, String rackName) { - RackInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, rackName); - if (inner != null) { - return new RackImpl(inner, this.manager()); - } else { - return null; - } - } - - public OperationStatusResult deleteByResourceGroup(String resourceGroupName, String rackName) { - OperationStatusResultInner inner = this.serviceClient().delete(resourceGroupName, rackName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RackImpl(inner1, this.manager())); } - public OperationStatusResult delete(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch, - Context context) { - OperationStatusResultInner inner - = this.serviceClient().delete(resourceGroupName, rackName, ifMatch, ifNoneMatch, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(Integer top, String skipToken, Context context) { + PagedIterable inner = this.serviceClient().list(top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RackImpl(inner1, this.manager())); } public Rack getById(String id) { @@ -119,7 +101,7 @@ public Response getByIdWithResponse(String id, Context context) { return this.getByResourceGroupWithResponse(resourceGroupName, rackName, context); } - public OperationStatusResult deleteById(String id) { + public void deleteById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -132,11 +114,10 @@ public OperationStatusResult deleteById(String id) { } String localIfMatch = null; String localIfNoneMatch = null; - return this.delete(resourceGroupName, rackName, localIfMatch, localIfNoneMatch, Context.NONE); + this.delete(resourceGroupName, rackName, localIfMatch, localIfNoneMatch, Context.NONE); } - public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, - Context context) { + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -147,7 +128,7 @@ public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'racks'.", id))); } - return this.delete(resourceGroupName, rackName, ifMatch, ifNoneMatch, context); + this.delete(resourceGroupName, rackName, ifMatch, ifNoneMatch, context); } private RacksClient serviceClient() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ResourceManagerUtils.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ResourceManagerUtils.java index de59d4b50b4e..60ed439f713d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ResourceManagerUtils.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageApplianceImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageApplianceImpl.java index 1dec10fa3e58..9f6fc1698a64 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageApplianceImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageApplianceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -18,6 +18,8 @@ import com.azure.resourcemanager.networkcloud.models.StorageAppliance; import com.azure.resourcemanager.networkcloud.models.StorageApplianceDetailedStatus; import com.azure.resourcemanager.networkcloud.models.StorageApplianceEnableRemoteVendorManagementParameters; +import com.azure.resourcemanager.networkcloud.models.StorageApplianceExpansionShelf; +import com.azure.resourcemanager.networkcloud.models.StorageApplianceMonitoringConfigurationStatus; import com.azure.resourcemanager.networkcloud.models.StorageAppliancePatchParameters; import com.azure.resourcemanager.networkcloud.models.StorageApplianceProvisioningState; import com.azure.resourcemanager.networkcloud.models.StorageApplianceRunReadCommandsParameters; @@ -72,6 +74,22 @@ public AdministrativeCredentials administratorCredentials() { return this.innerModel().administratorCredentials(); } + public String rackId() { + return this.innerModel().rackId(); + } + + public long rackSlot() { + return this.innerModel().rackSlot(); + } + + public String serialNumber() { + return this.innerModel().serialNumber(); + } + + public String storageApplianceSkuId() { + return this.innerModel().storageApplianceSkuId(); + } + public CertificateInfo caCertificate() { return this.innerModel().caCertificate(); } @@ -96,6 +114,15 @@ public String detailedStatusMessage() { return this.innerModel().detailedStatusMessage(); } + public List expansionShelves() { + List inner = this.innerModel().expansionShelves(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public String managementIpv4Address() { return this.innerModel().managementIpv4Address(); } @@ -108,16 +135,8 @@ public String model() { return this.innerModel().model(); } - public StorageApplianceProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String rackId() { - return this.innerModel().rackId(); - } - - public long rackSlot() { - return this.innerModel().rackSlot(); + public StorageApplianceMonitoringConfigurationStatus monitoringConfigurationStatus() { + return this.innerModel().monitoringConfigurationStatus(); } public RemoteVendorManagementFeature remoteVendorManagementFeature() { @@ -137,18 +156,14 @@ public List secretRotationStatus() { } } - public String serialNumber() { - return this.innerModel().serialNumber(); - } - - public String storageApplianceSkuId() { - return this.innerModel().storageApplianceSkuId(); - } - public String version() { return this.innerModel().version(); } + public StorageApplianceProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public Region region() { return Region.fromName(this.regionName()); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageAppliancesClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageAppliancesClientImpl.java index 51c6fa861cb3..16f9030f4228 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageAppliancesClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageAppliancesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -32,14 +32,13 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.fluent.models.StorageApplianceInner; +import com.azure.resourcemanager.networkcloud.implementation.models.StorageApplianceList; +import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; import com.azure.resourcemanager.networkcloud.models.StorageApplianceEnableRemoteVendorManagementParameters; -import com.azure.resourcemanager.networkcloud.models.StorageApplianceList; import com.azure.resourcemanager.networkcloud.models.StorageAppliancePatchParameters; import com.azure.resourcemanager.networkcloud.models.StorageApplianceRunReadCommandsParameters; import java.nio.ByteBuffer; @@ -58,67 +57,31 @@ public final class StorageAppliancesClientImpl implements StorageAppliancesClien /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of StorageAppliancesClientImpl. * * @param client the instance of the service client containing this operation class. */ - StorageAppliancesClientImpl(NetworkCloudImpl client) { + StorageAppliancesClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(StorageAppliancesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudStorageAppliances to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for NetworkCloudManagementClientStorageAppliances to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudStorageAppliances") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientStorageAppliances") public interface StorageAppliancesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/storageAppliances") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/storageAppliances") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("storageApplianceName") String storageApplianceName, @HeaderParam("Accept") String accept, @@ -128,677 +91,599 @@ Mono> getByResourceGroup(@HostParam("$host") Str @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("storageApplianceName") String storageApplianceName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("storageApplianceName") String storageApplianceName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") StorageApplianceInner storageApplianceParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") StorageApplianceInner storageApplianceParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("storageApplianceName") String storageApplianceName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") StorageApplianceInner storageApplianceParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") StorageApplianceInner storageApplianceParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("storageApplianceName") String storageApplianceName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") StorageAppliancePatchParameters storageApplianceUpdateParameters, + Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("storageApplianceName") String storageApplianceName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") StorageAppliancePatchParameters storageApplianceUpdateParameters, + Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("storageApplianceName") String storageApplianceName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") StorageAppliancePatchParameters storageApplianceUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("storageApplianceName") String storageApplianceName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") StorageAppliancePatchParameters storageApplianceUpdateParameters, + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/storageAppliances") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/storageAppliances") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}/disableRemoteVendorManagement") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> disableRemoteVendorManagement(@HostParam("$host") String endpoint, + Mono>> disableRemoteVendorManagement(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("storageApplianceName") String storageApplianceName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("storageApplianceName") String storageApplianceName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}/disableRemoteVendorManagement") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response disableRemoteVendorManagementSync(@HostParam("$host") String endpoint, + Response disableRemoteVendorManagementSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("storageApplianceName") String storageApplianceName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("storageApplianceName") String storageApplianceName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}/enableRemoteVendorManagement") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> enableRemoteVendorManagement(@HostParam("$host") String endpoint, + Mono>> enableRemoteVendorManagement(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("storageApplianceName") String storageApplianceName, @BodyParam("application/json") StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}/enableRemoteVendorManagement") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response enableRemoteVendorManagementSync(@HostParam("$host") String endpoint, + Response enableRemoteVendorManagementSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("storageApplianceName") String storageApplianceName, @BodyParam("application/json") StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}/runReadCommands") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> runReadCommands(@HostParam("$host") String endpoint, + Mono>> runReadCommands(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("storageApplianceName") String storageApplianceName, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}/runReadCommands") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response runReadCommandsSync(@HostParam("$host") String endpoint, + Response runReadCommandsSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("storageApplianceName") String storageApplianceName, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + 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 listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + 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> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listBySubscriptionNext( + @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("$host") String endpoint, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List storage appliances in the subscription. - * - * Get a list of storage appliances in the provided subscription. + * Get properties of the provided storage appliance. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageApplianceName The name of the storage appliance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 storage appliances in the provided subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return properties of the provided storage appliance along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String storageApplianceName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List storage appliances in the subscription. - * - * Get a list of storage appliances in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 storage appliances in the provided subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer top, String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List storage appliances in the subscription. - * - * Get a list of storage appliances in the provided subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of storage appliances in the provided subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List storage appliances in the subscription. - * - * Get a list of storage appliances in the provided subscription. + * Get properties of the provided storage appliance. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageApplianceName The name of the storage appliance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 storage appliances in the provided subscription along with {@link PagedResponse}. + * @return properties of the provided storage appliance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + private Mono getByResourceGroupAsync(String resourceGroupName, String storageApplianceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, storageApplianceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List storage appliances in the subscription. - * - * Get a list of storage appliances in the provided subscription. + * Get properties of the provided storage appliance. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageApplianceName The name of the storage appliance. * @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 storage appliances in the provided subscription along with {@link PagedResponse}. + * @return properties of the provided storage appliance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + public Response getByResourceGroupWithResponse(String resourceGroupName, + String storageApplianceName, Context context) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, accept, context); } /** - * List storage appliances in the subscription. - * - * Get a list of storage appliances in the provided subscription. + * Get properties of the provided storage appliance. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageApplianceName The name of the storage appliance. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 storage appliances in the provided subscription as paginated response with - * {@link PagedIterable}. + * @return properties of the provided storage appliance. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listSinglePage(top, skipToken), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public StorageApplianceInner getByResourceGroup(String resourceGroupName, String storageApplianceName) { + return getByResourceGroupWithResponse(resourceGroupName, storageApplianceName, Context.NONE).getValue(); } /** - * List storage appliances in the subscription. - * - * Get a list of storage appliances in the provided subscription. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageApplianceName The name of the storage appliance. + * @param storageApplianceParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 storage appliances in the provided subscription as paginated response with - * {@link PagedIterable}. + * @return storageAppliance represents on-premises Network Cloud storage appliance along with {@link Response} on + * successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Integer top, String skipToken, Context context) { - return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String storageApplianceName, StorageApplianceInner storageApplianceParameters, String ifMatch, + String ifNoneMatch) { + 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, storageApplianceName, ifMatch, ifNoneMatch, + contentType, accept, storageApplianceParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List storage appliances in the resource group. - * - * Get a list of storage appliances in the provided resource group. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param storageApplianceName The name of the storage appliance. + * @param storageApplianceParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 storage appliances in the provided resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return storageAppliance represents on-premises Network Cloud storage appliance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String storageApplianceName, + StorageApplianceInner storageApplianceParameters, String ifMatch, String ifNoneMatch) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, contentType, + accept, storageApplianceParameters, Context.NONE); } /** - * List storage appliances in the resource group. - * - * Get a list of storage appliances in the provided resource group. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param storageApplianceName The name of the storage appliance. + * @param storageApplianceParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 storage appliances in the provided resource group as paginated response with {@link PagedFlux}. + * @return storageAppliance represents on-premises Network Cloud storage appliance along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, - String skipToken) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String storageApplianceName, + StorageApplianceInner storageApplianceParameters, String ifMatch, String ifNoneMatch, 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, storageApplianceName, ifMatch, ifNoneMatch, contentType, + accept, storageApplianceParameters, context); } /** - * List storage appliances in the resource group. - * - * Get a list of storage appliances in the provided resource group. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageApplianceName The name of the storage appliance. + * @param storageApplianceParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 storage appliances in the provided resource group as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of storageAppliance represents on-premises Network Cloud storage + * appliance. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, StorageApplianceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String storageApplianceName, StorageApplianceInner storageApplianceParameters, + String ifMatch, String ifNoneMatch) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, storageApplianceName, + storageApplianceParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), StorageApplianceInner.class, StorageApplianceInner.class, + this.client.getContext()); } /** - * List storage appliances in the resource group. - * - * Get a list of storage appliances in the provided resource group. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param storageApplianceName The name of the storage appliance. + * @param storageApplianceParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 storage appliances in the provided resource group along with {@link PagedResponse}. + * @return the {@link PollerFlux} for polling of storageAppliance represents on-premises Network Cloud storage + * appliance. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, StorageApplianceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String storageApplianceName, StorageApplianceInner storageApplianceParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, storageApplianceName, + storageApplianceParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), StorageApplianceInner.class, StorageApplianceInner.class, + this.client.getContext()); } /** - * List storage appliances in the resource group. - * - * Get a list of storage appliances in the provided resource group. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param storageApplianceName The name of the storage appliance. + * @param storageApplianceParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 storage appliances in the provided resource group along with {@link PagedResponse}. + * @return the {@link SyncPoller} for polling of storageAppliance represents on-premises Network Cloud storage + * appliance. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, StorageApplianceInner> beginCreateOrUpdate( + String resourceGroupName, String storageApplianceName, StorageApplianceInner storageApplianceParameters, + String ifMatch, String ifNoneMatch) { + Response response = createOrUpdateWithResponse(resourceGroupName, storageApplianceName, + storageApplianceParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, + StorageApplianceInner.class, StorageApplianceInner.class, Context.NONE); } /** - * List storage appliances in the resource group. - * - * Get a list of storage appliances in the provided resource group. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageApplianceName The name of the storage appliance. + * @param storageApplianceParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 storage appliances in the provided resource group as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of storageAppliance represents on-premises Network Cloud storage + * appliance. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, StorageApplianceInner> beginCreateOrUpdate( + String resourceGroupName, String storageApplianceName, StorageApplianceInner storageApplianceParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Response response = createOrUpdateWithResponse(resourceGroupName, storageApplianceName, + storageApplianceParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, + StorageApplianceInner.class, StorageApplianceInner.class, Context.NONE); } /** - * List storage appliances in the resource group. - * - * Get a list of storage appliances in the provided resource group. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param storageApplianceName The name of the storage appliance. + * @param storageApplianceParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 storage appliances in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, - String skipToken, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + * @return the {@link SyncPoller} for polling of storageAppliance represents on-premises Network Cloud storage + * appliance. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, StorageApplianceInner> beginCreateOrUpdate( + String resourceGroupName, String storageApplianceName, StorageApplianceInner storageApplianceParameters, + String ifMatch, String ifNoneMatch, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, storageApplianceName, + storageApplianceParameters, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, + StorageApplianceInner.class, StorageApplianceInner.class, context); } /** - * Retrieve the storage appliance. - * - * Get properties of the provided storage appliance. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. + * @param storageApplianceParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided storage appliance along with {@link Response} on successful completion of + * @return storageAppliance represents on-premises Network Cloud storage appliance on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String storageApplianceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono createOrUpdateAsync(String resourceGroupName, String storageApplianceName, + StorageApplianceInner storageApplianceParameters, String ifMatch, String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, storageApplianceName, storageApplianceParameters, ifMatch, + ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieve the storage appliance. - * - * Get properties of the provided storage appliance. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. + * @param storageApplianceParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided storage appliance on successful completion of {@link Mono}. + * @return storageAppliance represents on-premises Network Cloud storage appliance on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String storageApplianceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, storageApplianceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, String storageApplianceName, + StorageApplianceInner storageApplianceParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdateAsync(resourceGroupName, storageApplianceName, storageApplianceParameters, ifMatch, + ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieve the storage appliance. - * - * Get properties of the provided storage appliance. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. - * @param context The context to associate with this operation. + * @param storageApplianceParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided storage appliance along with {@link Response}. + * @return storageAppliance represents on-premises Network Cloud storage appliance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String storageApplianceName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, accept, context); + public StorageApplianceInner createOrUpdate(String resourceGroupName, String storageApplianceName, + StorageApplianceInner storageApplianceParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdate(resourceGroupName, storageApplianceName, storageApplianceParameters, ifMatch, + ifNoneMatch).getFinalResult(); } /** - * Retrieve the storage appliance. - * - * Get properties of the provided storage appliance. + * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will + * be rejected as the life cycle of this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. + * @param storageApplianceParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 properties of the provided storage appliance. + * @return storageAppliance represents on-premises Network Cloud storage appliance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StorageApplianceInner getByResourceGroup(String resourceGroupName, String storageApplianceName) { - return getByResourceGroupWithResponse(resourceGroupName, storageApplianceName, Context.NONE).getValue(); + public StorageApplianceInner createOrUpdate(String resourceGroupName, String storageApplianceName, + StorageApplianceInner storageApplianceParameters, String ifMatch, String ifNoneMatch, Context context) { + return beginCreateOrUpdate(resourceGroupName, storageApplianceName, storageApplianceParameters, ifMatch, + ifNoneMatch, context).getFinalResult(); } /** - * Create or update the storage appliance. - * - * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will - * be rejected as the life cycle of this resource is managed by the system. + * Update properties of the provided storage appliance, or update tags associated with the storage appliance + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param storageApplianceUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -806,104 +691,53 @@ public StorageApplianceInner getByResourceGroup(String resourceGroupName, String * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String storageApplianceName, StorageApplianceInner storageApplianceParameters, String ifMatch, - String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - if (storageApplianceParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter storageApplianceParameters is required and cannot be null.")); - } else { - storageApplianceParameters.validate(); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, + String storageApplianceName, String ifMatch, String ifNoneMatch, + StorageAppliancePatchParameters storageApplianceUpdateParameters) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, - storageApplianceParameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, accept, + storageApplianceUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update the storage appliance. - * - * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will - * be rejected as the life cycle of this resource is managed by the system. + * Update properties of the provided storage appliance, or update tags associated with the storage appliance + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param storageApplianceUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storageAppliance represents on-premises Network Cloud storage appliance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String storageApplianceName, - StorageApplianceInner storageApplianceParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - if (storageApplianceParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter storageApplianceParameters is required and cannot be null.")); - } else { - storageApplianceParameters.validate(); - } + private Response updateWithResponse(String resourceGroupName, String storageApplianceName, + String ifMatch, String ifNoneMatch, StorageAppliancePatchParameters storageApplianceUpdateParameters) { final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, - storageApplianceParameters, accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, accept, + storageApplianceUpdateParameters, Context.NONE); } /** - * Create or update the storage appliance. - * - * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will - * be rejected as the life cycle of this resource is managed by the system. + * Update properties of the provided storage appliance, or update tags associated with the storage appliance + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param storageApplianceUpdateParameters The request body. * @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. @@ -911,52 +745,26 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @return storageAppliance represents on-premises Network Cloud storage appliance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String storageApplianceName, - StorageApplianceInner storageApplianceParameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - if (storageApplianceParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter storageApplianceParameters is required and cannot be null.")); - } else { - storageApplianceParameters.validate(); - } + private Response updateWithResponse(String resourceGroupName, String storageApplianceName, + String ifMatch, String ifNoneMatch, StorageAppliancePatchParameters storageApplianceUpdateParameters, + Context context) { final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, - storageApplianceParameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, accept, + storageApplianceUpdateParameters, context); } /** - * Create or update the storage appliance. - * - * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will - * be rejected as the life cycle of this resource is managed by the system. + * Update properties of the provided storage appliance, or update tags associated with the storage appliance + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param storageApplianceUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -964,25 +772,22 @@ private Response createOrUpdateWithResponse(String resourceGroupName * appliance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, StorageApplianceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String storageApplianceName, StorageApplianceInner storageApplianceParameters, - String ifMatch, String ifNoneMatch) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, storageApplianceName, - storageApplianceParameters, ifMatch, ifNoneMatch); + private PollerFlux, StorageApplianceInner> beginUpdateAsync( + String resourceGroupName, String storageApplianceName, String ifMatch, String ifNoneMatch, + StorageAppliancePatchParameters storageApplianceUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, storageApplianceName, + ifMatch, ifNoneMatch, storageApplianceUpdateParameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), StorageApplianceInner.class, StorageApplianceInner.class, this.client.getContext()); } /** - * Create or update the storage appliance. - * - * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will - * be rejected as the life cycle of this resource is managed by the system. + * Update properties of the provided storage appliance, or update tags associated with the storage appliance + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -990,30 +795,29 @@ private PollerFlux, StorageApplianceInner> beg * appliance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, StorageApplianceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String storageApplianceName, StorageApplianceInner storageApplianceParameters) { + private PollerFlux, StorageApplianceInner> + beginUpdateAsync(String resourceGroupName, String storageApplianceName) { final String ifMatch = null; final String ifNoneMatch = null; - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, storageApplianceName, - storageApplianceParameters, ifMatch, ifNoneMatch); + final StorageAppliancePatchParameters storageApplianceUpdateParameters = null; + Mono>> mono = updateWithResponseAsync(resourceGroupName, storageApplianceName, + ifMatch, ifNoneMatch, storageApplianceUpdateParameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), StorageApplianceInner.class, StorageApplianceInner.class, this.client.getContext()); } /** - * Create or update the storage appliance. - * - * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will - * be rejected as the life cycle of this resource is managed by the system. + * Update properties of the provided storage appliance, or update tags associated with the storage appliance + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param storageApplianceUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1021,24 +825,21 @@ private PollerFlux, StorageApplianceInner> beg * appliance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, StorageApplianceInner> beginCreateOrUpdate( - String resourceGroupName, String storageApplianceName, StorageApplianceInner storageApplianceParameters, - String ifMatch, String ifNoneMatch) { - Response response = createOrUpdateWithResponse(resourceGroupName, storageApplianceName, - storageApplianceParameters, ifMatch, ifNoneMatch); + public SyncPoller, StorageApplianceInner> beginUpdate(String resourceGroupName, + String storageApplianceName, String ifMatch, String ifNoneMatch, + StorageAppliancePatchParameters storageApplianceUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, storageApplianceName, ifMatch, + ifNoneMatch, storageApplianceUpdateParameters); return this.client.getLroResult(response, StorageApplianceInner.class, StorageApplianceInner.class, Context.NONE); } /** - * Create or update the storage appliance. - * - * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will - * be rejected as the life cycle of this resource is managed by the system. + * Update properties of the provided storage appliance, or update tags associated with the storage appliance + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1046,29 +847,28 @@ public SyncPoller, StorageApplianceInner> begi * appliance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, StorageApplianceInner> beginCreateOrUpdate( - String resourceGroupName, String storageApplianceName, StorageApplianceInner storageApplianceParameters) { + public SyncPoller, StorageApplianceInner> beginUpdate(String resourceGroupName, + String storageApplianceName) { final String ifMatch = null; final String ifNoneMatch = null; - Response response = createOrUpdateWithResponse(resourceGroupName, storageApplianceName, - storageApplianceParameters, ifMatch, ifNoneMatch); + final StorageAppliancePatchParameters storageApplianceUpdateParameters = null; + Response response = updateWithResponse(resourceGroupName, storageApplianceName, ifMatch, + ifNoneMatch, storageApplianceUpdateParameters); return this.client.getLroResult(response, StorageApplianceInner.class, StorageApplianceInner.class, Context.NONE); } /** - * Create or update the storage appliance. - * - * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will - * be rejected as the life cycle of this resource is managed by the system. + * Update properties of the provided storage appliance, or update tags associated with the storage appliance + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param storageApplianceUpdateParameters The request body. * @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. @@ -1077,28 +877,26 @@ public SyncPoller, StorageApplianceInner> begi * appliance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, StorageApplianceInner> beginCreateOrUpdate( - String resourceGroupName, String storageApplianceName, StorageApplianceInner storageApplianceParameters, - String ifMatch, String ifNoneMatch, Context context) { - Response response = createOrUpdateWithResponse(resourceGroupName, storageApplianceName, - storageApplianceParameters, ifMatch, ifNoneMatch, context); + public SyncPoller, StorageApplianceInner> beginUpdate(String resourceGroupName, + String storageApplianceName, String ifMatch, String ifNoneMatch, + StorageAppliancePatchParameters storageApplianceUpdateParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, storageApplianceName, ifMatch, + ifNoneMatch, storageApplianceUpdateParameters, context); return this.client.getLroResult(response, StorageApplianceInner.class, StorageApplianceInner.class, context); } /** - * Create or update the storage appliance. - * - * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will - * be rejected as the life cycle of this resource is managed by the system. + * Update properties of the provided storage appliance, or update tags associated with the storage appliance + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param storageApplianceUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1106,21 +904,18 @@ public SyncPoller, StorageApplianceInner> begi * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String storageApplianceName, - StorageApplianceInner storageApplianceParameters, String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, storageApplianceName, storageApplianceParameters, ifMatch, - ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String storageApplianceName, + String ifMatch, String ifNoneMatch, StorageAppliancePatchParameters storageApplianceUpdateParameters) { + return beginUpdateAsync(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, + storageApplianceUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update the storage appliance. - * - * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will - * be rejected as the life cycle of this resource is managed by the system. + * Update properties of the provided storage appliance, or update tags associated with the storage appliance + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1128,50 +923,45 @@ private Mono createOrUpdateAsync(String resourceGroupName * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String storageApplianceName, - StorageApplianceInner storageApplianceParameters) { + private Mono updateAsync(String resourceGroupName, String storageApplianceName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, storageApplianceName, storageApplianceParameters, ifMatch, - ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + final StorageAppliancePatchParameters storageApplianceUpdateParameters = null; + return beginUpdateAsync(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, + storageApplianceUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update the storage appliance. - * - * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will - * be rejected as the life cycle of this resource is managed by the system. + * Update properties of the provided storage appliance, or update tags associated with the storage appliance + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storageAppliance represents on-premises Network Cloud storage appliance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StorageApplianceInner createOrUpdate(String resourceGroupName, String storageApplianceName, - StorageApplianceInner storageApplianceParameters) { + public StorageApplianceInner update(String resourceGroupName, String storageApplianceName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateOrUpdate(resourceGroupName, storageApplianceName, storageApplianceParameters, ifMatch, - ifNoneMatch).getFinalResult(); + final StorageAppliancePatchParameters storageApplianceUpdateParameters = null; + return beginUpdate(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, + storageApplianceUpdateParameters).getFinalResult(); } /** - * Create or update the storage appliance. - * - * Create a new storage appliance or update the properties of the existing one. All customer initiated requests will - * be rejected as the life cycle of this resource is managed by the system. + * Update properties of the provided storage appliance, or update tags associated with the storage appliance + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param storageApplianceUpdateParameters The request body. * @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. @@ -1179,15 +969,13 @@ public StorageApplianceInner createOrUpdate(String resourceGroupName, String sto * @return storageAppliance represents on-premises Network Cloud storage appliance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StorageApplianceInner createOrUpdate(String resourceGroupName, String storageApplianceName, - StorageApplianceInner storageApplianceParameters, String ifMatch, String ifNoneMatch, Context context) { - return beginCreateOrUpdate(resourceGroupName, storageApplianceName, storageApplianceParameters, ifMatch, - ifNoneMatch, context).getFinalResult(); + public StorageApplianceInner update(String resourceGroupName, String storageApplianceName, String ifMatch, + String ifNoneMatch, StorageAppliancePatchParameters storageApplianceUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, + storageApplianceUpdateParameters, context).getFinalResult(); } /** - * Delete the storage appliance. - * * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this * resource is managed by the system. * @@ -1200,39 +988,17 @@ public StorageApplianceInner createOrUpdate(String resourceGroupName, String sto * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String storageApplianceName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, accept, - context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the storage appliance. - * * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this * resource is managed by the system. * @@ -1245,38 +1011,17 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String storageApplianceName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, accept, + this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, Context.NONE); } /** - * Delete the storage appliance. - * * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this * resource is managed by the system. * @@ -1290,38 +1035,16 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String storageApplianceName, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, accept, - context); + this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, context); } /** - * Delete the storage appliance. - * * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this * resource is managed by the system. * @@ -1334,21 +1057,18 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String storageApplianceName, String ifMatch, String ifNoneMatch) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String storageApplianceName, + String ifMatch, String ifNoneMatch) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the storage appliance. - * * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this * resource is managed by the system. * @@ -1357,23 +1077,19 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String storageApplianceName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String storageApplianceName) { final String ifMatch = null; final String ifNoneMatch = null; Mono>> mono = deleteWithResponseAsync(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the storage appliance. - * * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this * resource is managed by the system. * @@ -1386,20 +1102,17 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String storageApplianceName, String ifMatch, String ifNoneMatch) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String storageApplianceName, + String ifMatch, String ifNoneMatch) { Response response = deleteWithResponse(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the storage appliance. - * * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this * resource is managed by the system. * @@ -1408,22 +1121,18 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String storageApplianceName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String storageApplianceName) { final String ifMatch = null; final String ifNoneMatch = null; Response response = deleteWithResponse(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the storage appliance. - * * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this * resource is managed by the system. * @@ -1437,20 +1146,17 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( - String resourceGroupName, String storageApplianceName, String ifMatch, String ifNoneMatch, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String storageApplianceName, + String ifMatch, String ifNoneMatch, Context context) { Response response = deleteWithResponse(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Delete the storage appliance. - * * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this * resource is managed by the system. * @@ -1463,18 +1169,16 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String storageApplianceName, - String ifMatch, String ifNoneMatch) { + private Mono deleteAsync(String resourceGroupName, String storageApplianceName, String ifMatch, + String ifNoneMatch) { return beginDeleteAsync(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the storage appliance. - * * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this * resource is managed by the system. * @@ -1483,10 +1187,10 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String storageApplianceName) { + private Mono deleteAsync(String resourceGroupName, String storageApplianceName) { final String ifMatch = null; final String ifNoneMatch = null; return beginDeleteAsync(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch).last() @@ -1494,8 +1198,6 @@ private Mono deleteAsync(String resourceGroupName, S } /** - * Delete the storage appliance. - * * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this * resource is managed by the system. * @@ -1504,18 +1206,15 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String storageApplianceName) { + public void delete(String resourceGroupName, String storageApplianceName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginDelete(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch).getFinalResult(); + beginDelete(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch).getFinalResult(); } /** - * Delete the storage appliance. - * * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this * resource is managed by the system. * @@ -1529,404 +1228,292 @@ public OperationStatusResultInner delete(String resourceGroupName, String storag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 delete(String resourceGroupName, String storageApplianceName, String ifMatch, - String ifNoneMatch, Context context) { - return beginDelete(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, context).getFinalResult(); + public void delete(String resourceGroupName, String storageApplianceName, String ifMatch, String ifNoneMatch, + Context context) { + beginDelete(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, context).getFinalResult(); } /** - * Patch the storage appliance. - * - * Update properties of the provided storage appliance, or update tags associated with the storage appliance - * Properties and tag updates can be done independently. + * Get a list of storage appliances in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param storageApplianceUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storageAppliance represents on-premises Network Cloud storage appliance along with {@link Response} on + * @return a list of storage appliances in the provided resource group along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String storageApplianceName, String ifMatch, String ifNoneMatch, - StorageAppliancePatchParameters storageApplianceUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - if (storageApplianceUpdateParameters != null) { - storageApplianceUpdateParameters.validate(); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Integer top, String skipToken) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, - storageApplianceUpdateParameters, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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())); } /** - * Patch the storage appliance. + * Get a list of storage appliances in the provided resource group. * - * Update properties of the provided storage appliance, or update tags associated with the storage appliance - * Properties and tag updates can be done independently. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 storage appliances in the provided resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, + String skipToken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of storage appliances in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param storageApplianceUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storageAppliance represents on-premises Network Cloud storage appliance along with {@link Response}. + * @return a list of storage appliances in the provided resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of storage appliances in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 storage appliances in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String storageApplianceName, - String ifMatch, String ifNoneMatch, StorageAppliancePatchParameters storageApplianceUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - if (storageApplianceUpdateParameters != null) { - storageApplianceUpdateParameters.validate(); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken) { final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, - storageApplianceUpdateParameters, accept, Context.NONE); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the storage appliance. - * - * Update properties of the provided storage appliance, or update tags associated with the storage appliance - * Properties and tag updates can be done independently. + * Get a list of storage appliances in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param storageApplianceUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 storageAppliance represents on-premises Network Cloud storage appliance along with {@link Response}. + * @return a list of storage appliances in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String storageApplianceName, - String ifMatch, String ifNoneMatch, StorageAppliancePatchParameters storageApplianceUpdateParameters, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - if (storageApplianceUpdateParameters != null) { - storageApplianceUpdateParameters.validate(); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken, Context context) { final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, - storageApplianceUpdateParameters, accept, context); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the storage appliance. - * - * Update properties of the provided storage appliance, or update tags associated with the storage appliance - * Properties and tag updates can be done independently. + * Get a list of storage appliances in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param storageApplianceUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 storageAppliance represents on-premises Network Cloud storage - * appliance. + * @return a list of storage appliances in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, StorageApplianceInner> beginUpdateAsync( - String resourceGroupName, String storageApplianceName, String ifMatch, String ifNoneMatch, - StorageAppliancePatchParameters storageApplianceUpdateParameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, storageApplianceName, - ifMatch, ifNoneMatch, storageApplianceUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), StorageApplianceInner.class, StorageApplianceInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Patch the storage appliance. - * - * Update properties of the provided storage appliance, or update tags associated with the storage appliance - * Properties and tag updates can be done independently. + * Get a list of storage appliances in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of storageAppliance represents on-premises Network Cloud storage - * appliance. + * @return a list of storage appliances in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, StorageApplianceInner> - beginUpdateAsync(String resourceGroupName, String storageApplianceName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final StorageAppliancePatchParameters storageApplianceUpdateParameters = null; - Mono>> mono = updateWithResponseAsync(resourceGroupName, storageApplianceName, - ifMatch, ifNoneMatch, storageApplianceUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), StorageApplianceInner.class, StorageApplianceInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, + String skipToken, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Patch the storage appliance. - * - * Update properties of the provided storage appliance, or update tags associated with the storage appliance - * Properties and tag updates can be done independently. + * Get a list of storage appliances in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param storageApplianceUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 storageAppliance represents on-premises Network Cloud storage - * appliance. + * @return a list of storage appliances in the provided subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, StorageApplianceInner> beginUpdate(String resourceGroupName, - String storageApplianceName, String ifMatch, String ifNoneMatch, - StorageAppliancePatchParameters storageApplianceUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, storageApplianceName, ifMatch, - ifNoneMatch, storageApplianceUpdateParameters); - return this.client.getLroResult(response, - StorageApplianceInner.class, StorageApplianceInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, 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())); } /** - * Patch the storage appliance. - * - * Update properties of the provided storage appliance, or update tags associated with the storage appliance - * Properties and tag updates can be done independently. + * Get a list of storage appliances in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 storageAppliance represents on-premises Network Cloud storage - * appliance. + * @return a list of storage appliances in the provided subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, StorageApplianceInner> beginUpdate(String resourceGroupName, - String storageApplianceName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final StorageAppliancePatchParameters storageApplianceUpdateParameters = null; - Response response = updateWithResponse(resourceGroupName, storageApplianceName, ifMatch, - ifNoneMatch, storageApplianceUpdateParameters); - return this.client.getLroResult(response, - StorageApplianceInner.class, StorageApplianceInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Integer top, String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Patch the storage appliance. - * - * Update properties of the provided storage appliance, or update tags associated with the storage appliance - * Properties and tag updates can be done independently. + * Get a list of storage appliances in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param storageApplianceUpdateParameters The request body. - * @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 storageAppliance represents on-premises Network Cloud storage - * appliance. + * @return a list of storage appliances in the provided subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, StorageApplianceInner> beginUpdate(String resourceGroupName, - String storageApplianceName, String ifMatch, String ifNoneMatch, - StorageAppliancePatchParameters storageApplianceUpdateParameters, Context context) { - Response response = updateWithResponse(resourceGroupName, storageApplianceName, ifMatch, - ifNoneMatch, storageApplianceUpdateParameters, context); - return this.client.getLroResult(response, - StorageApplianceInner.class, StorageApplianceInner.class, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Patch the storage appliance. - * - * Update properties of the provided storage appliance, or update tags associated with the storage appliance - * Properties and tag updates can be done independently. + * Get a list of storage appliances in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param storageApplianceUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storageAppliance represents on-premises Network Cloud storage appliance on successful completion of - * {@link Mono}. + * @return a list of storage appliances in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String storageApplianceName, - String ifMatch, String ifNoneMatch, StorageAppliancePatchParameters storageApplianceUpdateParameters) { - return beginUpdateAsync(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, - storageApplianceUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(Integer top, String skipToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the storage appliance. - * - * Update properties of the provided storage appliance, or update tags associated with the storage appliance - * Properties and tag updates can be done independently. + * Get a list of storage appliances in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 storageAppliance represents on-premises Network Cloud storage appliance on successful completion of - * {@link Mono}. + * @return a list of storage appliances in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String storageApplianceName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final StorageAppliancePatchParameters storageApplianceUpdateParameters = null; - return beginUpdateAsync(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, - storageApplianceUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the storage appliance. - * - * Update properties of the provided storage appliance, or update tags associated with the storage appliance - * Properties and tag updates can be done independently. + * Get a list of storage appliances in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storageAppliance represents on-premises Network Cloud storage appliance. + * @return a list of storage appliances in the provided subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public StorageApplianceInner update(String resourceGroupName, String storageApplianceName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final StorageAppliancePatchParameters storageApplianceUpdateParameters = null; - return beginUpdate(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, - storageApplianceUpdateParameters).getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listSinglePage(top, skipToken), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * Patch the storage appliance. - * - * Update properties of the provided storage appliance, or update tags associated with the storage appliance - * Properties and tag updates can be done independently. + * Get a list of storage appliances in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param storageApplianceUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 storageAppliance represents on-premises Network Cloud storage appliance. + * @return a list of storage appliances in the provided subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public StorageApplianceInner update(String resourceGroupName, String storageApplianceName, String ifMatch, - String ifNoneMatch, StorageAppliancePatchParameters storageApplianceUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, - storageApplianceUpdateParameters, context).getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Integer top, String skipToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * Turn off remote vendor management for a storage appliance, if supported. - * * Disable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1934,39 +1521,19 @@ public StorageApplianceInner update(String resourceGroupName, String storageAppl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> disableRemoteVendorManagementWithResponseAsync(String resourceGroupName, String storageApplianceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext( context -> service.disableRemoteVendorManagement(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Turn off remote vendor management for a storage appliance, if supported. - * * Disable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1974,37 +1541,16 @@ private Mono>> disableRemoteVendorManagementWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response disableRemoteVendorManagementWithResponse(String resourceGroupName, String storageApplianceName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - final String accept = "application/json"; return service.disableRemoteVendorManagementSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, Context.NONE); } /** - * Turn off remote vendor management for a storage appliance, if supported. - * * Disable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2013,37 +1559,16 @@ private Response disableRemoteVendorManagementWithResponse(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response disableRemoteVendorManagementWithResponse(String resourceGroupName, String storageApplianceName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - final String accept = "application/json"; return service.disableRemoteVendorManagementSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, accept, context); + this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, context); } /** - * Turn off remote vendor management for a storage appliance, if supported. - * * Disable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2051,21 +1576,19 @@ private Response disableRemoteVendorManagementWithResponse(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> + private PollerFlux, OperationStatusResult> beginDisableRemoteVendorManagementAsync(String resourceGroupName, String storageApplianceName) { Mono>> mono = disableRemoteVendorManagementWithResponseAsync(resourceGroupName, storageApplianceName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Turn off remote vendor management for a storage appliance, if supported. - * * Disable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2073,20 +1596,18 @@ private Response disableRemoteVendorManagementWithResponse(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> + public SyncPoller, OperationStatusResult> beginDisableRemoteVendorManagement(String resourceGroupName, String storageApplianceName) { Response response = disableRemoteVendorManagementWithResponse(resourceGroupName, storageApplianceName); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Turn off remote vendor management for a storage appliance, if supported. - * * Disable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2095,20 +1616,18 @@ private Response disableRemoteVendorManagementWithResponse(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> + public SyncPoller, OperationStatusResult> beginDisableRemoteVendorManagement(String resourceGroupName, String storageApplianceName, Context context) { Response response = disableRemoteVendorManagementWithResponse(resourceGroupName, storageApplianceName, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Turn off remote vendor management for a storage appliance, if supported. - * * Disable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2116,18 +1635,16 @@ private Response disableRemoteVendorManagementWithResponse(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono disableRemoteVendorManagementAsync(String resourceGroupName, + private Mono disableRemoteVendorManagementAsync(String resourceGroupName, String storageApplianceName) { return beginDisableRemoteVendorManagementAsync(resourceGroupName, storageApplianceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Turn off remote vendor management for a storage appliance, if supported. - * * Disable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2135,17 +1652,14 @@ private Mono disableRemoteVendorManagementAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner disableRemoteVendorManagement(String resourceGroupName, - String storageApplianceName) { + public OperationStatusResult disableRemoteVendorManagement(String resourceGroupName, String storageApplianceName) { return beginDisableRemoteVendorManagement(resourceGroupName, storageApplianceName).getFinalResult(); } /** - * Turn off remote vendor management for a storage appliance, if supported. - * * Disable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2154,17 +1668,15 @@ public OperationStatusResultInner disableRemoteVendorManagement(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner disableRemoteVendorManagement(String resourceGroupName, - String storageApplianceName, Context context) { + public OperationStatusResult disableRemoteVendorManagement(String resourceGroupName, String storageApplianceName, + Context context) { return beginDisableRemoteVendorManagement(resourceGroupName, storageApplianceName, context).getFinalResult(); } /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2173,43 +1685,20 @@ public OperationStatusResultInner disableRemoteVendorManagement(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> enableRemoteVendorManagementWithResponseAsync(String resourceGroupName, String storageApplianceName, StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - if (storageApplianceEnableRemoteVendorManagementParameters != null) { - storageApplianceEnableRemoteVendorManagementParameters.validate(); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.enableRemoteVendorManagement(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, - storageApplianceEnableRemoteVendorManagementParameters, accept, context)) + storageApplianceEnableRemoteVendorManagementParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2218,42 +1707,18 @@ private Mono>> enableRemoteVendorManagementWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response enableRemoteVendorManagementWithResponse(String resourceGroupName, String storageApplianceName, StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - if (storageApplianceEnableRemoteVendorManagementParameters != null) { - storageApplianceEnableRemoteVendorManagementParameters.validate(); - } - final String accept = "application/json"; return service.enableRemoteVendorManagementSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, - storageApplianceEnableRemoteVendorManagementParameters, accept, Context.NONE); + storageApplianceEnableRemoteVendorManagementParameters, Context.NONE); } /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2263,43 +1728,19 @@ private Response enableRemoteVendorManagementWithResponse(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response enableRemoteVendorManagementWithResponse(String resourceGroupName, String storageApplianceName, StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - if (storageApplianceEnableRemoteVendorManagementParameters != null) { - storageApplianceEnableRemoteVendorManagementParameters.validate(); - } - final String accept = "application/json"; return service.enableRemoteVendorManagementSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, - storageApplianceEnableRemoteVendorManagementParameters, accept, context); + storageApplianceEnableRemoteVendorManagementParameters, context); } /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2308,22 +1749,20 @@ private Response enableRemoteVendorManagementWithResponse(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginEnableRemoteVendorManagementAsync(String resourceGroupName, String storageApplianceName, - StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters) { + private PollerFlux, OperationStatusResult> beginEnableRemoteVendorManagementAsync( + String resourceGroupName, String storageApplianceName, + StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters) { Mono>> mono = enableRemoteVendorManagementWithResponseAsync(resourceGroupName, storageApplianceName, storageApplianceEnableRemoteVendorManagementParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2331,23 +1770,21 @@ private Response enableRemoteVendorManagementWithResponse(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> + private PollerFlux, OperationStatusResult> beginEnableRemoteVendorManagementAsync(String resourceGroupName, String storageApplianceName) { final StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters = null; Mono>> mono = enableRemoteVendorManagementWithResponseAsync(resourceGroupName, storageApplianceName, storageApplianceEnableRemoteVendorManagementParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2356,21 +1793,19 @@ private Response enableRemoteVendorManagementWithResponse(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginEnableRemoteVendorManagement(String resourceGroupName, String storageApplianceName, - StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters) { + public SyncPoller, OperationStatusResult> beginEnableRemoteVendorManagement( + String resourceGroupName, String storageApplianceName, + StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters) { Response response = enableRemoteVendorManagementWithResponse(resourceGroupName, storageApplianceName, storageApplianceEnableRemoteVendorManagementParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2378,22 +1813,20 @@ private Response enableRemoteVendorManagementWithResponse(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> + public SyncPoller, OperationStatusResult> beginEnableRemoteVendorManagement(String resourceGroupName, String storageApplianceName) { final StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters = null; Response response = enableRemoteVendorManagementWithResponse(resourceGroupName, storageApplianceName, storageApplianceEnableRemoteVendorManagementParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2403,22 +1836,20 @@ private Response enableRemoteVendorManagementWithResponse(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginEnableRemoteVendorManagement(String resourceGroupName, String storageApplianceName, - StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters, - Context context) { + public SyncPoller, OperationStatusResult> beginEnableRemoteVendorManagement( + String resourceGroupName, String storageApplianceName, + StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters, + Context context) { Response response = enableRemoteVendorManagementWithResponse(resourceGroupName, storageApplianceName, storageApplianceEnableRemoteVendorManagementParameters, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2427,10 +1858,10 @@ private Response enableRemoteVendorManagementWithResponse(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono enableRemoteVendorManagementAsync(String resourceGroupName, + private Mono enableRemoteVendorManagementAsync(String resourceGroupName, String storageApplianceName, StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters) { return beginEnableRemoteVendorManagementAsync(resourceGroupName, storageApplianceName, @@ -2439,8 +1870,6 @@ private Mono enableRemoteVendorManagementAsync(Strin } /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2448,10 +1877,10 @@ private Mono enableRemoteVendorManagementAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono enableRemoteVendorManagementAsync(String resourceGroupName, + private Mono enableRemoteVendorManagementAsync(String resourceGroupName, String storageApplianceName) { final StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters = null; @@ -2461,8 +1890,6 @@ private Mono enableRemoteVendorManagementAsync(Strin } /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2470,11 +1897,10 @@ private Mono enableRemoteVendorManagementAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner enableRemoteVendorManagement(String resourceGroupName, - String storageApplianceName) { + public OperationStatusResult enableRemoteVendorManagement(String resourceGroupName, String storageApplianceName) { final StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters = null; return beginEnableRemoteVendorManagement(resourceGroupName, storageApplianceName, @@ -2482,8 +1908,6 @@ public OperationStatusResultInner enableRemoteVendorManagement(String resourceGr } /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2493,11 +1917,10 @@ public OperationStatusResultInner enableRemoteVendorManagement(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner enableRemoteVendorManagement(String resourceGroupName, - String storageApplianceName, + public OperationStatusResult enableRemoteVendorManagement(String resourceGroupName, String storageApplianceName, StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters, Context context) { return beginEnableRemoteVendorManagement(resourceGroupName, storageApplianceName, @@ -2505,8 +1928,6 @@ public OperationStatusResultInner enableRemoteVendorManagement(String resourceGr } /** - * Run read-only commands against a storage appliance. - * * Run one or more read-only commands on the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2515,46 +1936,21 @@ public OperationStatusResultInner enableRemoteVendorManagement(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> runReadCommandsWithResponseAsync(String resourceGroupName, String storageApplianceName, StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - if (storageApplianceRunReadCommandsParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter storageApplianceRunReadCommandsParameters is required and cannot be null.")); - } else { - storageApplianceRunReadCommandsParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.runReadCommands(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, - storageApplianceRunReadCommandsParameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, contentType, + storageApplianceRunReadCommandsParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Run read-only commands against a storage appliance. - * * Run one or more read-only commands on the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2563,45 +1959,18 @@ private Mono>> runReadCommandsWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response runReadCommandsWithResponse(String resourceGroupName, String storageApplianceName, StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - if (storageApplianceRunReadCommandsParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter storageApplianceRunReadCommandsParameters is required and cannot be null.")); - } else { - storageApplianceRunReadCommandsParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.runReadCommandsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, - storageApplianceRunReadCommandsParameters, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, contentType, + storageApplianceRunReadCommandsParameters, Context.NONE); } /** - * Run read-only commands against a storage appliance. - * * Run one or more read-only commands on the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2611,45 +1980,18 @@ private Response runReadCommandsWithResponse(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response runReadCommandsWithResponse(String resourceGroupName, String storageApplianceName, StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (storageApplianceName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter storageApplianceName is required and cannot be null.")); - } - if (storageApplianceRunReadCommandsParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter storageApplianceRunReadCommandsParameters is required and cannot be null.")); - } else { - storageApplianceRunReadCommandsParameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.runReadCommandsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, - storageApplianceRunReadCommandsParameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, storageApplianceName, contentType, + storageApplianceRunReadCommandsParameters, context); } /** - * Run read-only commands against a storage appliance. - * * Run one or more read-only commands on the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2658,22 +2000,20 @@ private Response runReadCommandsWithResponse(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginRunReadCommandsAsync( + private PollerFlux, OperationStatusResult> beginRunReadCommandsAsync( String resourceGroupName, String storageApplianceName, StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters) { Mono>> mono = runReadCommandsWithResponseAsync(resourceGroupName, storageApplianceName, storageApplianceRunReadCommandsParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Run read-only commands against a storage appliance. - * * Run one or more read-only commands on the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2682,21 +2022,19 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginRunReadCommands( + public SyncPoller, OperationStatusResult> beginRunReadCommands( String resourceGroupName, String storageApplianceName, StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters) { Response response = runReadCommandsWithResponse(resourceGroupName, storageApplianceName, storageApplianceRunReadCommandsParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Run read-only commands against a storage appliance. - * * Run one or more read-only commands on the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2706,21 +2044,19 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginRunReadCommands( + public SyncPoller, OperationStatusResult> beginRunReadCommands( String resourceGroupName, String storageApplianceName, StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters, Context context) { Response response = runReadCommandsWithResponse(resourceGroupName, storageApplianceName, storageApplianceRunReadCommandsParameters, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Run read-only commands against a storage appliance. - * * Run one or more read-only commands on the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2729,18 +2065,16 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono runReadCommandsAsync(String resourceGroupName, String storageApplianceName, + private Mono runReadCommandsAsync(String resourceGroupName, String storageApplianceName, StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters) { return beginRunReadCommandsAsync(resourceGroupName, storageApplianceName, storageApplianceRunReadCommandsParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Run read-only commands against a storage appliance. - * * Run one or more read-only commands on the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2749,18 +2083,16 @@ private Mono runReadCommandsAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner runReadCommands(String resourceGroupName, String storageApplianceName, + public OperationStatusResult runReadCommands(String resourceGroupName, String storageApplianceName, StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters) { return beginRunReadCommands(resourceGroupName, storageApplianceName, storageApplianceRunReadCommandsParameters) .getFinalResult(); } /** - * Run read-only commands against a storage appliance. - * * Run one or more read-only commands on the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2770,77 +2102,55 @@ public OperationStatusResultInner runReadCommands(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner runReadCommands(String resourceGroupName, String storageApplianceName, + public OperationStatusResult runReadCommands(String resourceGroupName, String storageApplianceName, StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters, Context context) { return beginRunReadCommands(resourceGroupName, storageApplianceName, storageApplianceRunReadCommandsParameters, context).getFinalResult(); } /** - * List storage appliances in the subscription. - * * 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 storage appliances in the provided subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of storage appliances in the provided resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); } /** - * List storage appliances in the subscription. - * * 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 storage appliances in the provided subscription along with {@link PagedResponse}. + * @return a list of storage appliances in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = 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); } /** - * List storage appliances in the subscription. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2848,88 +2158,57 @@ private PagedResponse listBySubscriptionNextSinglePage(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of storage appliances in the provided subscription along with {@link PagedResponse}. + * @return a list of storage appliances in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List storage appliances in the resource group. - * * 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 storage appliances in the provided resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of storage appliances in the provided subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(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())); } /** - * List storage appliances in the resource group. - * * 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 storage appliances in the provided resource group along with {@link PagedResponse}. + * @return a list of storage appliances in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List storage appliances in the resource group. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2937,25 +2216,14 @@ private PagedResponse listByResourceGroupNextSinglePage(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of storage appliances in the provided resource group along with {@link PagedResponse}. + * @return a list of storage appliances in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(StorageAppliancesClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageAppliancesImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageAppliancesImpl.java index 4e14bbb36e16..54c10f46e586 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageAppliancesImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageAppliancesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -10,7 +10,6 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.fluent.models.StorageApplianceInner; import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; import com.azure.resourcemanager.networkcloud.models.StorageAppliance; @@ -31,14 +30,30 @@ public StorageAppliancesImpl(StorageAppliancesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new StorageApplianceImpl(inner1, this.manager())); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String storageApplianceName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, storageApplianceName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new StorageApplianceImpl(inner.getValue(), this.manager())); } - public PagedIterable list(Integer top, String skipToken, Context context) { - PagedIterable inner = this.serviceClient().list(top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new StorageApplianceImpl(inner1, this.manager())); + public StorageAppliance getByResourceGroup(String resourceGroupName, String storageApplianceName) { + StorageApplianceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, storageApplianceName); + if (inner != null) { + return new StorageApplianceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String storageApplianceName) { + this.serviceClient().delete(resourceGroupName, storageApplianceName); + } + + public void delete(String resourceGroupName, String storageApplianceName, String ifMatch, String ifNoneMatch, + Context context) { + this.serviceClient().delete(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, context); } public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -53,112 +68,48 @@ public PagedIterable listByResourceGroup(String resourceGroupN return ResourceManagerUtils.mapPage(inner, inner1 -> new StorageApplianceImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse(String resourceGroupName, - String storageApplianceName, Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, storageApplianceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new StorageApplianceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public StorageAppliance getByResourceGroup(String resourceGroupName, String storageApplianceName) { - StorageApplianceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, storageApplianceName); - if (inner != null) { - return new StorageApplianceImpl(inner, this.manager()); - } else { - return null; - } - } - - public OperationStatusResult deleteByResourceGroup(String resourceGroupName, String storageApplianceName) { - OperationStatusResultInner inner = this.serviceClient().delete(resourceGroupName, storageApplianceName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new StorageApplianceImpl(inner1, this.manager())); } - public OperationStatusResult delete(String resourceGroupName, String storageApplianceName, String ifMatch, - String ifNoneMatch, Context context) { - OperationStatusResultInner inner - = this.serviceClient().delete(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(Integer top, String skipToken, Context context) { + PagedIterable inner = this.serviceClient().list(top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new StorageApplianceImpl(inner1, this.manager())); } public OperationStatusResult disableRemoteVendorManagement(String resourceGroupName, String storageApplianceName) { - OperationStatusResultInner inner - = this.serviceClient().disableRemoteVendorManagement(resourceGroupName, storageApplianceName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().disableRemoteVendorManagement(resourceGroupName, storageApplianceName); } public OperationStatusResult disableRemoteVendorManagement(String resourceGroupName, String storageApplianceName, Context context) { - OperationStatusResultInner inner - = this.serviceClient().disableRemoteVendorManagement(resourceGroupName, storageApplianceName, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().disableRemoteVendorManagement(resourceGroupName, storageApplianceName, context); } public OperationStatusResult enableRemoteVendorManagement(String resourceGroupName, String storageApplianceName) { - OperationStatusResultInner inner - = this.serviceClient().enableRemoteVendorManagement(resourceGroupName, storageApplianceName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().enableRemoteVendorManagement(resourceGroupName, storageApplianceName); } public OperationStatusResult enableRemoteVendorManagement(String resourceGroupName, String storageApplianceName, StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters, Context context) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .enableRemoteVendorManagement(resourceGroupName, storageApplianceName, storageApplianceEnableRemoteVendorManagementParameters, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public OperationStatusResult runReadCommands(String resourceGroupName, String storageApplianceName, StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .runReadCommands(resourceGroupName, storageApplianceName, storageApplianceRunReadCommandsParameters); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public OperationStatusResult runReadCommands(String resourceGroupName, String storageApplianceName, StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters, Context context) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .runReadCommands(resourceGroupName, storageApplianceName, storageApplianceRunReadCommandsParameters, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public StorageAppliance getById(String id) { @@ -189,7 +140,7 @@ public Response getByIdWithResponse(String id, Context context return this.getByResourceGroupWithResponse(resourceGroupName, storageApplianceName, context); } - public OperationStatusResult deleteById(String id) { + public void deleteById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -202,11 +153,10 @@ public OperationStatusResult deleteById(String id) { } String localIfMatch = null; String localIfNoneMatch = null; - return this.delete(resourceGroupName, storageApplianceName, localIfMatch, localIfNoneMatch, Context.NONE); + this.delete(resourceGroupName, storageApplianceName, localIfMatch, localIfNoneMatch, Context.NONE); } - public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, - Context context) { + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -217,7 +167,7 @@ public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'storageAppliances'.", id))); } - return this.delete(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, context); + this.delete(resourceGroupName, storageApplianceName, ifMatch, ifNoneMatch, context); } private StorageAppliancesClient serviceClient() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/TrunkedNetworkImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/TrunkedNetworkImpl.java index f2be9b182881..064beb59ebad 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/TrunkedNetworkImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/TrunkedNetworkImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -60,6 +60,32 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public HybridAksPluginType hybridAksPluginType() { + return this.innerModel().hybridAksPluginType(); + } + + public String interfaceName() { + return this.innerModel().interfaceName(); + } + + public List isolationDomainIds() { + List inner = this.innerModel().isolationDomainIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List vlans() { + List inner = this.innerModel().vlans(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public List associatedResourceIds() { List inner = this.innerModel().associatedResourceIds(); if (inner != null) { @@ -90,27 +116,6 @@ public List hybridAksClustersAssociatedIds() { } } - public HybridAksPluginType hybridAksPluginType() { - return this.innerModel().hybridAksPluginType(); - } - - public String interfaceName() { - return this.innerModel().interfaceName(); - } - - public List isolationDomainIds() { - List inner = this.innerModel().isolationDomainIds(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public TrunkedNetworkProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - public List virtualMachinesAssociatedIds() { List inner = this.innerModel().virtualMachinesAssociatedIds(); if (inner != null) { @@ -120,13 +125,8 @@ public List virtualMachinesAssociatedIds() { } } - public List vlans() { - List inner = this.innerModel().vlans(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public TrunkedNetworkProvisioningState provisioningState() { + return this.innerModel().provisioningState(); } public Region region() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/TrunkedNetworksClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/TrunkedNetworksClientImpl.java index 33e36083d2f9..4540cac245c8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/TrunkedNetworksClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/TrunkedNetworksClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -31,13 +31,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.TrunkedNetworksClient; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.fluent.models.TrunkedNetworkInner; -import com.azure.resourcemanager.networkcloud.models.TrunkedNetworkList; +import com.azure.resourcemanager.networkcloud.implementation.models.TrunkedNetworkList; import com.azure.resourcemanager.networkcloud.models.TrunkedNetworkPatchParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,67 +53,31 @@ public final class TrunkedNetworksClientImpl implements TrunkedNetworksClient { /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of TrunkedNetworksClientImpl. * * @param client the instance of the service client containing this operation class. */ - TrunkedNetworksClientImpl(NetworkCloudImpl client) { + TrunkedNetworksClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(TrunkedNetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudTrunkedNetworks to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for NetworkCloudManagementClientTrunkedNetworks to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudTrunkedNetworks") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientTrunkedNetworks") public interface TrunkedNetworksService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/trunkedNetworks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/trunkedNetworks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("trunkedNetworkName") String trunkedNetworkName, @HeaderParam("Accept") String accept, @@ -125,94 +87,112 @@ Mono> getByResourceGroup(@HostParam("$host") Strin @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("trunkedNetworkName") String trunkedNetworkName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("trunkedNetworkName") String trunkedNetworkName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") TrunkedNetworkInner trunkedNetworkParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") TrunkedNetworkInner trunkedNetworkParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("trunkedNetworkName") String trunkedNetworkName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") TrunkedNetworkInner trunkedNetworkParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") TrunkedNetworkInner trunkedNetworkParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("trunkedNetworkName") String trunkedNetworkName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TrunkedNetworkPatchParameters trunkedNetworkUpdateParameters, + Context context); @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("trunkedNetworkName") String trunkedNetworkName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TrunkedNetworkPatchParameters trunkedNetworkUpdateParameters, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("trunkedNetworkName") String trunkedNetworkName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("trunkedNetworkName") String trunkedNetworkName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") TrunkedNetworkPatchParameters trunkedNetworkUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("trunkedNetworkName") String trunkedNetworkName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") TrunkedNetworkPatchParameters trunkedNetworkUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/trunkedNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/trunkedNetworks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -220,7 +200,7 @@ Response listBySubscriptionNextSync( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -228,385 +208,27 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List trunked networks in the subscription. - * - * Get a list of trunked networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 trunked networks in the provided subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, 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 trunked networks in the subscription. - * - * Get a list of trunked networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 trunked networks in the provided subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer top, String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List trunked networks in the subscription. - * - * Get a list of trunked networks in the provided subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of trunked networks in the provided subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List trunked networks in the subscription. - * - * Get a list of trunked networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 trunked networks in the provided subscription along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List trunked networks in the subscription. - * - * Get a list of trunked networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 trunked networks in the provided subscription along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List trunked networks in the subscription. - * - * Get a list of trunked networks in the provided subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of trunked networks in the provided subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listSinglePage(top, skipToken), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); - } - - /** - * List trunked networks in the subscription. - * - * Get a list of trunked networks in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 trunked networks in the provided subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Integer top, String skipToken, Context context) { - return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); - } - - /** - * List trunked networks in the resource group. - * - * Get a list of trunked networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 trunked networks in the provided resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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 trunked networks in the resource group. - * - * Get a list of trunked networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 trunked networks in the provided resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, - String skipToken) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List trunked networks in the resource group. - * - * Get a list of trunked networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of trunked networks in the provided resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List trunked networks in the resource group. - * - * Get a list of trunked networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 trunked networks in the provided resource group along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List trunked networks in the resource group. - * - * Get a list of trunked networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 trunked networks in the provided resource group along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List trunked networks in the resource group. - * - * Get a list of trunked networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of trunked networks in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); - } - - /** - * List trunked networks in the resource group. - * - * Get a list of trunked networks in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 trunked networks in the provided resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, - String skipToken, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @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 listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * Retrieve the trunked network. - * * Get properties of the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -620,22 +242,6 @@ public PagedIterable listByResourceGroup(String resourceGro @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String trunkedNetworkName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (trunkedNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter trunkedNetworkName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), @@ -644,8 +250,6 @@ private Mono> getByResourceGroupWithResponseAsync( } /** - * Retrieve the trunked network. - * * Get properties of the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -662,8 +266,6 @@ private Mono getByResourceGroupAsync(String resourceGroupNa } /** - * Retrieve the trunked network. - * * Get properties of the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -677,32 +279,12 @@ private Mono getByResourceGroupAsync(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String trunkedNetworkName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (trunkedNetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter trunkedNetworkName is required and cannot be null.")); - } final String accept = "application/json"; return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, trunkedNetworkName, accept, context); } /** - * Retrieve the trunked network. - * * Get properties of the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -718,8 +300,6 @@ public TrunkedNetworkInner getByResourceGroup(String resourceGroupName, String t } /** - * Create or update the trunked network. - * * Create a new trunked network or update the properties of the existing trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -738,39 +318,16 @@ public TrunkedNetworkInner getByResourceGroup(String resourceGroupName, String t @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String trunkedNetworkName, TrunkedNetworkInner trunkedNetworkParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (trunkedNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter trunkedNetworkName is required and cannot be null.")); - } - if (trunkedNetworkParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter trunkedNetworkParameters is required and cannot be null.")); - } else { - trunkedNetworkParameters.validate(); - } + 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, trunkedNetworkName, ifMatch, ifNoneMatch, - trunkedNetworkParameters, accept, context)) + contentType, accept, trunkedNetworkParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update the trunked network. - * * Create a new trunked network or update the properties of the existing trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -789,40 +346,14 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String trunkedNetworkName, TrunkedNetworkInner trunkedNetworkParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (trunkedNetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter trunkedNetworkName is required and cannot be null.")); - } - if (trunkedNetworkParameters == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter trunkedNetworkParameters is required and cannot be null.")); - } else { - trunkedNetworkParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, - trunkedNetworkParameters, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, contentType, + accept, trunkedNetworkParameters, Context.NONE); } /** - * Create or update the trunked network. - * * Create a new trunked network or update the properties of the existing trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -842,40 +373,14 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String trunkedNetworkName, TrunkedNetworkInner trunkedNetworkParameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (trunkedNetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter trunkedNetworkName is required and cannot be null.")); - } - if (trunkedNetworkParameters == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter trunkedNetworkParameters is required and cannot be null.")); - } else { - trunkedNetworkParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, - trunkedNetworkParameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, contentType, + accept, trunkedNetworkParameters, context); } /** - * Create or update the trunked network. - * * Create a new trunked network or update the properties of the existing trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -902,8 +407,6 @@ private PollerFlux, TrunkedNetworkInner> beginCr } /** - * Create or update the trunked network. - * * Create a new trunked network or update the properties of the existing trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -927,8 +430,6 @@ private PollerFlux, TrunkedNetworkInner> beginCr } /** - * Create or update the trunked network. - * * Create a new trunked network or update the properties of the existing trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -955,8 +456,6 @@ public SyncPoller, TrunkedNetworkInner> beginCre } /** - * Create or update the trunked network. - * * Create a new trunked network or update the properties of the existing trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -980,8 +479,6 @@ public SyncPoller, TrunkedNetworkInner> beginCre } /** - * Create or update the trunked network. - * * Create a new trunked network or update the properties of the existing trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1009,8 +506,6 @@ public SyncPoller, TrunkedNetworkInner> beginCre } /** - * Create or update the trunked network. - * * Create a new trunked network or update the properties of the existing trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1034,8 +529,6 @@ private Mono createOrUpdateAsync(String resourceGroupName, } /** - * Create or update the trunked network. - * * Create a new trunked network or update the properties of the existing trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1057,8 +550,6 @@ private Mono createOrUpdateAsync(String resourceGroupName, } /** - * Create or update the trunked network. - * * Create a new trunked network or update the properties of the existing trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1080,8 +571,6 @@ public TrunkedNetworkInner createOrUpdate(String resourceGroupName, String trunk } /** - * Create or update the trunked network. - * * Create a new trunked network or update the properties of the existing trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1106,8 +595,101 @@ public TrunkedNetworkInner createOrUpdate(String resourceGroupName, String trunk } /** - * Delete the trunked network. + * Update tags associated with the provided trunked network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param trunkedNetworkName The name of the trunked network. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param trunkedNetworkUpdateParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return trunkedNetwork represents a network that utilizes multiple isolation domains and specified VLANs to + * create a trunked network along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, + String trunkedNetworkName, String ifMatch, String ifNoneMatch, + TrunkedNetworkPatchParameters trunkedNetworkUpdateParameters) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, accept, + trunkedNetworkUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update tags associated with the provided trunked network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param trunkedNetworkName The name of the trunked 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 trunkedNetwork represents a network that utilizes multiple isolation domains and specified VLANs to + * create a trunked network on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String trunkedNetworkName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final TrunkedNetworkPatchParameters trunkedNetworkUpdateParameters = null; + return updateWithResponseAsync(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, + trunkedNetworkUpdateParameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update tags associated with the provided trunked network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param trunkedNetworkName The name of the trunked network. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param trunkedNetworkUpdateParameters The request body. + * @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 trunkedNetwork represents a network that utilizes multiple isolation domains and specified VLANs to + * create a trunked network along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String trunkedNetworkName, + String ifMatch, String ifNoneMatch, TrunkedNetworkPatchParameters trunkedNetworkUpdateParameters, + Context context) { + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, accept, + trunkedNetworkUpdateParameters, context); + } + + /** + * Update tags associated with the provided trunked network. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param trunkedNetworkName The name of the trunked 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 trunkedNetwork represents a network that utilizes multiple isolation domains and specified VLANs to + * create a trunked network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TrunkedNetworkInner update(String resourceGroupName, String trunkedNetworkName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final TrunkedNetworkPatchParameters trunkedNetworkUpdateParameters = null; + return updateWithResponse(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, + trunkedNetworkUpdateParameters, Context.NONE).getValue(); + } + + /** * Delete the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1119,39 +701,18 @@ public TrunkedNetworkInner createOrUpdate(String resourceGroupName, String trunk * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String trunkedNetworkName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (trunkedNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter trunkedNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, accept, - context)) + this.client.getSubscriptionId(), resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the trunked network. - * * Delete the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1163,38 +724,16 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String trunkedNetworkName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (trunkedNetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter trunkedNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, accept, - Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, Context.NONE); } /** - * Delete the trunked network. - * * Delete the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1207,38 +746,16 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String trunkedNetworkName, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (trunkedNetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter trunkedNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, accept, - context); + this.client.getSubscriptionId(), resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, context); } /** - * Delete the trunked network. - * * Delete the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1250,21 +767,18 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String trunkedNetworkName, String ifMatch, String ifNoneMatch) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String trunkedNetworkName, + String ifMatch, String ifNoneMatch) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the trunked network. - * * Delete the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1272,23 +786,19 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String trunkedNetworkName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String trunkedNetworkName) { final String ifMatch = null; final String ifNoneMatch = null; Mono>> mono = deleteWithResponseAsync(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the trunked network. - * * Delete the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1300,19 +810,16 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String trunkedNetworkName, String ifMatch, String ifNoneMatch) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String trunkedNetworkName, + String ifMatch, String ifNoneMatch) { Response response = deleteWithResponse(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the trunked network. - * * Delete the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1320,21 +827,17 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String trunkedNetworkName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String trunkedNetworkName) { final String ifMatch = null; final String ifNoneMatch = null; Response response = deleteWithResponse(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the trunked network. - * * Delete the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1347,20 +850,72 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( - String resourceGroupName, String trunkedNetworkName, String ifMatch, String ifNoneMatch, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String trunkedNetworkName, + String ifMatch, String ifNoneMatch, Context context) { Response response = deleteWithResponse(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the provided trunked network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param trunkedNetworkName The name of the trunked network. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 trunkedNetworkName, String ifMatch, + String ifNoneMatch) { + return beginDeleteAsync(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the provided trunked network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param trunkedNetworkName The name of the trunked 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 trunkedNetworkName) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginDeleteAsync(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the trunked network. + * Delete the provided trunked network. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param trunkedNetworkName The name of the trunked 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 trunkedNetworkName) { + final String ifMatch = null; + final String ifNoneMatch = null; + beginDelete(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch).getFinalResult(); + } + + /** * Delete the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1369,285 +924,333 @@ public SyncPoller, OperationStatusResultI * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @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 trunkedNetworkName, String ifMatch, String ifNoneMatch, + Context context) { + beginDelete(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, context).getFinalResult(); + } + + /** + * Get a list of trunked networks in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 trunked networks in the provided resource group along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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 a list of trunked networks in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 trunked networks in the provided resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, + String skipToken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of trunked networks in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of trunked networks in the provided resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of trunked networks in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return a list of trunked networks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String trunkedNetworkName, - String ifMatch, String ifNoneMatch) { - return beginDeleteAsync(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete the trunked network. - * - * Delete the provided trunked network. + * Get a list of trunked networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 on successful completion of {@link Mono}. + * @return a list of trunked networks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String trunkedNetworkName) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginDeleteAsync(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete the trunked network. - * - * Delete the provided trunked network. + * Get a list of trunked networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked 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 current status of an async operation. + * @return a list of trunked networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String trunkedNetworkName) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginDelete(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch).getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Delete the trunked network. - * - * Delete the provided trunked network. + * Get a list of trunked networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of trunked networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String trunkedNetworkName, String ifMatch, - String ifNoneMatch, Context context) { - return beginDelete(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, context).getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, + String skipToken, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Patch the trunked network. - * - * Update tags associated with the provided trunked network. + * Get a list of trunked networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param trunkedNetworkUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return trunkedNetwork represents a network that utilizes multiple isolation domains and specified VLANs to - * create a trunked network along with {@link Response} on successful completion of {@link Mono}. + * @return a list of trunked networks in the provided subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String trunkedNetworkName, String ifMatch, String ifNoneMatch, - TrunkedNetworkPatchParameters trunkedNetworkUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (trunkedNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter trunkedNetworkName is required and cannot be null.")); - } - if (trunkedNetworkUpdateParameters != null) { - trunkedNetworkUpdateParameters.validate(); - } + private Mono> listSinglePageAsync(Integer top, String skipToken) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, - trunkedNetworkUpdateParameters, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, 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())); } /** - * Patch the trunked network. + * Get a list of trunked networks in the provided subscription. * - * Update tags associated with the provided trunked network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 trunked networks in the provided subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Integer top, String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of trunked networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. + * @throws 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 trunked networks in the provided subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of trunked networks in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return trunkedNetwork represents a network that utilizes multiple isolation domains and specified VLANs to - * create a trunked network on successful completion of {@link Mono}. + * @return a list of trunked networks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String trunkedNetworkName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final TrunkedNetworkPatchParameters trunkedNetworkUpdateParameters = null; - return updateWithResponseAsync(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, - trunkedNetworkUpdateParameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listSinglePage(Integer top, String skipToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the trunked network. - * - * Update tags associated with the provided trunked network. + * Get a list of trunked networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param trunkedNetworkUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 trunkedNetwork represents a network that utilizes multiple isolation domains and specified VLANs to - * create a trunked network along with {@link Response}. + * @return a list of trunked networks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String trunkedNetworkName, - String ifMatch, String ifNoneMatch, TrunkedNetworkPatchParameters trunkedNetworkUpdateParameters, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (trunkedNetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter trunkedNetworkName is required and cannot be null.")); - } - if (trunkedNetworkUpdateParameters != null) { - trunkedNetworkUpdateParameters.validate(); - } + private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, - trunkedNetworkUpdateParameters, accept, context); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the trunked network. + * Get a list of trunked networks in the provided subscription. * - * Update tags associated with the provided trunked network. + * @throws 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 trunked networks in the provided subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listSinglePage(top, skipToken), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * Get a list of trunked networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 trunkedNetwork represents a network that utilizes multiple isolation domains and specified VLANs to - * create a trunked network. + * @return a list of trunked networks in the provided subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TrunkedNetworkInner update(String resourceGroupName, String trunkedNetworkName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final TrunkedNetworkPatchParameters trunkedNetworkUpdateParameters = null; - return updateWithResponse(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, - trunkedNetworkUpdateParameters, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Integer top, String skipToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * List trunked networks in the subscription. - * * 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 trunked networks in the provided subscription along with {@link PagedResponse} on successful + * @return a list of trunked networks in the provided resource group along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); } /** - * List trunked networks in the subscription. - * * 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 trunked networks in the provided subscription along with {@link PagedResponse}. + * @return a list of trunked networks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = 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); } /** - * List trunked networks in the subscription. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1655,88 +1258,57 @@ private PagedResponse listBySubscriptionNextSinglePage(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 trunked networks in the provided subscription along with {@link PagedResponse}. + * @return a list of trunked networks in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List trunked networks in the resource group. - * * 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 trunked networks in the provided resource group along with {@link PagedResponse} on successful + * @return a list of trunked networks in the provided subscription along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(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())); } /** - * List trunked networks in the resource group. - * * 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 trunked networks in the provided resource group along with {@link PagedResponse}. + * @return a list of trunked networks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List trunked networks in the resource group. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1744,25 +1316,14 @@ private PagedResponse listByResourceGroupNextSinglePage(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of trunked networks in the provided resource group along with {@link PagedResponse}. + * @return a list of trunked networks in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(TrunkedNetworksClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/TrunkedNetworksImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/TrunkedNetworksImpl.java index ddeb3d763bcf..ec6a93d36a82 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/TrunkedNetworksImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/TrunkedNetworksImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -10,9 +10,7 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.TrunkedNetworksClient; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.fluent.models.TrunkedNetworkInner; -import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; import com.azure.resourcemanager.networkcloud.models.TrunkedNetwork; import com.azure.resourcemanager.networkcloud.models.TrunkedNetworks; @@ -29,14 +27,30 @@ public TrunkedNetworksImpl(TrunkedNetworksClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new TrunkedNetworkImpl(inner1, this.manager())); + public Response getByResourceGroupWithResponse(String resourceGroupName, String trunkedNetworkName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, trunkedNetworkName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new TrunkedNetworkImpl(inner.getValue(), this.manager())); } - public PagedIterable list(Integer top, String skipToken, Context context) { - PagedIterable inner = this.serviceClient().list(top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new TrunkedNetworkImpl(inner1, this.manager())); + public TrunkedNetwork getByResourceGroup(String resourceGroupName, String trunkedNetworkName) { + TrunkedNetworkInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, trunkedNetworkName); + if (inner != null) { + return new TrunkedNetworkImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String trunkedNetworkName) { + this.serviceClient().delete(resourceGroupName, trunkedNetworkName); + } + + public void delete(String resourceGroupName, String trunkedNetworkName, String ifMatch, String ifNoneMatch, + Context context) { + this.serviceClient().delete(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, context); } public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -51,45 +65,14 @@ public PagedIterable listByResourceGroup(String resourceGroupNam return ResourceManagerUtils.mapPage(inner, inner1 -> new TrunkedNetworkImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse(String resourceGroupName, String trunkedNetworkName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, trunkedNetworkName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new TrunkedNetworkImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public TrunkedNetwork getByResourceGroup(String resourceGroupName, String trunkedNetworkName) { - TrunkedNetworkInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, trunkedNetworkName); - if (inner != null) { - return new TrunkedNetworkImpl(inner, this.manager()); - } else { - return null; - } - } - - public OperationStatusResult deleteByResourceGroup(String resourceGroupName, String trunkedNetworkName) { - OperationStatusResultInner inner = this.serviceClient().delete(resourceGroupName, trunkedNetworkName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TrunkedNetworkImpl(inner1, this.manager())); } - public OperationStatusResult delete(String resourceGroupName, String trunkedNetworkName, String ifMatch, - String ifNoneMatch, Context context) { - OperationStatusResultInner inner - = this.serviceClient().delete(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(Integer top, String skipToken, Context context) { + PagedIterable inner = this.serviceClient().list(top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TrunkedNetworkImpl(inner1, this.manager())); } public TrunkedNetwork getById(String id) { @@ -120,7 +103,7 @@ public Response getByIdWithResponse(String id, Context context) return this.getByResourceGroupWithResponse(resourceGroupName, trunkedNetworkName, context); } - public OperationStatusResult deleteById(String id) { + public void deleteById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -133,11 +116,10 @@ public OperationStatusResult deleteById(String id) { } String localIfMatch = null; String localIfNoneMatch = null; - return this.delete(resourceGroupName, trunkedNetworkName, localIfMatch, localIfNoneMatch, Context.NONE); + this.delete(resourceGroupName, trunkedNetworkName, localIfMatch, localIfNoneMatch, Context.NONE); } - public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, - Context context) { + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -148,7 +130,7 @@ public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'trunkedNetworks'.", id))); } - return this.delete(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, context); + this.delete(resourceGroupName, trunkedNetworkName, ifMatch, ifNoneMatch, context); } private TrunkedNetworksClient serviceClient() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VirtualMachineImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VirtualMachineImpl.java index 69b88440bb12..c42b647b034e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VirtualMachineImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VirtualMachineImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -81,14 +81,6 @@ public String adminUsername() { return this.innerModel().adminUsername(); } - public String availabilityZone() { - return this.innerModel().availabilityZone(); - } - - public String bareMetalMachineId() { - return this.innerModel().bareMetalMachineId(); - } - public VirtualMachineBootMethod bootMethod() { return this.innerModel().bootMethod(); } @@ -97,26 +89,10 @@ public NetworkAttachment cloudServicesNetworkAttachment() { return this.innerModel().cloudServicesNetworkAttachment(); } - public String clusterId() { - return this.innerModel().clusterId(); - } - - public ExtendedLocation consoleExtendedLocation() { - return this.innerModel().consoleExtendedLocation(); - } - public long cpuCores() { return this.innerModel().cpuCores(); } - public VirtualMachineDetailedStatus detailedStatus() { - return this.innerModel().detailedStatus(); - } - - public String detailedStatusMessage() { - return this.innerModel().detailedStatusMessage(); - } - public VirtualMachineIsolateEmulatorThread isolateEmulatorThread() { return this.innerModel().isolateEmulatorThread(); } @@ -151,14 +127,6 @@ public List placementHints() { } } - public VirtualMachinePowerState powerState() { - return this.innerModel().powerState(); - } - - public VirtualMachineProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - public List sshPublicKeys() { List inner = this.innerModel().sshPublicKeys(); if (inner != null) { @@ -196,6 +164,34 @@ public ImageRepositoryCredentials vmImageRepositoryCredentials() { return this.innerModel().vmImageRepositoryCredentials(); } + public String availabilityZone() { + return this.innerModel().availabilityZone(); + } + + public String bareMetalMachineId() { + return this.innerModel().bareMetalMachineId(); + } + + public String clusterId() { + return this.innerModel().clusterId(); + } + + public ExtendedLocation consoleExtendedLocation() { + return this.innerModel().consoleExtendedLocation(); + } + + public VirtualMachineDetailedStatus detailedStatus() { + return this.innerModel().detailedStatus(); + } + + public String detailedStatusMessage() { + return this.innerModel().detailedStatusMessage(); + } + + public VirtualMachinePowerState powerState() { + return this.innerModel().powerState(); + } + public List volumes() { List inner = this.innerModel().volumes(); if (inner != null) { @@ -205,6 +201,10 @@ public List volumes() { } } + public VirtualMachineProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -429,11 +429,6 @@ public VirtualMachineImpl withBootMethod(VirtualMachineBootMethod bootMethod) { return this; } - public VirtualMachineImpl withConsoleExtendedLocation(ExtendedLocation consoleExtendedLocation) { - this.innerModel().withConsoleExtendedLocation(consoleExtendedLocation); - return this; - } - public VirtualMachineImpl withIsolateEmulatorThread(VirtualMachineIsolateEmulatorThread isolateEmulatorThread) { this.innerModel().withIsolateEmulatorThread(isolateEmulatorThread); return this; @@ -495,6 +490,11 @@ public VirtualMachineImpl withVmDeviceModel(VirtualMachineDeviceModelType vmDevi } } + public VirtualMachineImpl withConsoleExtendedLocation(ExtendedLocation consoleExtendedLocation) { + this.innerModel().withConsoleExtendedLocation(consoleExtendedLocation); + return this; + } + public VirtualMachineImpl withIfMatch(String ifMatch) { if (isInCreateMode()) { this.createIfMatch = ifMatch; diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VirtualMachinesClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VirtualMachinesClientImpl.java index fb002e52fafb..ddc2275ad382 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VirtualMachinesClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VirtualMachinesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -32,14 +32,13 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.fluent.models.VirtualMachineInner; +import com.azure.resourcemanager.networkcloud.implementation.models.VirtualMachineList; +import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; import com.azure.resourcemanager.networkcloud.models.VirtualMachineAssignRelayParameters; -import com.azure.resourcemanager.networkcloud.models.VirtualMachineList; import com.azure.resourcemanager.networkcloud.models.VirtualMachinePatchParameters; import com.azure.resourcemanager.networkcloud.models.VirtualMachinePowerOffParameters; import java.nio.ByteBuffer; @@ -58,67 +57,31 @@ public final class VirtualMachinesClientImpl implements VirtualMachinesClient { /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of VirtualMachinesClientImpl. * * @param client the instance of the service client containing this operation class. */ - VirtualMachinesClientImpl(NetworkCloudImpl client) { + VirtualMachinesClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(VirtualMachinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudVirtualMachines to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for NetworkCloudManagementClientVirtualMachines to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudVirtualMachines") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientVirtualMachines") public interface VirtualMachinesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/virtualMachines") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/virtualMachines") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @HeaderParam("Accept") String accept, @@ -128,714 +91,618 @@ Mono> getByResourceGroup(@HostParam("$host") Strin @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") VirtualMachineInner virtualMachineParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") VirtualMachineInner virtualMachineParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") VirtualMachineInner virtualMachineParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") VirtualMachineInner virtualMachineParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") VirtualMachinePatchParameters virtualMachineUpdateParameters, + Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Accept") String accept, + @BodyParam("application/json") VirtualMachinePatchParameters virtualMachineUpdateParameters, + Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") VirtualMachinePatchParameters virtualMachineUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") VirtualMachinePatchParameters virtualMachineUpdateParameters, + @HeaderParam("If-None-Match") String ifNoneMatch, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/virtualMachines") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/virtualMachines") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/assignRelay") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> assignRelay(@HostParam("$host") String endpoint, + Mono>> assignRelay(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @BodyParam("application/json") VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/assignRelay") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response assignRelaySync(@HostParam("$host") String endpoint, + Response assignRelaySync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @BodyParam("application/json") VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/powerOff") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> powerOff(@HostParam("$host") String endpoint, + Mono>> powerOff(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @BodyParam("application/json") VirtualMachinePowerOffParameters virtualMachinePowerOffParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/powerOff") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response powerOffSync(@HostParam("$host") String endpoint, + Response powerOffSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineName") String virtualMachineName, @BodyParam("application/json") VirtualMachinePowerOffParameters virtualMachinePowerOffParameters, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/reimage") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> reimage(@HostParam("$host") String endpoint, + Mono>> reimage(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualMachineName") String virtualMachineName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("virtualMachineName") String virtualMachineName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/reimage") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response reimageSync(@HostParam("$host") String endpoint, + Response reimageSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualMachineName") String virtualMachineName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("virtualMachineName") String virtualMachineName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/restart") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restart(@HostParam("$host") String endpoint, + Mono>> restart(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualMachineName") String virtualMachineName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("virtualMachineName") String virtualMachineName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/restart") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response restartSync(@HostParam("$host") String endpoint, + Response restartSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualMachineName") String virtualMachineName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("virtualMachineName") String virtualMachineName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/start") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start(@HostParam("$host") String endpoint, + Mono>> start(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualMachineName") String virtualMachineName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("virtualMachineName") String virtualMachineName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/start") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response startSync(@HostParam("$host") String endpoint, + Response startSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualMachineName") String virtualMachineName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("virtualMachineName") String virtualMachineName, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + 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 listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + 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> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listBySubscriptionNext( + @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("$host") String endpoint, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List virtual machines in the subscription. - * - * Get a list of virtual machines in the provided subscription. + * Get properties of the provided virtual machine. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machines in the provided subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return properties of the provided virtual machine along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String virtualMachineName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List virtual machines in the subscription. - * - * Get a list of virtual machines in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 virtual machines in the provided subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer top, String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List virtual machines in the subscription. - * - * Get a list of virtual machines in the provided subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of virtual machines in the provided subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List virtual machines in the subscription. - * - * Get a list of virtual machines in the provided subscription. + * Get properties of the provided virtual machine. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machines in the provided subscription along with {@link PagedResponse}. + * @return properties of the provided virtual machine on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + private Mono getByResourceGroupAsync(String resourceGroupName, String virtualMachineName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, virtualMachineName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List virtual machines in the subscription. - * - * Get a list of virtual machines in the provided subscription. + * Get properties of the provided virtual machine. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. * @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 virtual machines in the provided subscription along with {@link PagedResponse}. + * @return properties of the provided virtual machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + public Response getByResourceGroupWithResponse(String resourceGroupName, + String virtualMachineName, Context context) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, accept, context); } /** - * List virtual machines in the subscription. - * - * Get a list of virtual machines in the provided subscription. + * Get properties of the provided virtual machine. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machines in the provided subscription as paginated response with {@link PagedIterable}. + * @return properties of the provided virtual machine. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listSinglePage(top, skipToken), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualMachineInner getByResourceGroup(String resourceGroupName, String virtualMachineName) { + return getByResourceGroupWithResponse(resourceGroupName, virtualMachineName, Context.NONE).getValue(); } /** - * List virtual machines in the subscription. - * - * Get a list of virtual machines in the provided subscription. + * Create a new virtual machine or update the properties of the existing virtual machine. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. + * @param virtualMachineParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machines in the provided subscription as paginated response with {@link PagedIterable}. + * @return virtualMachine represents the on-premises Network Cloud virtual machine along with {@link Response} on + * successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Integer top, String skipToken, Context context) { - return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String virtualMachineName, VirtualMachineInner virtualMachineParameters, String ifMatch, String ifNoneMatch) { + 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, virtualMachineName, ifMatch, ifNoneMatch, + contentType, accept, virtualMachineParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List virtual machines in the resource group. - * - * Get a list of virtual machines in the provided resource group. + * Create a new virtual machine or update the properties of the existing virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param virtualMachineName The name of the virtual machine. + * @param virtualMachineParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machines in the provided resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return virtualMachine represents the on-premises Network Cloud virtual machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String virtualMachineName, + VirtualMachineInner virtualMachineParameters, String ifMatch, String ifNoneMatch) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, contentType, + accept, virtualMachineParameters, Context.NONE); } /** - * List virtual machines in the resource group. - * - * Get a list of virtual machines in the provided resource group. + * Create a new virtual machine or update the properties of the existing virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param virtualMachineName The name of the virtual machine. + * @param virtualMachineParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 virtual machines in the provided resource group as paginated response with {@link PagedFlux}. + * @return virtualMachine represents the on-premises Network Cloud virtual machine along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, - String skipToken) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String virtualMachineName, + VirtualMachineInner virtualMachineParameters, String ifMatch, String ifNoneMatch, 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, virtualMachineName, ifMatch, ifNoneMatch, contentType, + accept, virtualMachineParameters, context); } /** - * List virtual machines in the resource group. - * - * Get a list of virtual machines in the provided resource group. + * Create a new virtual machine or update the properties of the existing virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. + * @param virtualMachineParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machines in the provided resource group as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of virtualMachine represents the on-premises Network Cloud virtual + * machine. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VirtualMachineInner> beginCreateOrUpdateAsync( + String resourceGroupName, String virtualMachineName, VirtualMachineInner virtualMachineParameters, + String ifMatch, String ifNoneMatch) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, virtualMachineName, + virtualMachineParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VirtualMachineInner.class, VirtualMachineInner.class, this.client.getContext()); } /** - * List virtual machines in the resource group. - * - * Get a list of virtual machines in the provided resource group. + * Create a new virtual machine or update the properties of the existing virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param virtualMachineName The name of the virtual machine. + * @param virtualMachineParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machines in the provided resource group along with {@link PagedResponse}. + * @return the {@link PollerFlux} for polling of virtualMachine represents the on-premises Network Cloud virtual + * machine. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VirtualMachineInner> beginCreateOrUpdateAsync( + String resourceGroupName, String virtualMachineName, VirtualMachineInner virtualMachineParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, virtualMachineName, + virtualMachineParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VirtualMachineInner.class, VirtualMachineInner.class, this.client.getContext()); } /** - * List virtual machines in the resource group. - * - * Get a list of virtual machines in the provided resource group. + * Create a new virtual machine or update the properties of the existing virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param virtualMachineName The name of the virtual machine. + * @param virtualMachineParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machines in the provided resource group along with {@link PagedResponse}. + * @return the {@link SyncPoller} for polling of virtualMachine represents the on-premises Network Cloud virtual + * machine. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VirtualMachineInner> beginCreateOrUpdate( + String resourceGroupName, String virtualMachineName, VirtualMachineInner virtualMachineParameters, + String ifMatch, String ifNoneMatch) { + Response response = createOrUpdateWithResponse(resourceGroupName, virtualMachineName, + virtualMachineParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, VirtualMachineInner.class, + VirtualMachineInner.class, Context.NONE); } /** - * List virtual machines in the resource group. - * - * Get a list of virtual machines in the provided resource group. + * Create a new virtual machine or update the properties of the existing virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. + * @param virtualMachineParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machines in the provided resource group as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of virtualMachine represents the on-premises Network Cloud virtual + * machine. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VirtualMachineInner> beginCreateOrUpdate( + String resourceGroupName, String virtualMachineName, VirtualMachineInner virtualMachineParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Response response = createOrUpdateWithResponse(resourceGroupName, virtualMachineName, + virtualMachineParameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(response, VirtualMachineInner.class, + VirtualMachineInner.class, Context.NONE); } /** - * List virtual machines in the resource group. - * - * Get a list of virtual machines in the provided resource group. + * Create a new virtual machine or update the properties of the existing virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param virtualMachineName The name of the virtual machine. + * @param virtualMachineParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 virtual machines in the provided resource group as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of virtualMachine represents the on-premises Network Cloud virtual + * machine. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, - String skipToken, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VirtualMachineInner> beginCreateOrUpdate( + String resourceGroupName, String virtualMachineName, VirtualMachineInner virtualMachineParameters, + String ifMatch, String ifNoneMatch, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, virtualMachineName, + virtualMachineParameters, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, VirtualMachineInner.class, + VirtualMachineInner.class, context); } /** - * Retrieve the virtual machine. - * - * Get properties of the provided virtual machine. + * Create a new virtual machine or update the properties of the existing virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. + * @param virtualMachineParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided virtual machine along with {@link Response} on successful completion of + * @return virtualMachine represents the on-premises Network Cloud virtual machine on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String virtualMachineName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono createOrUpdateAsync(String resourceGroupName, String virtualMachineName, + VirtualMachineInner virtualMachineParameters, String ifMatch, String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, virtualMachineName, virtualMachineParameters, ifMatch, + ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieve the virtual machine. - * - * Get properties of the provided virtual machine. + * Create a new virtual machine or update the properties of the existing virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. + * @param virtualMachineParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided virtual machine on successful completion of {@link Mono}. + * @return virtualMachine represents the on-premises Network Cloud virtual machine on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String virtualMachineName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, virtualMachineName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, String virtualMachineName, + VirtualMachineInner virtualMachineParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdateAsync(resourceGroupName, virtualMachineName, virtualMachineParameters, ifMatch, + ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieve the virtual machine. - * - * Get properties of the provided virtual machine. + * Create a new virtual machine or update the properties of the existing virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. - * @param context The context to associate with this operation. + * @param virtualMachineParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided virtual machine along with {@link Response}. + * @return virtualMachine represents the on-premises Network Cloud virtual machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String virtualMachineName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, accept, context); + public VirtualMachineInner createOrUpdate(String resourceGroupName, String virtualMachineName, + VirtualMachineInner virtualMachineParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdate(resourceGroupName, virtualMachineName, virtualMachineParameters, ifMatch, + ifNoneMatch).getFinalResult(); } /** - * Retrieve the virtual machine. - * - * Get properties of the provided virtual machine. + * Create a new virtual machine or update the properties of the existing virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. + * @param virtualMachineParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 properties of the provided virtual machine. + * @return virtualMachine represents the on-premises Network Cloud virtual machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineInner getByResourceGroup(String resourceGroupName, String virtualMachineName) { - return getByResourceGroupWithResponse(resourceGroupName, virtualMachineName, Context.NONE).getValue(); + public VirtualMachineInner createOrUpdate(String resourceGroupName, String virtualMachineName, + VirtualMachineInner virtualMachineParameters, String ifMatch, String ifNoneMatch, Context context) { + return beginCreateOrUpdate(resourceGroupName, virtualMachineName, virtualMachineParameters, ifMatch, + ifNoneMatch, context).getFinalResult(); } /** - * Create or update the virtual machine. - * - * Create a new virtual machine or update the properties of the existing virtual machine. + * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. - * @param virtualMachineParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param virtualMachineUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -843,101 +710,53 @@ public VirtualMachineInner getByResourceGroup(String resourceGroupName, String v * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String virtualMachineName, VirtualMachineInner virtualMachineParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (virtualMachineParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter virtualMachineParameters is required and cannot be null.")); - } else { - virtualMachineParameters.validate(); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, + String virtualMachineName, String ifMatch, String ifNoneMatch, + VirtualMachinePatchParameters virtualMachineUpdateParameters) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, - virtualMachineParameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, accept, + virtualMachineUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update the virtual machine. - * - * Create a new virtual machine or update the properties of the existing virtual machine. + * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. - * @param virtualMachineParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param virtualMachineUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return virtualMachine represents the on-premises Network Cloud virtual machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String virtualMachineName, - VirtualMachineInner virtualMachineParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (virtualMachineParameters == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter virtualMachineParameters is required and cannot be null.")); - } else { - virtualMachineParameters.validate(); - } + private Response updateWithResponse(String resourceGroupName, String virtualMachineName, String ifMatch, + String ifNoneMatch, VirtualMachinePatchParameters virtualMachineUpdateParameters) { final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, - virtualMachineParameters, accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, accept, + virtualMachineUpdateParameters, Context.NONE); } /** - * Create or update the virtual machine. - * - * Create a new virtual machine or update the properties of the existing virtual machine. + * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. - * @param virtualMachineParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param virtualMachineUpdateParameters The request body. * @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. @@ -945,51 +764,25 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @return virtualMachine represents the on-premises Network Cloud virtual machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String virtualMachineName, - VirtualMachineInner virtualMachineParameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (virtualMachineParameters == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter virtualMachineParameters is required and cannot be null.")); - } else { - virtualMachineParameters.validate(); - } + private Response updateWithResponse(String resourceGroupName, String virtualMachineName, String ifMatch, + String ifNoneMatch, VirtualMachinePatchParameters virtualMachineUpdateParameters, Context context) { final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, - virtualMachineParameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, accept, + virtualMachineUpdateParameters, context); } /** - * Create or update the virtual machine. - * - * Create a new virtual machine or update the properties of the existing virtual machine. + * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. - * @param virtualMachineParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param virtualMachineUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -997,23 +790,21 @@ private Response createOrUpdateWithResponse(String resourceGroupName * machine. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualMachineInner> beginCreateOrUpdateAsync( - String resourceGroupName, String virtualMachineName, VirtualMachineInner virtualMachineParameters, - String ifMatch, String ifNoneMatch) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, virtualMachineName, - virtualMachineParameters, ifMatch, ifNoneMatch); + private PollerFlux, VirtualMachineInner> beginUpdateAsync(String resourceGroupName, + String virtualMachineName, String ifMatch, String ifNoneMatch, + VirtualMachinePatchParameters virtualMachineUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, virtualMachineName, ifMatch, + ifNoneMatch, virtualMachineUpdateParameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), VirtualMachineInner.class, VirtualMachineInner.class, this.client.getContext()); } /** - * Create or update the virtual machine. - * - * Create a new virtual machine or update the properties of the existing virtual machine. + * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. - * @param virtualMachineParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1021,28 +812,28 @@ private PollerFlux, VirtualMachineInner> beginCr * machine. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualMachineInner> beginCreateOrUpdateAsync( - String resourceGroupName, String virtualMachineName, VirtualMachineInner virtualMachineParameters) { + private PollerFlux, VirtualMachineInner> beginUpdateAsync(String resourceGroupName, + String virtualMachineName) { final String ifMatch = null; final String ifNoneMatch = null; - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, virtualMachineName, - virtualMachineParameters, ifMatch, ifNoneMatch); + final VirtualMachinePatchParameters virtualMachineUpdateParameters = null; + Mono>> mono = updateWithResponseAsync(resourceGroupName, virtualMachineName, ifMatch, + ifNoneMatch, virtualMachineUpdateParameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), VirtualMachineInner.class, VirtualMachineInner.class, this.client.getContext()); } /** - * Create or update the virtual machine. - * - * Create a new virtual machine or update the properties of the existing virtual machine. + * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. - * @param virtualMachineParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param virtualMachineUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1050,23 +841,21 @@ private PollerFlux, VirtualMachineInner> beginCr * machine. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineInner> beginCreateOrUpdate( - String resourceGroupName, String virtualMachineName, VirtualMachineInner virtualMachineParameters, - String ifMatch, String ifNoneMatch) { - Response response = createOrUpdateWithResponse(resourceGroupName, virtualMachineName, - virtualMachineParameters, ifMatch, ifNoneMatch); + public SyncPoller, VirtualMachineInner> beginUpdate(String resourceGroupName, + String virtualMachineName, String ifMatch, String ifNoneMatch, + VirtualMachinePatchParameters virtualMachineUpdateParameters) { + Response response = updateWithResponse(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, + virtualMachineUpdateParameters); return this.client.getLroResult(response, VirtualMachineInner.class, VirtualMachineInner.class, Context.NONE); } /** - * Create or update the virtual machine. - * - * Create a new virtual machine or update the properties of the existing virtual machine. + * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. - * @param virtualMachineParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1074,28 +863,28 @@ public SyncPoller, VirtualMachineInner> beginCre * machine. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineInner> beginCreateOrUpdate( - String resourceGroupName, String virtualMachineName, VirtualMachineInner virtualMachineParameters) { + public SyncPoller, VirtualMachineInner> beginUpdate(String resourceGroupName, + String virtualMachineName) { final String ifMatch = null; final String ifNoneMatch = null; - Response response = createOrUpdateWithResponse(resourceGroupName, virtualMachineName, - virtualMachineParameters, ifMatch, ifNoneMatch); + final VirtualMachinePatchParameters virtualMachineUpdateParameters = null; + Response response = updateWithResponse(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, + virtualMachineUpdateParameters); return this.client.getLroResult(response, VirtualMachineInner.class, VirtualMachineInner.class, Context.NONE); } /** - * Create or update the virtual machine. - * - * Create a new virtual machine or update the properties of the existing virtual machine. + * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. - * @param virtualMachineParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param virtualMachineUpdateParameters The request body. * @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. @@ -1104,27 +893,26 @@ public SyncPoller, VirtualMachineInner> beginCre * machine. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineInner> beginCreateOrUpdate( - String resourceGroupName, String virtualMachineName, VirtualMachineInner virtualMachineParameters, - String ifMatch, String ifNoneMatch, Context context) { - Response response = createOrUpdateWithResponse(resourceGroupName, virtualMachineName, - virtualMachineParameters, ifMatch, ifNoneMatch, context); + public SyncPoller, VirtualMachineInner> beginUpdate(String resourceGroupName, + String virtualMachineName, String ifMatch, String ifNoneMatch, + VirtualMachinePatchParameters virtualMachineUpdateParameters, Context context) { + Response response = updateWithResponse(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, + virtualMachineUpdateParameters, context); return this.client.getLroResult(response, VirtualMachineInner.class, VirtualMachineInner.class, context); } /** - * Create or update the virtual machine. - * - * Create a new virtual machine or update the properties of the existing virtual machine. + * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. - * @param virtualMachineParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param virtualMachineUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1132,20 +920,18 @@ public SyncPoller, VirtualMachineInner> beginCre * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String virtualMachineName, - VirtualMachineInner virtualMachineParameters, String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, virtualMachineName, virtualMachineParameters, ifMatch, - ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String virtualMachineName, String ifMatch, + String ifNoneMatch, VirtualMachinePatchParameters virtualMachineUpdateParameters) { + return beginUpdateAsync(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, + virtualMachineUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update the virtual machine. - * - * Create a new virtual machine or update the properties of the existing virtual machine. + * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. - * @param virtualMachineParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1153,48 +939,45 @@ private Mono createOrUpdateAsync(String resourceGroupName, * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String virtualMachineName, - VirtualMachineInner virtualMachineParameters) { + private Mono updateAsync(String resourceGroupName, String virtualMachineName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, virtualMachineName, virtualMachineParameters, ifMatch, - ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + final VirtualMachinePatchParameters virtualMachineUpdateParameters = null; + return beginUpdateAsync(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, + virtualMachineUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update the virtual machine. - * - * Create a new virtual machine or update the properties of the existing virtual machine. + * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. - * @param virtualMachineParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return virtualMachine represents the on-premises Network Cloud virtual machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineInner createOrUpdate(String resourceGroupName, String virtualMachineName, - VirtualMachineInner virtualMachineParameters) { + public VirtualMachineInner update(String resourceGroupName, String virtualMachineName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateOrUpdate(resourceGroupName, virtualMachineName, virtualMachineParameters, ifMatch, - ifNoneMatch).getFinalResult(); + final VirtualMachinePatchParameters virtualMachineUpdateParameters = null; + return beginUpdate(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, virtualMachineUpdateParameters) + .getFinalResult(); } /** - * Create or update the virtual machine. - * - * Create a new virtual machine or update the properties of the existing virtual machine. + * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. + * Properties and tag updates can be done independently. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. - * @param virtualMachineParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param virtualMachineUpdateParameters The request body. * @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. @@ -1202,15 +985,13 @@ public VirtualMachineInner createOrUpdate(String resourceGroupName, String virtu * @return virtualMachine represents the on-premises Network Cloud virtual machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineInner createOrUpdate(String resourceGroupName, String virtualMachineName, - VirtualMachineInner virtualMachineParameters, String ifMatch, String ifNoneMatch, Context context) { - return beginCreateOrUpdate(resourceGroupName, virtualMachineName, virtualMachineParameters, ifMatch, - ifNoneMatch, context).getFinalResult(); + public VirtualMachineInner update(String resourceGroupName, String virtualMachineName, String ifMatch, + String ifNoneMatch, VirtualMachinePatchParameters virtualMachineUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, virtualMachineUpdateParameters, + context).getFinalResult(); } /** - * Delete the virtual machine. - * * Delete the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1222,39 +1003,18 @@ public VirtualMachineInner createOrUpdate(String resourceGroupName, String virtu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String virtualMachineName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, accept, - context)) + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the virtual machine. - * * Delete the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1266,38 +1026,16 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String virtualMachineName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, accept, - Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, Context.NONE); } /** - * Delete the virtual machine. - * * Delete the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1310,38 +1048,16 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String virtualMachineName, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, accept, - context); + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, context); } /** - * Delete the virtual machine. - * * Delete the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1353,21 +1069,18 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String virtualMachineName, String ifMatch, String ifNoneMatch) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String virtualMachineName, + String ifMatch, String ifNoneMatch) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the virtual machine. - * * Delete the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1375,23 +1088,19 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String virtualMachineName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String virtualMachineName) { final String ifMatch = null; final String ifNoneMatch = null; Mono>> mono = deleteWithResponseAsync(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the virtual machine. - * * Delete the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1403,19 +1112,16 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String virtualMachineName, String ifMatch, String ifNoneMatch) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualMachineName, + String ifMatch, String ifNoneMatch) { Response response = deleteWithResponse(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the virtual machine. - * * Delete the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1423,21 +1129,17 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String virtualMachineName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualMachineName) { final String ifMatch = null; final String ifNoneMatch = null; Response response = deleteWithResponse(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the virtual machine. - * * Delete the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1450,20 +1152,17 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginDelete( - String resourceGroupName, String virtualMachineName, String ifMatch, String ifNoneMatch, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualMachineName, + String ifMatch, String ifNoneMatch, Context context) { Response response = deleteWithResponse(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Delete the virtual machine. - * * Delete the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1475,18 +1174,16 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String virtualMachineName, - String ifMatch, String ifNoneMatch) { + private Mono deleteAsync(String resourceGroupName, String virtualMachineName, String ifMatch, + String ifNoneMatch) { return beginDeleteAsync(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the virtual machine. - * * Delete the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1494,10 +1191,10 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String virtualMachineName) { + private Mono deleteAsync(String resourceGroupName, String virtualMachineName) { final String ifMatch = null; final String ifNoneMatch = null; return beginDeleteAsync(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch).last() @@ -1505,8 +1202,6 @@ private Mono deleteAsync(String resourceGroupName, S } /** - * Delete the virtual machine. - * * Delete the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1514,18 +1209,15 @@ private Mono deleteAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String virtualMachineName) { + public void delete(String resourceGroupName, String virtualMachineName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginDelete(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch).getFinalResult(); + beginDelete(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch).getFinalResult(); } /** - * Delete the virtual machine. - * * Delete the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1538,401 +1230,290 @@ public OperationStatusResultInner delete(String resourceGroupName, String virtua * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 delete(String resourceGroupName, String virtualMachineName, String ifMatch, - String ifNoneMatch, Context context) { - return beginDelete(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, context).getFinalResult(); + public void delete(String resourceGroupName, String virtualMachineName, String ifMatch, String ifNoneMatch, + Context context) { + beginDelete(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, context).getFinalResult(); } /** - * Patch the virtual machine. - * - * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. - * Properties and tag updates can be done independently. + * Get a list of virtual machines in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param virtualMachineUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtualMachine represents the on-premises Network Cloud virtual machine along with {@link Response} on - * successful completion of {@link Mono}. + * @return a list of virtual machines in the provided resource group along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String virtualMachineName, String ifMatch, String ifNoneMatch, - VirtualMachinePatchParameters virtualMachineUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (virtualMachineUpdateParameters != null) { - virtualMachineUpdateParameters.validate(); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Integer top, String skipToken) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, - virtualMachineUpdateParameters, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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())); } /** - * Patch the virtual machine. - * - * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. - * Properties and tag updates can be done independently. + * Get a list of virtual machines in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param virtualMachineUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtualMachine represents the on-premises Network Cloud virtual machine along with {@link Response}. + * @return a list of virtual machines in the provided resource group as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String virtualMachineName, String ifMatch, - String ifNoneMatch, VirtualMachinePatchParameters virtualMachineUpdateParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (virtualMachineUpdateParameters != null) { - virtualMachineUpdateParameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, - virtualMachineUpdateParameters, accept, Context.NONE); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, + String skipToken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Patch the virtual machine. + * Get a list of virtual machines in the provided resource group. * - * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. - * Properties and tag updates can be done independently. + * @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 a list of virtual machines in the provided resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of virtual machines in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param virtualMachineUpdateParameters The request body. - * @param context The context to associate with this operation. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtualMachine represents the on-premises Network Cloud virtual machine along with {@link Response}. + * @return a list of virtual machines in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String virtualMachineName, String ifMatch, - String ifNoneMatch, VirtualMachinePatchParameters virtualMachineUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (virtualMachineUpdateParameters != null) { - virtualMachineUpdateParameters.validate(); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken) { final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, - virtualMachineUpdateParameters, accept, context); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the virtual machine. - * - * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. - * Properties and tag updates can be done independently. + * Get a list of virtual machines in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param virtualMachineUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of virtualMachine represents the on-premises Network Cloud virtual - * machine. + * @return a list of virtual machines in the provided resource group along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualMachineInner> beginUpdateAsync(String resourceGroupName, - String virtualMachineName, String ifMatch, String ifNoneMatch, - VirtualMachinePatchParameters virtualMachineUpdateParameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, virtualMachineName, ifMatch, - ifNoneMatch, virtualMachineUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VirtualMachineInner.class, VirtualMachineInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the virtual machine. - * - * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. - * Properties and tag updates can be done independently. + * Get a list of virtual machines in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtualMachine represents the on-premises Network Cloud virtual - * machine. + * @return a list of virtual machines in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualMachineInner> beginUpdateAsync(String resourceGroupName, - String virtualMachineName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final VirtualMachinePatchParameters virtualMachineUpdateParameters = null; - Mono>> mono = updateWithResponseAsync(resourceGroupName, virtualMachineName, ifMatch, - ifNoneMatch, virtualMachineUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VirtualMachineInner.class, VirtualMachineInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Patch the virtual machine. - * - * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. - * Properties and tag updates can be done independently. + * Get a list of virtual machines in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param virtualMachineUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 virtualMachine represents the on-premises Network Cloud virtual - * machine. + * @return a list of virtual machines in the provided resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineInner> beginUpdate(String resourceGroupName, - String virtualMachineName, String ifMatch, String ifNoneMatch, - VirtualMachinePatchParameters virtualMachineUpdateParameters) { - Response response = updateWithResponse(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, - virtualMachineUpdateParameters); - return this.client.getLroResult(response, VirtualMachineInner.class, - VirtualMachineInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, + String skipToken, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Patch the virtual machine. - * - * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. - * Properties and tag updates can be done independently. + * Get a list of virtual machines in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtualMachine represents the on-premises Network Cloud virtual - * machine. + * @return a list of virtual machines in the provided subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineInner> beginUpdate(String resourceGroupName, - String virtualMachineName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final VirtualMachinePatchParameters virtualMachineUpdateParameters = null; - Response response = updateWithResponse(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, - virtualMachineUpdateParameters); - return this.client.getLroResult(response, VirtualMachineInner.class, - VirtualMachineInner.class, Context.NONE); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, 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())); } /** - * Patch the virtual machine. - * - * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. - * Properties and tag updates can be done independently. + * Get a list of virtual machines in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param virtualMachineUpdateParameters The request body. - * @param context The context to associate with this operation. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtualMachine represents the on-premises Network Cloud virtual - * machine. + * @return a list of virtual machines in the provided subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Integer top, String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of virtual machines in the provided subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of virtual machines in the provided subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineInner> beginUpdate(String resourceGroupName, - String virtualMachineName, String ifMatch, String ifNoneMatch, - VirtualMachinePatchParameters virtualMachineUpdateParameters, Context context) { - Response response = updateWithResponse(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, - virtualMachineUpdateParameters, context); - return this.client.getLroResult(response, VirtualMachineInner.class, - VirtualMachineInner.class, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Patch the virtual machine. - * - * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. - * Properties and tag updates can be done independently. + * Get a list of virtual machines in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param virtualMachineUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtualMachine represents the on-premises Network Cloud virtual machine on successful completion of - * {@link Mono}. + * @return a list of virtual machines in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String virtualMachineName, String ifMatch, - String ifNoneMatch, VirtualMachinePatchParameters virtualMachineUpdateParameters) { - return beginUpdateAsync(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, - virtualMachineUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(Integer top, String skipToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the virtual machine. - * - * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. - * Properties and tag updates can be done independently. + * Get a list of virtual machines in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 virtualMachine represents the on-premises Network Cloud virtual machine on successful completion of - * {@link Mono}. + * @return a list of virtual machines in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String virtualMachineName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final VirtualMachinePatchParameters virtualMachineUpdateParameters = null; - return beginUpdateAsync(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, - virtualMachineUpdateParameters).last().flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the virtual machine. - * - * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. - * Properties and tag updates can be done independently. + * Get a list of virtual machines in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtualMachine represents the on-premises Network Cloud virtual machine. + * @return a list of virtual machines in the provided subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineInner update(String resourceGroupName, String virtualMachineName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final VirtualMachinePatchParameters virtualMachineUpdateParameters = null; - return beginUpdate(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, virtualMachineUpdateParameters) - .getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listSinglePage(top, skipToken), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * Patch the virtual machine. - * - * Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. - * Properties and tag updates can be done independently. + * Get a list of virtual machines in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param virtualMachineUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 virtualMachine represents the on-premises Network Cloud virtual machine. + * @return a list of virtual machines in the provided subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineInner update(String resourceGroupName, String virtualMachineName, String ifMatch, - String ifNoneMatch, VirtualMachinePatchParameters virtualMachineUpdateParameters, Context context) { - return beginUpdate(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, virtualMachineUpdateParameters, - context).getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Integer top, String skipToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1941,42 +1522,19 @@ public VirtualMachineInner update(String resourceGroupName, String virtualMachin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> assignRelayWithResponseAsync(String resourceGroupName, String virtualMachineName, VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (virtualMachineAssignRelayParameters != null) { - virtualMachineAssignRelayParameters.validate(); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.assignRelay(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, - virtualMachineAssignRelayParameters, accept, context)) + virtualMachineAssignRelayParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1985,41 +1543,17 @@ private Mono>> assignRelayWithResponseAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response assignRelayWithResponse(String resourceGroupName, String virtualMachineName, VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (virtualMachineAssignRelayParameters != null) { - virtualMachineAssignRelayParameters.validate(); - } - final String accept = "application/json"; return service.assignRelaySync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, virtualMachineAssignRelayParameters, - accept, Context.NONE); + Context.NONE); } /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2029,41 +1563,17 @@ private Response assignRelayWithResponse(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response assignRelayWithResponse(String resourceGroupName, String virtualMachineName, VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (virtualMachineAssignRelayParameters != null) { - virtualMachineAssignRelayParameters.validate(); - } - final String accept = "application/json"; return service.assignRelaySync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, virtualMachineAssignRelayParameters, - accept, context); + context); } /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2072,22 +1582,20 @@ private Response assignRelayWithResponse(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginAssignRelayAsync( + private PollerFlux, OperationStatusResult> beginAssignRelayAsync( String resourceGroupName, String virtualMachineName, VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters) { Mono>> mono = assignRelayWithResponseAsync(resourceGroupName, virtualMachineName, virtualMachineAssignRelayParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2095,22 +1603,20 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> + private PollerFlux, OperationStatusResult> beginAssignRelayAsync(String resourceGroupName, String virtualMachineName) { final VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters = null; Mono>> mono = assignRelayWithResponseAsync(resourceGroupName, virtualMachineName, virtualMachineAssignRelayParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2119,21 +1625,19 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginAssignRelay( + public SyncPoller, OperationStatusResult> beginAssignRelay( String resourceGroupName, String virtualMachineName, VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters) { Response response = assignRelayWithResponse(resourceGroupName, virtualMachineName, virtualMachineAssignRelayParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2141,21 +1645,19 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> + public SyncPoller, OperationStatusResult> beginAssignRelay(String resourceGroupName, String virtualMachineName) { final VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters = null; Response response = assignRelayWithResponse(resourceGroupName, virtualMachineName, virtualMachineAssignRelayParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2165,21 +1667,19 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginAssignRelay( + public SyncPoller, OperationStatusResult> beginAssignRelay( String resourceGroupName, String virtualMachineName, VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters, Context context) { Response response = assignRelayWithResponse(resourceGroupName, virtualMachineName, virtualMachineAssignRelayParameters, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2188,18 +1688,16 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono assignRelayAsync(String resourceGroupName, String virtualMachineName, + private Mono assignRelayAsync(String resourceGroupName, String virtualMachineName, VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters) { return beginAssignRelayAsync(resourceGroupName, virtualMachineName, virtualMachineAssignRelayParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2207,18 +1705,16 @@ private Mono assignRelayAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono assignRelayAsync(String resourceGroupName, String virtualMachineName) { + private Mono assignRelayAsync(String resourceGroupName, String virtualMachineName) { final VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters = null; return beginAssignRelayAsync(resourceGroupName, virtualMachineName, virtualMachineAssignRelayParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2226,18 +1722,16 @@ private Mono assignRelayAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner assignRelay(String resourceGroupName, String virtualMachineName) { + public OperationStatusResult assignRelay(String resourceGroupName, String virtualMachineName) { final VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters = null; return beginAssignRelay(resourceGroupName, virtualMachineName, virtualMachineAssignRelayParameters) .getFinalResult(); } /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2247,18 +1741,16 @@ public OperationStatusResultInner assignRelay(String resourceGroupName, String v * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner assignRelay(String resourceGroupName, String virtualMachineName, + public OperationStatusResult assignRelay(String resourceGroupName, String virtualMachineName, VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters, Context context) { return beginAssignRelay(resourceGroupName, virtualMachineName, virtualMachineAssignRelayParameters, context) .getFinalResult(); } /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2267,42 +1759,19 @@ public OperationStatusResultInner assignRelay(String resourceGroupName, String v * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> powerOffWithResponseAsync(String resourceGroupName, String virtualMachineName, VirtualMachinePowerOffParameters virtualMachinePowerOffParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (virtualMachinePowerOffParameters != null) { - virtualMachinePowerOffParameters.validate(); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.powerOff(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, - virtualMachinePowerOffParameters, accept, context)) + virtualMachinePowerOffParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2311,41 +1780,17 @@ private Mono>> powerOffWithResponseAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response powerOffWithResponse(String resourceGroupName, String virtualMachineName, VirtualMachinePowerOffParameters virtualMachinePowerOffParameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (virtualMachinePowerOffParameters != null) { - virtualMachinePowerOffParameters.validate(); - } - final String accept = "application/json"; return service.powerOffSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, virtualMachinePowerOffParameters, - accept, Context.NONE); + Context.NONE); } /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2355,41 +1800,17 @@ private Response powerOffWithResponse(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response powerOffWithResponse(String resourceGroupName, String virtualMachineName, VirtualMachinePowerOffParameters virtualMachinePowerOffParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - if (virtualMachinePowerOffParameters != null) { - virtualMachinePowerOffParameters.validate(); - } - final String accept = "application/json"; return service.powerOffSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, virtualMachinePowerOffParameters, - accept, context); + context); } /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2398,22 +1819,20 @@ private Response powerOffWithResponse(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> beginPowerOffAsync( + private PollerFlux, OperationStatusResult> beginPowerOffAsync( String resourceGroupName, String virtualMachineName, VirtualMachinePowerOffParameters virtualMachinePowerOffParameters) { Mono>> mono = powerOffWithResponseAsync(resourceGroupName, virtualMachineName, virtualMachinePowerOffParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2421,22 +1840,20 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> + private PollerFlux, OperationStatusResult> beginPowerOffAsync(String resourceGroupName, String virtualMachineName) { final VirtualMachinePowerOffParameters virtualMachinePowerOffParameters = null; Mono>> mono = powerOffWithResponseAsync(resourceGroupName, virtualMachineName, virtualMachinePowerOffParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2445,21 +1862,18 @@ private PollerFlux, OperationStatusResult * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginPowerOff( - String resourceGroupName, String virtualMachineName, - VirtualMachinePowerOffParameters virtualMachinePowerOffParameters) { + public SyncPoller, OperationStatusResult> beginPowerOff(String resourceGroupName, + String virtualMachineName, VirtualMachinePowerOffParameters virtualMachinePowerOffParameters) { Response response = powerOffWithResponse(resourceGroupName, virtualMachineName, virtualMachinePowerOffParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2467,21 +1881,19 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginPowerOff(String resourceGroupName, String virtualMachineName) { + public SyncPoller, OperationStatusResult> beginPowerOff(String resourceGroupName, + String virtualMachineName) { final VirtualMachinePowerOffParameters virtualMachinePowerOffParameters = null; Response response = powerOffWithResponse(resourceGroupName, virtualMachineName, virtualMachinePowerOffParameters); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2491,21 +1903,18 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> beginPowerOff( - String resourceGroupName, String virtualMachineName, - VirtualMachinePowerOffParameters virtualMachinePowerOffParameters, Context context) { + public SyncPoller, OperationStatusResult> beginPowerOff(String resourceGroupName, + String virtualMachineName, VirtualMachinePowerOffParameters virtualMachinePowerOffParameters, Context context) { Response response = powerOffWithResponse(resourceGroupName, virtualMachineName, virtualMachinePowerOffParameters, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2514,18 +1923,16 @@ public SyncPoller, OperationStatusResultI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono powerOffAsync(String resourceGroupName, String virtualMachineName, + private Mono powerOffAsync(String resourceGroupName, String virtualMachineName, VirtualMachinePowerOffParameters virtualMachinePowerOffParameters) { return beginPowerOffAsync(resourceGroupName, virtualMachineName, virtualMachinePowerOffParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2533,18 +1940,16 @@ private Mono powerOffAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono powerOffAsync(String resourceGroupName, String virtualMachineName) { + private Mono powerOffAsync(String resourceGroupName, String virtualMachineName) { final VirtualMachinePowerOffParameters virtualMachinePowerOffParameters = null; return beginPowerOffAsync(resourceGroupName, virtualMachineName, virtualMachinePowerOffParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2552,17 +1957,15 @@ private Mono powerOffAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner powerOff(String resourceGroupName, String virtualMachineName) { + public OperationStatusResult powerOff(String resourceGroupName, String virtualMachineName) { final VirtualMachinePowerOffParameters virtualMachinePowerOffParameters = null; return beginPowerOff(resourceGroupName, virtualMachineName, virtualMachinePowerOffParameters).getFinalResult(); } /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2572,18 +1975,16 @@ public OperationStatusResultInner powerOff(String resourceGroupName, String virt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner powerOff(String resourceGroupName, String virtualMachineName, + public OperationStatusResult powerOff(String resourceGroupName, String virtualMachineName, VirtualMachinePowerOffParameters virtualMachinePowerOffParameters, Context context) { return beginPowerOff(resourceGroupName, virtualMachineName, virtualMachinePowerOffParameters, context) .getFinalResult(); } /** - * Reimage the virtual machine. - * * Reimage the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2591,38 +1992,18 @@ public OperationStatusResultInner powerOff(String resourceGroupName, String virt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> reimageWithResponseAsync(String resourceGroupName, String virtualMachineName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.reimage(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Reimage the virtual machine. - * * Reimage the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2630,36 +2011,15 @@ private Mono>> reimageWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response reimageWithResponse(String resourceGroupName, String virtualMachineName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return service.reimageSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, Context.NONE); } /** - * Reimage the virtual machine. - * * Reimage the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2668,37 +2028,16 @@ private Response reimageWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response reimageWithResponse(String resourceGroupName, String virtualMachineName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return service.reimageSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, accept, context); + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, context); } /** - * Reimage the virtual machine. - * * Reimage the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2706,20 +2045,18 @@ private Response reimageWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> + private PollerFlux, OperationStatusResult> beginReimageAsync(String resourceGroupName, String virtualMachineName) { Mono>> mono = reimageWithResponseAsync(resourceGroupName, virtualMachineName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Reimage the virtual machine. - * * Reimage the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2727,19 +2064,17 @@ private Response reimageWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginReimage(String resourceGroupName, String virtualMachineName) { + public SyncPoller, OperationStatusResult> beginReimage(String resourceGroupName, + String virtualMachineName) { Response response = reimageWithResponse(resourceGroupName, virtualMachineName); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Reimage the virtual machine. - * * Reimage the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2748,19 +2083,17 @@ private Response reimageWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginReimage(String resourceGroupName, String virtualMachineName, Context context) { + public SyncPoller, OperationStatusResult> beginReimage(String resourceGroupName, + String virtualMachineName, Context context) { Response response = reimageWithResponse(resourceGroupName, virtualMachineName, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Reimage the virtual machine. - * * Reimage the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2768,17 +2101,15 @@ private Response reimageWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reimageAsync(String resourceGroupName, String virtualMachineName) { + private Mono reimageAsync(String resourceGroupName, String virtualMachineName) { return beginReimageAsync(resourceGroupName, virtualMachineName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Reimage the virtual machine. - * * Reimage the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2786,16 +2117,14 @@ private Mono reimageAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner reimage(String resourceGroupName, String virtualMachineName) { + public OperationStatusResult reimage(String resourceGroupName, String virtualMachineName) { return beginReimage(resourceGroupName, virtualMachineName).getFinalResult(); } /** - * Reimage the virtual machine. - * * Reimage the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2804,16 +2133,14 @@ public OperationStatusResultInner reimage(String resourceGroupName, String virtu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner reimage(String resourceGroupName, String virtualMachineName, Context context) { + public OperationStatusResult reimage(String resourceGroupName, String virtualMachineName, Context context) { return beginReimage(resourceGroupName, virtualMachineName, context).getFinalResult(); } /** - * Restart the virtual machine. - * * Restart the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2821,38 +2148,18 @@ public OperationStatusResultInner reimage(String resourceGroupName, String virtu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> restartWithResponseAsync(String resourceGroupName, String virtualMachineName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Restart the virtual machine. - * * Restart the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2860,36 +2167,15 @@ private Mono>> restartWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response restartWithResponse(String resourceGroupName, String virtualMachineName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return service.restartSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, Context.NONE); } /** - * Restart the virtual machine. - * * Restart the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2898,37 +2184,16 @@ private Response restartWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response restartWithResponse(String resourceGroupName, String virtualMachineName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return service.restartSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, accept, context); + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, context); } /** - * Restart the virtual machine. - * * Restart the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2936,20 +2201,18 @@ private Response restartWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> + private PollerFlux, OperationStatusResult> beginRestartAsync(String resourceGroupName, String virtualMachineName) { Mono>> mono = restartWithResponseAsync(resourceGroupName, virtualMachineName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Restart the virtual machine. - * * Restart the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2957,19 +2220,17 @@ private Response restartWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginRestart(String resourceGroupName, String virtualMachineName) { + public SyncPoller, OperationStatusResult> beginRestart(String resourceGroupName, + String virtualMachineName) { Response response = restartWithResponse(resourceGroupName, virtualMachineName); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Restart the virtual machine. - * * Restart the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2978,19 +2239,17 @@ private Response restartWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginRestart(String resourceGroupName, String virtualMachineName, Context context) { + public SyncPoller, OperationStatusResult> beginRestart(String resourceGroupName, + String virtualMachineName, Context context) { Response response = restartWithResponse(resourceGroupName, virtualMachineName, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Restart the virtual machine. - * * Restart the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2998,17 +2257,15 @@ private Response restartWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restartAsync(String resourceGroupName, String virtualMachineName) { + private Mono restartAsync(String resourceGroupName, String virtualMachineName) { return beginRestartAsync(resourceGroupName, virtualMachineName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Restart the virtual machine. - * * Restart the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3016,16 +2273,14 @@ private Mono restartAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner restart(String resourceGroupName, String virtualMachineName) { + public OperationStatusResult restart(String resourceGroupName, String virtualMachineName) { return beginRestart(resourceGroupName, virtualMachineName).getFinalResult(); } /** - * Restart the virtual machine. - * * Restart the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3034,16 +2289,14 @@ public OperationStatusResultInner restart(String resourceGroupName, String virtu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner restart(String resourceGroupName, String virtualMachineName, Context context) { + public OperationStatusResult restart(String resourceGroupName, String virtualMachineName, Context context) { return beginRestart(resourceGroupName, virtualMachineName, context).getFinalResult(); } /** - * Start the virtual machine. - * * Start the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3051,38 +2304,18 @@ public OperationStatusResultInner restart(String resourceGroupName, String virtu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync(String resourceGroupName, String virtualMachineName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Start the virtual machine. - * * Start the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3090,36 +2323,15 @@ private Mono>> startWithResponseAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response startWithResponse(String resourceGroupName, String virtualMachineName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, Context.NONE); } /** - * Start the virtual machine. - * * Start the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3128,37 +2340,16 @@ private Response startWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response startWithResponse(String resourceGroupName, String virtualMachineName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, accept, context); + this.client.getSubscriptionId(), resourceGroupName, virtualMachineName, context); } /** - * Start the virtual machine. - * * Start the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3166,20 +2357,18 @@ private Response startWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> + private PollerFlux, OperationStatusResult> beginStartAsync(String resourceGroupName, String virtualMachineName) { Mono>> mono = startWithResponseAsync(resourceGroupName, virtualMachineName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResult.class, OperationStatusResult.class, this.client.getContext()); } /** - * Start the virtual machine. - * * Start the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3187,19 +2376,17 @@ private Response startWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginStart(String resourceGroupName, String virtualMachineName) { + public SyncPoller, OperationStatusResult> beginStart(String resourceGroupName, + String virtualMachineName) { Response response = startWithResponse(resourceGroupName, virtualMachineName); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, Context.NONE); } /** - * Start the virtual machine. - * * Start the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3208,19 +2395,17 @@ private Response startWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginStart(String resourceGroupName, String virtualMachineName, Context context) { + public SyncPoller, OperationStatusResult> beginStart(String resourceGroupName, + String virtualMachineName, Context context) { Response response = startWithResponse(resourceGroupName, virtualMachineName, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + return this.client.getLroResult(response, + OperationStatusResult.class, OperationStatusResult.class, context); } /** - * Start the virtual machine. - * * Start the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3228,17 +2413,15 @@ private Response startWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String virtualMachineName) { + private Mono startAsync(String resourceGroupName, String virtualMachineName) { return beginStartAsync(resourceGroupName, virtualMachineName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Start the virtual machine. - * * Start the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3246,16 +2429,14 @@ private Mono startAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner start(String resourceGroupName, String virtualMachineName) { + public OperationStatusResult start(String resourceGroupName, String virtualMachineName) { return beginStart(resourceGroupName, virtualMachineName).getFinalResult(); } /** - * Start the virtual machine. - * * Start the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -3264,75 +2445,53 @@ public OperationStatusResultInner start(String resourceGroupName, String virtual * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner start(String resourceGroupName, String virtualMachineName, Context context) { + public OperationStatusResult start(String resourceGroupName, String virtualMachineName, Context context) { return beginStart(resourceGroupName, virtualMachineName, context).getFinalResult(); } /** - * List virtual machines in the subscription. - * * 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 virtual machines in the provided subscription along with {@link PagedResponse} on successful + * @return a list of virtual machines in the provided resource group along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); } /** - * List virtual machines in the subscription. - * * 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 virtual machines in the provided subscription along with {@link PagedResponse}. + * @return a list of virtual machines in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = 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); } /** - * List virtual machines in the subscription. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -3340,88 +2499,57 @@ private PagedResponse listBySubscriptionNextSinglePage(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machines in the provided subscription along with {@link PagedResponse}. + * @return a list of virtual machines in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List virtual machines in the resource group. - * * 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 virtual machines in the provided resource group along with {@link PagedResponse} on successful + * @return a list of virtual machines in the provided subscription along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(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())); } /** - * List virtual machines in the resource group. - * * 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 virtual machines in the provided resource group along with {@link PagedResponse}. + * @return a list of virtual machines in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List virtual machines in the resource group. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -3429,25 +2557,14 @@ private PagedResponse listByResourceGroupNextSinglePage(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of virtual machines in the provided resource group along with {@link PagedResponse}. + * @return a list of virtual machines in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(VirtualMachinesClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VirtualMachinesImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VirtualMachinesImpl.java index bf16f6772f72..b6ef242668c1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VirtualMachinesImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VirtualMachinesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -10,7 +10,6 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.fluent.models.VirtualMachineInner; import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; import com.azure.resourcemanager.networkcloud.models.VirtualMachine; @@ -31,14 +30,30 @@ public VirtualMachinesImpl(VirtualMachinesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineImpl(inner1, this.manager())); + public Response getByResourceGroupWithResponse(String resourceGroupName, String virtualMachineName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, virtualMachineName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VirtualMachineImpl(inner.getValue(), this.manager())); } - public PagedIterable list(Integer top, String skipToken, Context context) { - PagedIterable inner = this.serviceClient().list(top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineImpl(inner1, this.manager())); + public VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName) { + VirtualMachineInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, virtualMachineName); + if (inner != null) { + return new VirtualMachineImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String virtualMachineName) { + this.serviceClient().delete(resourceGroupName, virtualMachineName); + } + + public void delete(String resourceGroupName, String virtualMachineName, String ifMatch, String ifNoneMatch, + Context context) { + this.serviceClient().delete(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, context); } public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -53,139 +68,58 @@ public PagedIterable listByResourceGroup(String resourceGroupNam return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse(String resourceGroupName, String virtualMachineName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, virtualMachineName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VirtualMachineImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName) { - VirtualMachineInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, virtualMachineName); - if (inner != null) { - return new VirtualMachineImpl(inner, this.manager()); - } else { - return null; - } - } - - public OperationStatusResult deleteByResourceGroup(String resourceGroupName, String virtualMachineName) { - OperationStatusResultInner inner = this.serviceClient().delete(resourceGroupName, virtualMachineName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineImpl(inner1, this.manager())); } - public OperationStatusResult delete(String resourceGroupName, String virtualMachineName, String ifMatch, - String ifNoneMatch, Context context) { - OperationStatusResultInner inner - = this.serviceClient().delete(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(Integer top, String skipToken, Context context) { + PagedIterable inner = this.serviceClient().list(top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineImpl(inner1, this.manager())); } public OperationStatusResult assignRelay(String resourceGroupName, String virtualMachineName) { - OperationStatusResultInner inner = this.serviceClient().assignRelay(resourceGroupName, virtualMachineName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().assignRelay(resourceGroupName, virtualMachineName); } public OperationStatusResult assignRelay(String resourceGroupName, String virtualMachineName, VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters, Context context) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .assignRelay(resourceGroupName, virtualMachineName, virtualMachineAssignRelayParameters, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public OperationStatusResult powerOff(String resourceGroupName, String virtualMachineName) { - OperationStatusResultInner inner = this.serviceClient().powerOff(resourceGroupName, virtualMachineName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().powerOff(resourceGroupName, virtualMachineName); } public OperationStatusResult powerOff(String resourceGroupName, String virtualMachineName, VirtualMachinePowerOffParameters virtualMachinePowerOffParameters, Context context) { - OperationStatusResultInner inner = this.serviceClient() + return this.serviceClient() .powerOff(resourceGroupName, virtualMachineName, virtualMachinePowerOffParameters, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } } public OperationStatusResult reimage(String resourceGroupName, String virtualMachineName) { - OperationStatusResultInner inner = this.serviceClient().reimage(resourceGroupName, virtualMachineName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().reimage(resourceGroupName, virtualMachineName); } public OperationStatusResult reimage(String resourceGroupName, String virtualMachineName, Context context) { - OperationStatusResultInner inner = this.serviceClient().reimage(resourceGroupName, virtualMachineName, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().reimage(resourceGroupName, virtualMachineName, context); } public OperationStatusResult restart(String resourceGroupName, String virtualMachineName) { - OperationStatusResultInner inner = this.serviceClient().restart(resourceGroupName, virtualMachineName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().restart(resourceGroupName, virtualMachineName); } public OperationStatusResult restart(String resourceGroupName, String virtualMachineName, Context context) { - OperationStatusResultInner inner = this.serviceClient().restart(resourceGroupName, virtualMachineName, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().restart(resourceGroupName, virtualMachineName, context); } public OperationStatusResult start(String resourceGroupName, String virtualMachineName) { - OperationStatusResultInner inner = this.serviceClient().start(resourceGroupName, virtualMachineName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().start(resourceGroupName, virtualMachineName); } public OperationStatusResult start(String resourceGroupName, String virtualMachineName, Context context) { - OperationStatusResultInner inner = this.serviceClient().start(resourceGroupName, virtualMachineName, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + return this.serviceClient().start(resourceGroupName, virtualMachineName, context); } public VirtualMachine getById(String id) { @@ -216,7 +150,7 @@ public Response getByIdWithResponse(String id, Context context) return this.getByResourceGroupWithResponse(resourceGroupName, virtualMachineName, context); } - public OperationStatusResult deleteById(String id) { + public void deleteById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -229,11 +163,10 @@ public OperationStatusResult deleteById(String id) { } String localIfMatch = null; String localIfNoneMatch = null; - return this.delete(resourceGroupName, virtualMachineName, localIfMatch, localIfNoneMatch, Context.NONE); + this.delete(resourceGroupName, virtualMachineName, localIfMatch, localIfNoneMatch, Context.NONE); } - public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, - Context context) { + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -244,7 +177,7 @@ public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'virtualMachines'.", id))); } - return this.delete(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, context); + this.delete(resourceGroupName, virtualMachineName, ifMatch, ifNoneMatch, context); } private VirtualMachinesClient serviceClient() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VolumeImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VolumeImpl.java index 2c40b1ff2b5d..7fbdebfe10d5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VolumeImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VolumeImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -59,10 +59,22 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public long sizeMiB() { + return this.innerModel().sizeMiB(); + } + + public String storageApplianceId() { + return this.innerModel().storageApplianceId(); + } + public Long allocatedSizeMiB() { return this.innerModel().allocatedSizeMiB(); } + public String assignedStorageApplianceId() { + return this.innerModel().assignedStorageApplianceId(); + } + public List attachedTo() { List inner = this.innerModel().attachedTo(); if (inner != null) { @@ -80,20 +92,12 @@ public String detailedStatusMessage() { return this.innerModel().detailedStatusMessage(); } - public VolumeProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - public String serialNumber() { return this.innerModel().serialNumber(); } - public long sizeMiB() { - return this.innerModel().sizeMiB(); - } - - public String storageApplianceId() { - return this.innerModel().storageApplianceId(); + public VolumeProvisioningState provisioningState() { + return this.innerModel().provisioningState(); } public Region region() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VolumesClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VolumesClientImpl.java index 1e68ce8a53f5..08e257d5a5c0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VolumesClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VolumesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -31,13 +31,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.networkcloud.fluent.VolumesClient; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.fluent.models.VolumeInner; -import com.azure.resourcemanager.networkcloud.models.VolumeList; +import com.azure.resourcemanager.networkcloud.implementation.models.VolumeList; import com.azure.resourcemanager.networkcloud.models.VolumePatchParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,545 +53,171 @@ public final class VolumesClientImpl implements VolumesClient { /** * The service client containing this operation class. */ - private final NetworkCloudImpl client; + private final NetworkCloudManagementClientImpl client; /** * Initializes an instance of VolumesClientImpl. * * @param client the instance of the service client containing this operation class. */ - VolumesClientImpl(NetworkCloudImpl client) { + VolumesClientImpl(NetworkCloudManagementClientImpl client) { this.service = RestProxy.create(VolumesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for NetworkCloudVolumes to be used by the proxy service to perform REST - * calls. + * The interface defining all the services for NetworkCloudManagementClientVolumes to be used by the proxy service + * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NetworkCloudVolumes") + @Host("{endpoint}") + @ServiceInterface(name = "NetworkCloudManagementClientVolumes") public interface VolumesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/volumes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("volumeName") String volumeName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/volumes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("volumeName") String volumeName, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("volumeName") String volumeName, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") VolumeInner volumeParameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("volumeName") String volumeName, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") VolumeInner volumeParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("volumeName") String volumeName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") VolumePatchParameters volumeUpdateParameters, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("volumeName") String volumeName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") VolumePatchParameters volumeUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("volumeName") String volumeName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") VolumeInner volumeParameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("volumeName") String volumeName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") VolumeInner volumeParameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}") - @ExpectedResponses({ 200, 202, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("volumeName") String volumeName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}") - @ExpectedResponses({ 200, 202, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("volumeName") String volumeName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/volumes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("volumeName") String volumeName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") VolumePatchParameters volumeUpdateParameters, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/volumes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("volumeName") String volumeName, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") VolumePatchParameters volumeUpdateParameters, + @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + 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 listBySubscriptionNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + 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> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listBySubscriptionNext( + @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("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List volumes in the subscription. - * - * Get a list of volumes in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 volumes in the provided subscription along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, 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 volumes in the subscription. - * - * Get a list of volumes in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 volumes in the provided subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer top, String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List volumes in the subscription. - * - * Get a list of volumes in the provided subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of volumes in the provided subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List volumes in the subscription. - * - * Get a list of volumes in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 volumes in the provided subscription along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List volumes in the subscription. - * - * Get a list of volumes in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 volumes in the provided subscription along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List volumes in the subscription. - * - * Get a list of volumes in the provided subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of volumes in the provided subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listSinglePage(top, skipToken), - nextLink -> listBySubscriptionNextSinglePage(nextLink)); - } - - /** - * List volumes in the subscription. - * - * Get a list of volumes in the provided subscription. - * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 volumes in the provided subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Integer top, String skipToken, Context context) { - return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); - } - - /** - * List volumes in the resource group. - * - * Get a list of volumes in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 volumes in the provided resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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 volumes in the resource group. - * - * Get a list of volumes in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 volumes in the provided resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, String skipToken) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List volumes in the resource group. - * - * Get a list of volumes in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of volumes in the provided resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List volumes in the resource group. - * - * Get a list of volumes in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 volumes in the provided resource group along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List volumes in the resource group. - * - * Get a list of volumes in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 volumes in the provided resource group along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, - String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List volumes in the resource group. - * - * Get a list of volumes in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of volumes in the provided resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); - } - - /** - * List volumes in the resource group. - * - * Get a list of volumes in the provided resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @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 volumes in the provided resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + Response listBySubscriptionNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Retrieve the volume. - * * Get properties of the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -606,21 +230,6 @@ public PagedIterable listByResourceGroup(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String volumeName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), @@ -629,8 +238,6 @@ private Mono> getByResourceGroupWithResponseAsync(String r } /** - * Retrieve the volume. - * * Get properties of the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -647,8 +254,6 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Stri } /** - * Retrieve the volume. - * * Get properties of the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -662,32 +267,12 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String volumeName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (volumeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } final String accept = "application/json"; return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, volumeName, accept, context); } /** - * Retrieve the volume. - * * Get properties of the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -703,8 +288,6 @@ public VolumeInner getByResourceGroup(String resourceGroupName, String volumeNam } /** - * Create or update the volume. - * * Create a new volume or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -723,38 +306,16 @@ public VolumeInner getByResourceGroup(String resourceGroupName, String volumeNam @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String volumeName, VolumeInner volumeParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - if (volumeParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter volumeParameters is required and cannot be null.")); - } else { - volumeParameters.validate(); - } + 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, volumeName, ifMatch, ifNoneMatch, volumeParameters, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, volumeName, ifMatch, ifNoneMatch, contentType, + accept, volumeParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update the volume. - * * Create a new volume or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -773,39 +334,14 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String volumeName, VolumeInner volumeParameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (volumeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - if (volumeParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter volumeParameters is required and cannot be null.")); - } else { - volumeParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, volumeName, ifMatch, ifNoneMatch, volumeParameters, - accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, volumeName, ifMatch, ifNoneMatch, contentType, accept, + volumeParameters, Context.NONE); } /** - * Create or update the volume. - * * Create a new volume or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -825,39 +361,14 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String volumeName, VolumeInner volumeParameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (volumeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - if (volumeParameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter volumeParameters is required and cannot be null.")); - } else { - volumeParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, volumeName, ifMatch, ifNoneMatch, volumeParameters, - accept, context); + this.client.getSubscriptionId(), resourceGroupName, volumeName, ifMatch, ifNoneMatch, contentType, accept, + volumeParameters, context); } /** - * Create or update the volume. - * * Create a new volume or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -883,8 +394,6 @@ private PollerFlux, VolumeInner> beginCreateOrUpdateAsyn } /** - * Create or update the volume. - * * Create a new volume or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -908,8 +417,6 @@ private PollerFlux, VolumeInner> beginCreateOrUpdateAsyn } /** - * Create or update the volume. - * * Create a new volume or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -935,8 +442,6 @@ public SyncPoller, VolumeInner> beginCreateOrUpdate(Stri } /** - * Create or update the volume. - * * Create a new volume or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -960,8 +465,6 @@ public SyncPoller, VolumeInner> beginCreateOrUpdate(Stri } /** - * Create or update the volume. - * * Create a new volume or update the properties of the existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -988,38 +491,123 @@ public SyncPoller, VolumeInner> beginCreateOrUpdate(Stri } /** - * Create or update the volume. - * - * Create a new volume or update the properties of the existing one. + * Create a new volume or update the properties of the existing one. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param volumeName The name of the volume. + * @param volumeParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return volume represents storage made available for use by resources running on the cluster on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String volumeName, + VolumeInner volumeParameters, String ifMatch, String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, volumeName, volumeParameters, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a new volume or update the properties of the existing one. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param volumeName The name of the volume. + * @param volumeParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return volume represents storage made available for use by resources running on the cluster on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String volumeName, + VolumeInner volumeParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdateAsync(resourceGroupName, volumeName, volumeParameters, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a new volume or update the properties of the existing one. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param volumeName The name of the volume. + * @param volumeParameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return volume represents storage made available for use by resources running on the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeInner createOrUpdate(String resourceGroupName, String volumeName, VolumeInner volumeParameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdate(resourceGroupName, volumeName, volumeParameters, ifMatch, ifNoneMatch) + .getFinalResult(); + } + + /** + * Create a new volume or update the properties of the existing one. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param volumeName The name of the volume. + * @param volumeParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 volume represents storage made available for use by resources running on the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeInner createOrUpdate(String resourceGroupName, String volumeName, VolumeInner volumeParameters, + String ifMatch, String ifNoneMatch, Context context) { + return beginCreateOrUpdate(resourceGroupName, volumeName, volumeParameters, ifMatch, ifNoneMatch, context) + .getFinalResult(); + } + + /** + * Update tags associated with the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param volumeName The name of the volume. - * @param volumeParameters The request body. * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify * the last-seen ETag value to prevent accidentally overwriting concurrent changes. * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing * resource. Other values will result in error from server as they are not supported. + * @param volumeUpdateParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return volume represents storage made available for use by resources running on the cluster on successful - * completion of {@link Mono}. + * @return volume represents storage made available for use by resources running on the cluster along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String volumeName, - VolumeInner volumeParameters, String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, volumeName, volumeParameters, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> updateWithResponseAsync(String resourceGroupName, String volumeName, + String ifMatch, String ifNoneMatch, VolumePatchParameters volumeUpdateParameters) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, volumeName, ifMatch, ifNoneMatch, accept, + volumeUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update the volume. - * - * Create a new volume or update the properties of the existing one. + * Update tags associated with the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param volumeName The name of the volume. - * @param volumeParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1027,63 +615,60 @@ private Mono createOrUpdateAsync(String resourceGroupName, String v * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String volumeName, - VolumeInner volumeParameters) { + private Mono updateAsync(String resourceGroupName, String volumeName) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, volumeName, volumeParameters, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + final VolumePatchParameters volumeUpdateParameters = null; + return updateWithResponseAsync(resourceGroupName, volumeName, ifMatch, ifNoneMatch, volumeUpdateParameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create or update the volume. - * - * Create a new volume or update the properties of the existing one. + * Update tags associated with the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param volumeName The name of the volume. - * @param volumeParameters The request body. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @param volumeUpdateParameters The request body. + * @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 volume represents storage made available for use by resources running on the cluster. + * @return volume represents storage made available for use by resources running on the cluster along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VolumeInner createOrUpdate(String resourceGroupName, String volumeName, VolumeInner volumeParameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginCreateOrUpdate(resourceGroupName, volumeName, volumeParameters, ifMatch, ifNoneMatch) - .getFinalResult(); + public Response updateWithResponse(String resourceGroupName, String volumeName, String ifMatch, + String ifNoneMatch, VolumePatchParameters volumeUpdateParameters, Context context) { + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, volumeName, ifMatch, ifNoneMatch, accept, + volumeUpdateParameters, context); } /** - * Create or update the volume. - * - * Create a new volume or update the properties of the existing one. + * Update tags associated with the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param volumeName The name of the volume. - * @param volumeParameters The request body. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @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 volume represents storage made available for use by resources running on the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VolumeInner createOrUpdate(String resourceGroupName, String volumeName, VolumeInner volumeParameters, - String ifMatch, String ifNoneMatch, Context context) { - return beginCreateOrUpdate(resourceGroupName, volumeName, volumeParameters, ifMatch, ifNoneMatch, context) - .getFinalResult(); + public VolumeInner update(String resourceGroupName, String volumeName) { + final String ifMatch = null; + final String ifNoneMatch = null; + final VolumePatchParameters volumeUpdateParameters = null; + return updateWithResponse(resourceGroupName, volumeName, ifMatch, ifNoneMatch, volumeUpdateParameters, + Context.NONE).getValue(); } /** - * Delete the volume. - * * Delete the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1095,37 +680,18 @@ public VolumeInner createOrUpdate(String resourceGroupName, String volumeName, V * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String volumeName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, volumeName, ifMatch, ifNoneMatch, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, volumeName, ifMatch, ifNoneMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the volume. - * * Delete the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1137,37 +703,16 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String volumeName, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (volumeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, volumeName, ifMatch, ifNoneMatch, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, volumeName, ifMatch, ifNoneMatch, Context.NONE); } /** - * Delete the volume. - * * Delete the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1180,37 +725,16 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String volumeName, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (volumeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, volumeName, ifMatch, ifNoneMatch, accept, context); + this.client.getSubscriptionId(), resourceGroupName, volumeName, ifMatch, ifNoneMatch, context); } /** - * Delete the volume. - * * Delete the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1222,21 +746,18 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String volumeName, String ifMatch, String ifNoneMatch) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String volumeName, + String ifMatch, String ifNoneMatch) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, volumeName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the volume. - * * Delete the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1244,23 +765,19 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OperationStatusResultInner> - beginDeleteAsync(String resourceGroupName, String volumeName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String volumeName) { final String ifMatch = null; final String ifNoneMatch = null; Mono>> mono = deleteWithResponseAsync(resourceGroupName, volumeName, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Delete the volume. - * * Delete the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1272,19 +789,16 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String volumeName, String ifMatch, String ifNoneMatch) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String volumeName, String ifMatch, + String ifNoneMatch) { Response response = deleteWithResponse(resourceGroupName, volumeName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Delete the volume. - * * Delete the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1292,330 +806,426 @@ private Response deleteWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String volumeName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String volumeName) { final String ifMatch = null; final String ifNoneMatch = null; Response response = deleteWithResponse(resourceGroupName, volumeName, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the provided volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param volumeName The name of the volume. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 volumeName, String ifMatch, + String ifNoneMatch, Context context) { + Response response + = deleteWithResponse(resourceGroupName, volumeName, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the provided volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param volumeName The name of the volume. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volumeName, String ifMatch, String ifNoneMatch) { + return beginDeleteAsync(resourceGroupName, volumeName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the provided volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volumeName) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginDeleteAsync(resourceGroupName, volumeName, ifMatch, ifNoneMatch).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the volume. + * Delete the provided volume. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 volumeName) { + final String ifMatch = null; + final String ifNoneMatch = null; + beginDelete(resourceGroupName, volumeName, ifMatch, ifNoneMatch).getFinalResult(); + } + + /** * Delete the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param volumeName The name of the volume. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 volumeName, String ifMatch, String ifNoneMatch, + Context context) { + beginDelete(resourceGroupName, volumeName, ifMatch, ifNoneMatch, context).getFinalResult(); + } + + /** + * Get a list of volumes in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volumes in the provided resource group along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, Integer top, + String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, 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 a list of volumes in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volumes in the provided resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, String skipToken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of volumes in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of volumes in the provided resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of volumes in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volumes in the provided resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of volumes in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of volumes in the provided resource group along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationStatusResultInner> - beginDelete(String resourceGroupName, String volumeName, String ifMatch, String ifNoneMatch, Context context) { - Response response - = deleteWithResponse(resourceGroupName, volumeName, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - OperationStatusResultInner.class, OperationStatusResultInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, + String skipToken, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete the volume. - * - * Delete the provided volume. + * Get a list of volumes in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return a list of volumes in the provided resource group as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String volumeName, String ifMatch, - String ifNoneMatch) { - return beginDeleteAsync(resourceGroupName, volumeName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Delete the volume. - * - * Delete the provided volume. + * Get a list of volumes in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 on successful completion of {@link Mono}. + * @return a list of volumes in the provided resource group as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String volumeName) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginDeleteAsync(resourceGroupName, volumeName, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, top, skipToken, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Delete the volume. - * - * Delete the provided volume. + * Get a list of volumes in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a list of volumes in the provided subscription along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String volumeName) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginDelete(resourceGroupName, volumeName, ifMatch, ifNoneMatch).getFinalResult(); + private Mono> listSinglePageAsync(Integer top, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, 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())); } /** - * Delete the volume. - * - * Delete the provided volume. + * Get a list of volumes in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param context The context to associate with this operation. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a list of volumes in the provided subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner delete(String resourceGroupName, String volumeName, String ifMatch, - String ifNoneMatch, Context context) { - return beginDelete(resourceGroupName, volumeName, ifMatch, ifNoneMatch, context).getFinalResult(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Integer top, String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Patch the volume. - * - * Update tags associated with the provided volume. + * Get a list of volumes in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param volumeUpdateParameters The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return volume represents storage made available for use by resources running on the cluster along with - * {@link Response} on successful completion of {@link Mono}. + * @return a list of volumes in the provided subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String volumeName, - String ifMatch, String ifNoneMatch, VolumePatchParameters volumeUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - if (volumeUpdateParameters != null) { - volumeUpdateParameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, volumeName, ifMatch, ifNoneMatch, - volumeUpdateParameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(top, skipToken), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Patch the volume. - * - * Update tags associated with the provided volume. + * Get a list of volumes in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return volume represents storage made available for use by resources running on the cluster on successful - * completion of {@link Mono}. + * @return a list of volumes in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String volumeName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final VolumePatchParameters volumeUpdateParameters = null; - return updateWithResponseAsync(resourceGroupName, volumeName, ifMatch, ifNoneMatch, volumeUpdateParameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listSinglePage(Integer top, String skipToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the volume. - * - * Update tags associated with the provided volume. + * Get a list of volumes in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. - * @param volumeUpdateParameters The request body. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 volume represents storage made available for use by resources running on the cluster along with - * {@link Response}. + * @return a list of volumes in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String volumeName, String ifMatch, - String ifNoneMatch, VolumePatchParameters volumeUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (volumeName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - if (volumeUpdateParameters != null) { - volumeUpdateParameters.validate(); - } + private PagedResponse listSinglePage(Integer top, String skipToken, Context context) { final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, volumeName, ifMatch, ifNoneMatch, - volumeUpdateParameters, accept, context); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Patch the volume. + * Get a list of volumes in the provided subscription. * - * Update tags associated with the provided volume. + * @throws 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 volumes in the provided subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(() -> listSinglePage(top, skipToken), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * Get a list of volumes in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 volume represents storage made available for use by resources running on the cluster. + * @return a list of volumes in the provided subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VolumeInner update(String resourceGroupName, String volumeName) { - final String ifMatch = null; - final String ifNoneMatch = null; - final VolumePatchParameters volumeUpdateParameters = null; - return updateWithResponse(resourceGroupName, volumeName, ifMatch, ifNoneMatch, volumeUpdateParameters, - Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Integer top, String skipToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(top, skipToken, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * List volumes in the subscription. - * * 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 volumes in the provided subscription along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of volumes in the provided resource group along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); } /** - * List volumes in the subscription. - * * 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 volumes in the provided subscription along with {@link PagedResponse}. + * @return a list of volumes in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = 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); } /** - * List volumes in the subscription. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1623,88 +1233,57 @@ private PagedResponse listBySubscriptionNextSinglePage(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of volumes in the provided subscription along with {@link PagedResponse}. + * @return a list of volumes in the provided resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List volumes in the resource group. - * * 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 volumes in the provided resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of volumes in the provided subscription along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(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())); } /** - * List volumes in the resource group. - * * 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 volumes in the provided resource group along with {@link PagedResponse}. + * @return a list of volumes in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List volumes in the resource group. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1712,25 +1291,14 @@ private PagedResponse listByResourceGroupNextSinglePage(String next * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 volumes in the provided resource group along with {@link PagedResponse}. + * @return a list of volumes in the provided subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(VolumesClientImpl.class); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VolumesImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VolumesImpl.java index 646b0addafc5..41acb8cacd54 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VolumesImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/VolumesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.implementation; @@ -10,9 +10,7 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.networkcloud.fluent.VolumesClient; -import com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.networkcloud.fluent.models.VolumeInner; -import com.azure.resourcemanager.networkcloud.models.OperationStatusResult; import com.azure.resourcemanager.networkcloud.models.Volume; import com.azure.resourcemanager.networkcloud.models.Volumes; @@ -29,38 +27,12 @@ public VolumesImpl(VolumesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeImpl(inner1, this.manager())); - } - - public PagedIterable list(Integer top, String skipToken, Context context) { - PagedIterable inner = this.serviceClient().list(top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, top, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String volumeName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, volumeName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VolumeImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VolumeImpl(inner.getValue(), this.manager())); } public Volume getByResourceGroup(String resourceGroupName, String volumeName) { @@ -72,24 +44,35 @@ public Volume getByResourceGroup(String resourceGroupName, String volumeName) { } } - public OperationStatusResult deleteByResourceGroup(String resourceGroupName, String volumeName) { - OperationStatusResultInner inner = this.serviceClient().delete(resourceGroupName, volumeName); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + public void deleteByResourceGroup(String resourceGroupName, String volumeName) { + this.serviceClient().delete(resourceGroupName, volumeName); } - public OperationStatusResult delete(String resourceGroupName, String volumeName, String ifMatch, String ifNoneMatch, + public void delete(String resourceGroupName, String volumeName, String ifMatch, String ifNoneMatch, Context context) { - OperationStatusResultInner inner - = this.serviceClient().delete(resourceGroupName, volumeName, ifMatch, ifNoneMatch, context); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } + this.serviceClient().delete(resourceGroupName, volumeName, ifMatch, ifNoneMatch, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeImpl(inner1, this.manager())); + } + + public PagedIterable list(Integer top, String skipToken, Context context) { + PagedIterable inner = this.serviceClient().list(top, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeImpl(inner1, this.manager())); } public Volume getById(String id) { @@ -120,7 +103,7 @@ public Response getByIdWithResponse(String id, Context context) { return this.getByResourceGroupWithResponse(resourceGroupName, volumeName, context); } - public OperationStatusResult deleteById(String id) { + public void deleteById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -133,11 +116,10 @@ public OperationStatusResult deleteById(String id) { } String localIfMatch = null; String localIfNoneMatch = null; - return this.delete(resourceGroupName, volumeName, localIfMatch, localIfNoneMatch, Context.NONE); + this.delete(resourceGroupName, volumeName, localIfMatch, localIfNoneMatch, Context.NONE); } - public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, - Context context) { + public void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -148,7 +130,7 @@ public OperationStatusResult deleteByIdWithResponse(String id, String ifMatch, S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } - return this.delete(resourceGroupName, volumeName, ifMatch, ifNoneMatch, context); + this.delete(resourceGroupName, volumeName, ifMatch, ifNoneMatch, context); } private VolumesClient serviceClient() { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/AccessBridgeList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/AccessBridgeList.java new file mode 100644 index 000000000000..006111650c98 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/AccessBridgeList.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.networkcloud.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.networkcloud.fluent.models.AccessBridgeInner; +import java.io.IOException; +import java.util.List; + +/** + * AccessBridgeList represents a paged list of access bridges. + */ +@Immutable +public final class AccessBridgeList implements JsonSerializable { + /* + * The AccessBridge items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of AccessBridgeList class. + */ + private AccessBridgeList() { + } + + /** + * Get the value property: The AccessBridge 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 AccessBridgeList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessBridgeList 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 AccessBridgeList. + */ + public static AccessBridgeList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessBridgeList deserializedAccessBridgeList = new AccessBridgeList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> AccessBridgeInner.fromJson(reader1)); + deserializedAccessBridgeList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedAccessBridgeList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAccessBridgeList; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/AgentPoolList.java similarity index 63% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/AgentPoolList.java index dff3eb64bb27..9b616f6f4ae1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/AgentPoolList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * AgentPoolList represents a list of Kubernetes cluster agent pools. */ -@Fluent +@Immutable public final class AgentPoolList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The AgentPool items on this page */ - private String nextLink; + private List value; /* - * The list of agent pools. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of AgentPoolList class. */ - public AgentPoolList() { + private AgentPoolList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the AgentPoolList object itself. - */ - public AgentPoolList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of agent pools. + * Get the value property: The AgentPool items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of agent pools. - * - * @param value the value value to set. - * @return the AgentPoolList object itself. - */ - public AgentPoolList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AgentPoolList 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 AgentPoolList. */ public static AgentPoolList fromJson(JsonReader jsonReader) throws IOException { @@ -111,11 +79,11 @@ public static AgentPoolList fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedAgentPoolList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> AgentPoolInner.fromJson(reader1)); deserializedAgentPoolList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedAgentPoolList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/BareMetalMachineKeySetList.java similarity index 64% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/BareMetalMachineKeySetList.java index 315661377b05..dc66c759d4af 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/BareMetalMachineKeySetList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * BareMetalMachineKeySetList represents a list of bare metal machine key sets. */ -@Fluent +@Immutable public final class BareMetalMachineKeySetList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The BareMetalMachineKeySet items on this page */ - private String nextLink; + private List value; /* - * The list of bare metal machine key sets. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of BareMetalMachineKeySetList class. */ - public BareMetalMachineKeySetList() { + private BareMetalMachineKeySetList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the BareMetalMachineKeySetList object itself. - */ - public BareMetalMachineKeySetList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of bare metal machine key sets. + * Get the value property: The BareMetalMachineKeySet items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of bare metal machine key sets. - * - * @param value the value value to set. - * @return the BareMetalMachineKeySetList object itself. - */ - public BareMetalMachineKeySetList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of BareMetalMachineKeySetList 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 BareMetalMachineKeySetList. */ public static BareMetalMachineKeySetList fromJson(JsonReader jsonReader) throws IOException { @@ -111,12 +79,12 @@ public static BareMetalMachineKeySetList fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedBareMetalMachineKeySetList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> BareMetalMachineKeySetInner.fromJson(reader1)); deserializedBareMetalMachineKeySetList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedBareMetalMachineKeySetList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/BareMetalMachineList.java similarity index 64% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/BareMetalMachineList.java index 4938d6a6296a..2c13d0af307e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/BareMetalMachineList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * BareMetalMachineList represents a list of bare metal machines. */ -@Fluent +@Immutable public final class BareMetalMachineList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The BareMetalMachine items on this page */ - private String nextLink; + private List value; /* - * The list of bare metal machines. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of BareMetalMachineList class. */ - public BareMetalMachineList() { + private BareMetalMachineList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the BareMetalMachineList object itself. - */ - public BareMetalMachineList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of bare metal machines. + * Get the value property: The BareMetalMachine items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of bare metal machines. - * - * @param value the value value to set. - * @return the BareMetalMachineList object itself. - */ - public BareMetalMachineList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of BareMetalMachineList 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 BareMetalMachineList. */ public static BareMetalMachineList fromJson(JsonReader jsonReader) throws IOException { @@ -111,12 +79,12 @@ public static BareMetalMachineList fromJson(JsonReader jsonReader) throws IOExce String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedBareMetalMachineList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> BareMetalMachineInner.fromJson(reader1)); deserializedBareMetalMachineList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedBareMetalMachineList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/BmcKeySetList.java similarity index 62% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/BmcKeySetList.java index 8ce172cec637..dca8a6d58755 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/BmcKeySetList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * BmcKeySetList represents a list of baseboard management controller key sets. */ -@Fluent +@Immutable public final class BmcKeySetList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The BmcKeySet items on this page */ - private String nextLink; + private List value; /* - * The list of baseboard management controller key sets. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of BmcKeySetList class. */ - public BmcKeySetList() { + private BmcKeySetList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the BmcKeySetList object itself. - */ - public BmcKeySetList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of baseboard management controller key sets. + * Get the value property: The BmcKeySet items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of baseboard management controller key sets. - * - * @param value the value value to set. - * @return the BmcKeySetList object itself. - */ - public BmcKeySetList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of BmcKeySetList 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 BmcKeySetList. */ public static BmcKeySetList fromJson(JsonReader jsonReader) throws IOException { @@ -111,11 +79,11 @@ public static BmcKeySetList fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedBmcKeySetList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> BmcKeySetInner.fromJson(reader1)); deserializedBmcKeySetList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedBmcKeySetList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/CloudServicesNetworkList.java similarity index 64% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/CloudServicesNetworkList.java index e43ac2627bde..8114b2361a27 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/CloudServicesNetworkList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * CloudServicesNetworkList represents a list of cloud services networks. */ -@Fluent +@Immutable public final class CloudServicesNetworkList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The CloudServicesNetwork items on this page */ - private String nextLink; + private List value; /* - * The list of cloud services networks. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of CloudServicesNetworkList class. */ - public CloudServicesNetworkList() { + private CloudServicesNetworkList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the CloudServicesNetworkList object itself. - */ - public CloudServicesNetworkList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of cloud services networks. + * Get the value property: The CloudServicesNetwork items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of cloud services networks. - * - * @param value the value value to set. - * @return the CloudServicesNetworkList object itself. - */ - public CloudServicesNetworkList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of CloudServicesNetworkList 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 CloudServicesNetworkList. */ public static CloudServicesNetworkList fromJson(JsonReader jsonReader) throws IOException { @@ -111,12 +79,12 @@ public static CloudServicesNetworkList fromJson(JsonReader jsonReader) throws IO String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedCloudServicesNetworkList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> CloudServicesNetworkInner.fromJson(reader1)); deserializedCloudServicesNetworkList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedCloudServicesNetworkList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/ClusterList.java similarity index 63% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/ClusterList.java index ef7d63f5b188..2e2cd5268262 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/ClusterList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * ClusterList represents a list of clusters. */ -@Fluent +@Immutable public final class ClusterList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The Cluster items on this page */ - private String nextLink; + private List value; /* - * The list of clusters. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of ClusterList class. */ - public ClusterList() { + private ClusterList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the ClusterList object itself. - */ - public ClusterList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of clusters. + * Get the value property: The Cluster items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of clusters. - * - * @param value the value value to set. - * @return the ClusterList object itself. - */ - public ClusterList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ClusterList 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 ClusterList. */ public static ClusterList fromJson(JsonReader jsonReader) throws IOException { @@ -111,11 +79,11 @@ public static ClusterList fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedClusterList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ClusterInner.fromJson(reader1)); deserializedClusterList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedClusterList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/ClusterManagerList.java similarity index 64% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/ClusterManagerList.java index 0e5c75dd77e9..554063f0b315 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/ClusterManagerList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * ClusterManagerList represents a list of cluster manager objects. */ -@Fluent +@Immutable public final class ClusterManagerList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The ClusterManager items on this page */ - private String nextLink; + private List value; /* - * The list of cluster managers. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of ClusterManagerList class. */ - public ClusterManagerList() { + private ClusterManagerList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the ClusterManagerList object itself. - */ - public ClusterManagerList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of cluster managers. + * Get the value property: The ClusterManager items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of cluster managers. - * - * @param value the value value to set. - * @return the ClusterManagerList object itself. - */ - public ClusterManagerList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ClusterManagerList 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 ClusterManagerList. */ public static ClusterManagerList fromJson(JsonReader jsonReader) throws IOException { @@ -111,12 +79,12 @@ public static ClusterManagerList fromJson(JsonReader jsonReader) throws IOExcept String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedClusterManagerList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ClusterManagerInner.fromJson(reader1)); deserializedClusterManagerList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedClusterManagerList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfigurationList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/ClusterMetricsConfigurationList.java similarity index 65% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfigurationList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/ClusterMetricsConfigurationList.java index 8acce8d852fe..434f5cd69195 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfigurationList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/ClusterMetricsConfigurationList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * ClusterMetricsConfigurationList represents a list of metrics configuration of the cluster. */ -@Fluent +@Immutable public final class ClusterMetricsConfigurationList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The ClusterMetricsConfiguration items on this page */ - private String nextLink; + private List value; /* - * The list of metrics configurations. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of ClusterMetricsConfigurationList class. */ - public ClusterMetricsConfigurationList() { + private ClusterMetricsConfigurationList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the ClusterMetricsConfigurationList object itself. - */ - public ClusterMetricsConfigurationList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of metrics configurations. + * Get the value property: The ClusterMetricsConfiguration items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of metrics configurations. - * - * @param value the value value to set. - * @return the ClusterMetricsConfigurationList object itself. - */ - public ClusterMetricsConfigurationList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ClusterMetricsConfigurationList 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 ClusterMetricsConfigurationList. */ public static ClusterMetricsConfigurationList fromJson(JsonReader jsonReader) throws IOException { @@ -112,12 +80,12 @@ public static ClusterMetricsConfigurationList fromJson(JsonReader jsonReader) th String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedClusterMetricsConfigurationList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ClusterMetricsConfigurationInner.fromJson(reader1)); deserializedClusterMetricsConfigurationList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedClusterMetricsConfigurationList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsoleList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/ConsoleList.java similarity index 63% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsoleList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/ConsoleList.java index b7a06f3a466f..511c358a8654 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsoleList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/ConsoleList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * ConsoleList represents a list of virtual machine consoles. */ -@Fluent +@Immutable public final class ConsoleList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The Console items on this page */ - private String nextLink; + private List value; /* - * The list of virtual machine consoles. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of ConsoleList class. */ - public ConsoleList() { + private ConsoleList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the ConsoleList object itself. - */ - public ConsoleList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of virtual machine consoles. + * Get the value property: The Console items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of virtual machine consoles. - * - * @param value the value value to set. - * @return the ConsoleList object itself. - */ - public ConsoleList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ConsoleList 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 ConsoleList. */ public static ConsoleList fromJson(JsonReader jsonReader) throws IOException { @@ -111,11 +79,11 @@ public static ConsoleList fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedConsoleList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ConsoleInner.fromJson(reader1)); deserializedConsoleList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedConsoleList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/KubernetesClusterFeatureList.java similarity index 64% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/KubernetesClusterFeatureList.java index 51e02a5a3aa5..374f5e62a4b9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/KubernetesClusterFeatureList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * KubernetesClusterFeatureList represents the list of Kubernetes cluster feature resources. */ -@Fluent +@Immutable public final class KubernetesClusterFeatureList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The KubernetesClusterFeature items on this page */ - private String nextLink; + private List value; /* - * The list of Kubernetes cluster features. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of KubernetesClusterFeatureList class. */ - public KubernetesClusterFeatureList() { + private KubernetesClusterFeatureList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the KubernetesClusterFeatureList object itself. - */ - public KubernetesClusterFeatureList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of Kubernetes cluster features. + * Get the value property: The KubernetesClusterFeature items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of Kubernetes cluster features. - * - * @param value the value value to set. - * @return the KubernetesClusterFeatureList object itself. - */ - public KubernetesClusterFeatureList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of KubernetesClusterFeatureList 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 KubernetesClusterFeatureList. */ public static KubernetesClusterFeatureList fromJson(JsonReader jsonReader) throws IOException { @@ -111,12 +79,12 @@ public static KubernetesClusterFeatureList fromJson(JsonReader jsonReader) throw String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedKubernetesClusterFeatureList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> KubernetesClusterFeatureInner.fromJson(reader1)); deserializedKubernetesClusterFeatureList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedKubernetesClusterFeatureList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/KubernetesClusterList.java similarity index 62% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/KubernetesClusterList.java index 3430adb0fbe2..0fb810c543f6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/KubernetesClusterList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * KubernetesClusterList represents a list of Kubernetes clusters. */ -@Fluent +@Immutable public final class KubernetesClusterList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The KubernetesCluster items on this page */ - private String nextLink; + private List value; /* - * The list of additional details related to Kubernetes clusters. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of KubernetesClusterList class. */ - public KubernetesClusterList() { + private KubernetesClusterList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the KubernetesClusterList object itself. - */ - public KubernetesClusterList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of additional details related to Kubernetes clusters. + * Get the value property: The KubernetesCluster items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of additional details related to Kubernetes clusters. - * - * @param value the value value to set. - * @return the KubernetesClusterList object itself. - */ - public KubernetesClusterList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of KubernetesClusterList 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 KubernetesClusterList. */ public static KubernetesClusterList fromJson(JsonReader jsonReader) throws IOException { @@ -111,12 +79,12 @@ public static KubernetesClusterList fromJson(JsonReader jsonReader) throws IOExc String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedKubernetesClusterList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> KubernetesClusterInner.fromJson(reader1)); deserializedKubernetesClusterList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedKubernetesClusterList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/KubernetesVersionList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/KubernetesVersionList.java new file mode 100644 index 000000000000..6216b6107079 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/KubernetesVersionList.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.networkcloud.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.networkcloud.fluent.models.KubernetesVersionInner; +import java.io.IOException; +import java.util.List; + +/** + * KubernetesVersionList represents a list of Kubernetes version resources. + */ +@Immutable +public final class KubernetesVersionList implements JsonSerializable { + /* + * The KubernetesVersion items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of KubernetesVersionList class. + */ + private KubernetesVersionList() { + } + + /** + * Get the value property: The KubernetesVersion 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 KubernetesVersionList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KubernetesVersionList 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 KubernetesVersionList. + */ + public static KubernetesVersionList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KubernetesVersionList deserializedKubernetesVersionList = new KubernetesVersionList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> KubernetesVersionInner.fromJson(reader1)); + deserializedKubernetesVersionList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedKubernetesVersionList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedKubernetesVersionList; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/L2NetworkList.java similarity index 63% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/L2NetworkList.java index 795b974199c8..76ac5552e5f7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/L2NetworkList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * L2NetworkList represents a list of L2 networks. */ -@Fluent +@Immutable public final class L2NetworkList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The L2Network items on this page */ - private String nextLink; + private List value; /* - * The list of L2 networks. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of L2NetworkList class. */ - public L2NetworkList() { + private L2NetworkList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the L2NetworkList object itself. - */ - public L2NetworkList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of L2 networks. + * Get the value property: The L2Network items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of L2 networks. - * - * @param value the value value to set. - * @return the L2NetworkList object itself. - */ - public L2NetworkList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of L2NetworkList 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 L2NetworkList. */ public static L2NetworkList fromJson(JsonReader jsonReader) throws IOException { @@ -111,11 +79,11 @@ public static L2NetworkList fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedL2NetworkList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> L2NetworkInner.fromJson(reader1)); deserializedL2NetworkList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedL2NetworkList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/L3NetworkList.java similarity index 63% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/L3NetworkList.java index 775b8b265cc3..03b6914f4ca8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/L3NetworkList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * L3NetworkList represents a list of L3 networks. */ -@Fluent +@Immutable public final class L3NetworkList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The L3Network items on this page */ - private String nextLink; + private List value; /* - * The list of L3 networks. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of L3NetworkList class. */ - public L3NetworkList() { + private L3NetworkList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the L3NetworkList object itself. - */ - public L3NetworkList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of L3 networks. + * Get the value property: The L3Network items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of L3 networks. - * - * @param value the value value to set. - * @return the L3NetworkList object itself. - */ - public L3NetworkList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of L3NetworkList 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 L3NetworkList. */ public static L3NetworkList fromJson(JsonReader jsonReader) throws IOException { @@ -111,11 +79,11 @@ public static L3NetworkList fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedL3NetworkList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> L3NetworkInner.fromJson(reader1)); deserializedL3NetworkList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedL3NetworkList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OperationListResult.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/OperationListResult.java similarity index 78% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OperationListResult.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/OperationListResult.java index c076af51730b..b385a0e8a927 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OperationListResult.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/OperationListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -20,23 +20,23 @@ @Immutable public final class OperationListResult implements JsonSerializable { /* - * List of operations supported by the resource provider + * The Operation items on this page */ private List value; /* - * URL to get the next set of operation list results (if there are any). + * The link to the next page of items */ private String nextLink; /** * Creates an instance of OperationListResult class. */ - public OperationListResult() { + private OperationListResult() { } /** - * Get the value property: List of operations supported by the resource provider. + * Get the value property: The Operation items on this page. * * @return the value value. */ @@ -45,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,23 +53,14 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -79,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the OperationListResult. */ public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/RackList.java similarity index 63% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/RackList.java index 766d6a20a325..0f7d3b1cd67a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/RackList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * RackList represents a list of racks. */ -@Fluent +@Immutable public final class RackList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The Rack items on this page */ - private String nextLink; + private List value; /* - * The list of racks. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of RackList class. */ - public RackList() { + private RackList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the RackList object itself. - */ - public RackList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of racks. + * Get the value property: The Rack items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of racks. - * - * @param value the value value to set. - * @return the RackList object itself. - */ - public RackList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of RackList 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 RackList. */ public static RackList fromJson(JsonReader jsonReader) throws IOException { @@ -111,11 +79,11 @@ public static RackList fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedRackList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> RackInner.fromJson(reader1)); deserializedRackList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedRackList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSkuList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/RackSkuList.java similarity index 63% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSkuList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/RackSkuList.java index aa8647ecb48e..11b767225ccc 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSkuList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/RackSkuList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * RackSkuList represents a list of rack SKUs. */ -@Fluent +@Immutable public final class RackSkuList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The RackSku items on this page */ - private String nextLink; + private List value; /* - * The list of Rack SKUs. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of RackSkuList class. */ - public RackSkuList() { + private RackSkuList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the RackSkuList object itself. - */ - public RackSkuList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of Rack SKUs. + * Get the value property: The RackSku items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of Rack SKUs. - * - * @param value the value value to set. - * @return the RackSkuList object itself. - */ - public RackSkuList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of RackSkuList 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 RackSkuList. */ public static RackSkuList fromJson(JsonReader jsonReader) throws IOException { @@ -111,11 +79,11 @@ public static RackSkuList fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedRackSkuList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> RackSkuInner.fromJson(reader1)); deserializedRackSkuList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedRackSkuList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/StorageApplianceList.java similarity index 64% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/StorageApplianceList.java index 62197756a04e..91218773e645 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/StorageApplianceList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * StorageApplianceList represents a list of storage appliances. */ -@Fluent +@Immutable public final class StorageApplianceList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The StorageAppliance items on this page */ - private String nextLink; + private List value; /* - * The list of storage appliances. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of StorageApplianceList class. */ - public StorageApplianceList() { + private StorageApplianceList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the StorageApplianceList object itself. - */ - public StorageApplianceList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of storage appliances. + * Get the value property: The StorageAppliance items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of storage appliances. - * - * @param value the value value to set. - * @return the StorageApplianceList object itself. - */ - public StorageApplianceList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of StorageApplianceList 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 StorageApplianceList. */ public static StorageApplianceList fromJson(JsonReader jsonReader) throws IOException { @@ -111,12 +79,12 @@ public static StorageApplianceList fromJson(JsonReader jsonReader) throws IOExce String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedStorageApplianceList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> StorageApplianceInner.fromJson(reader1)); deserializedStorageApplianceList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedStorageApplianceList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/TrunkedNetworkList.java similarity index 64% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/TrunkedNetworkList.java index adfca50fff8b..fa414001e3f5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/TrunkedNetworkList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * TrunkedNetworkList represents a list of trunked networks. */ -@Fluent +@Immutable public final class TrunkedNetworkList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The TrunkedNetwork items on this page */ - private String nextLink; + private List value; /* - * The list of trunked networks. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of TrunkedNetworkList class. */ - public TrunkedNetworkList() { + private TrunkedNetworkList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the TrunkedNetworkList object itself. - */ - public TrunkedNetworkList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of trunked networks. + * Get the value property: The TrunkedNetwork items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of trunked networks. - * - * @param value the value value to set. - * @return the TrunkedNetworkList object itself. - */ - public TrunkedNetworkList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of TrunkedNetworkList 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 TrunkedNetworkList. */ public static TrunkedNetworkList fromJson(JsonReader jsonReader) throws IOException { @@ -111,12 +79,12 @@ public static TrunkedNetworkList fromJson(JsonReader jsonReader) throws IOExcept String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedTrunkedNetworkList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> TrunkedNetworkInner.fromJson(reader1)); deserializedTrunkedNetworkList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedTrunkedNetworkList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/VirtualMachineList.java similarity index 64% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/VirtualMachineList.java index 54c6819880a7..82bdaeeff741 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/VirtualMachineList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * VirtualMachineList represents a list of virtual machines. */ -@Fluent +@Immutable public final class VirtualMachineList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The VirtualMachine items on this page */ - private String nextLink; + private List value; /* - * The list of virtual machines. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of VirtualMachineList class. */ - public VirtualMachineList() { + private VirtualMachineList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the VirtualMachineList object itself. - */ - public VirtualMachineList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of virtual machines. + * Get the value property: The VirtualMachine items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of virtual machines. - * - * @param value the value value to set. - * @return the VirtualMachineList object itself. - */ - public VirtualMachineList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of VirtualMachineList 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 VirtualMachineList. */ public static VirtualMachineList fromJson(JsonReader jsonReader) throws IOException { @@ -111,12 +79,12 @@ public static VirtualMachineList fromJson(JsonReader jsonReader) throws IOExcept String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedVirtualMachineList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> VirtualMachineInner.fromJson(reader1)); deserializedVirtualMachineList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedVirtualMachineList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VolumeList.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/VolumeList.java similarity index 63% rename from sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VolumeList.java rename to sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/VolumeList.java index 155bafe94753..bf3b420171e4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VolumeList.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/VolumeList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.networkcloud.models; +package com.azure.resourcemanager.networkcloud.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * VolumeList represents a list of volumes. */ -@Fluent +@Immutable public final class VolumeList implements JsonSerializable { /* - * The link used to get the next page of operations. + * The Volume items on this page */ - private String nextLink; + private List value; /* - * The list of volumes. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of VolumeList class. */ - public VolumeList() { + private VolumeList() { } /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the VolumeList object itself. - */ - public VolumeList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of volumes. + * Get the value property: The Volume items on this page. * * @return the value value. */ @@ -64,25 +44,12 @@ public List value() { } /** - * Set the value property: The list of volumes. - * - * @param value the value value to set. - * @return the VolumeList object itself. - */ - public VolumeList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -91,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of VolumeList 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 VolumeList. */ public static VolumeList fromJson(JsonReader jsonReader) throws IOException { @@ -111,11 +79,11 @@ public static VolumeList fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedVolumeList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> VolumeInner.fromJson(reader1)); deserializedVolumeList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedVolumeList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/package-info.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/package-info.java index 473bde0bfed1..d9554214ee7a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/package-info.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/package-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the implementations for NetworkCloud. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AadConfiguration.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AadConfiguration.java index 3ed7ccc3adf4..68a19ca31840 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AadConfiguration.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AadConfiguration.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,21 +51,6 @@ public AadConfiguration withAdminGroupObjectIds(List adminGroupObjectIds return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (adminGroupObjectIds() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property adminGroupObjectIds in model AadConfiguration")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AadConfiguration.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridge.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridge.java new file mode 100644 index 000000000000..afa998eca963 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridge.java @@ -0,0 +1,437 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.networkcloud.fluent.models.AccessBridgeInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of AccessBridge. + */ +public interface AccessBridge { + /** + * 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 etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the extendedLocation property: The extended location of the resource. This property is required when + * creating 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 ipv4ConnectedPrefix property: The IPv4 subnet from which the access bridge allocates an address. This + * subnet must be part of the internal network specified by networkId. + * + * @return the ipv4ConnectedPrefix value. + */ + String ipv4ConnectedPrefix(); + + /** + * Gets the ipv6ConnectedPrefix property: The IPv6 subnet from which the access bridge allocates an address. This + * subnet must be part of the internal network specified by networkId. + * + * @return the ipv6ConnectedPrefix value. + */ + String ipv6ConnectedPrefix(); + + /** + * Gets the networkId property: The resource ID of the internal network in a layer 3 isolation domain containing the + * IP subnets to use. + * + * @return the networkId value. + */ + String networkId(); + + /** + * Gets the securityRules property: The list of security rules enforced by the access bridge. + * + * @return the securityRules value. + */ + List securityRules(); + + /** + * Gets the detailedStatus property: The detailed status reported by the access bridge. + * + * @return the detailedStatus value. + */ + AccessBridgeDetailedStatus detailedStatus(); + + /** + * Gets the detailedStatusMessage property: The descriptive message that accompanies the detailed status. + * + * @return the detailedStatusMessage value. + */ + String detailedStatusMessage(); + + /** + * Gets the endpoints property: The observed endpoints that clients should use to reach the access bridge. + * + * @return the endpoints value. + */ + List endpoints(); + + /** + * Gets the protocol property: The protocol advertised by the access bridge endpoints. + * + * @return the protocol value. + */ + TransportProtocol protocol(); + + /** + * Gets the provisioningState property: The provisioning state of the access bridge. + * + * @return the provisioningState value. + */ + AccessBridgeProvisioningState provisioningState(); + + /** + * 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.networkcloud.fluent.models.AccessBridgeInner object. + * + * @return the inner object. + */ + AccessBridgeInner innerModel(); + + /** + * The entirety of the AccessBridge definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, + DefinitionStages.WithExtendedLocation, DefinitionStages.WithNetworkId, DefinitionStages.WithCreate { + } + + /** + * The AccessBridge definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the AccessBridge definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the AccessBridge 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 AccessBridge 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. + */ + WithExtendedLocation withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the AccessBridge definition allowing to specify extendedLocation. + */ + interface WithExtendedLocation { + /** + * Specifies the extendedLocation property: The extended location of the resource. This property is required + * when creating the resource.. + * + * @param extendedLocation The extended location of the resource. This property is required when creating + * the resource. + * @return the next definition stage. + */ + WithNetworkId withExtendedLocation(ExtendedLocation extendedLocation); + } + + /** + * The stage of the AccessBridge definition allowing to specify networkId. + */ + interface WithNetworkId { + /** + * Specifies the networkId property: The resource ID of the internal network in a layer 3 isolation domain + * containing the IP subnets to use.. + * + * @param networkId The resource ID of the internal network in a layer 3 isolation domain containing the IP + * subnets to use. + * @return the next definition stage. + */ + WithCreate withNetworkId(String networkId); + } + + /** + * The stage of the AccessBridge 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.WithIpv4ConnectedPrefix, + DefinitionStages.WithIpv6ConnectedPrefix, DefinitionStages.WithSecurityRules { + /** + * Executes the create request. + * + * @return the created resource. + */ + AccessBridge create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AccessBridge create(Context context); + } + + /** + * The stage of the AccessBridge 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 AccessBridge definition allowing to specify ipv4ConnectedPrefix. + */ + interface WithIpv4ConnectedPrefix { + /** + * Specifies the ipv4ConnectedPrefix property: The IPv4 subnet from which the access bridge allocates an + * address. This subnet must be part of the internal network specified by networkId.. + * + * @param ipv4ConnectedPrefix The IPv4 subnet from which the access bridge allocates an address. This subnet + * must be part of the internal network specified by networkId. + * @return the next definition stage. + */ + WithCreate withIpv4ConnectedPrefix(String ipv4ConnectedPrefix); + } + + /** + * The stage of the AccessBridge definition allowing to specify ipv6ConnectedPrefix. + */ + interface WithIpv6ConnectedPrefix { + /** + * Specifies the ipv6ConnectedPrefix property: The IPv6 subnet from which the access bridge allocates an + * address. This subnet must be part of the internal network specified by networkId.. + * + * @param ipv6ConnectedPrefix The IPv6 subnet from which the access bridge allocates an address. This subnet + * must be part of the internal network specified by networkId. + * @return the next definition stage. + */ + WithCreate withIpv6ConnectedPrefix(String ipv6ConnectedPrefix); + } + + /** + * The stage of the AccessBridge definition allowing to specify securityRules. + */ + interface WithSecurityRules { + /** + * Specifies the securityRules property: The list of security rules enforced by the access bridge.. + * + * @param securityRules The list of security rules enforced by the access bridge. + * @return the next definition stage. + */ + WithCreate withSecurityRules(List securityRules); + } + } + + /** + * Begins update for the AccessBridge resource. + * + * @return the stage of resource update. + */ + AccessBridge.Update update(); + + /** + * The template for AccessBridge update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties, UpdateStages.WithIfMatch, + UpdateStages.WithIfNoneMatch { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AccessBridge apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AccessBridge apply(Context context); + } + + /** + * The AccessBridge update stages. + */ + interface UpdateStages { + /** + * The stage of the AccessBridge 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); + } + + /** + * The stage of the AccessBridge update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The list of the resource properties.. + * + * @param properties The list of the resource properties. + * @return the next definition stage. + */ + Update withProperties(AccessBridgePatchProperties properties); + } + + /** + * The stage of the AccessBridge update allowing to specify ifMatch. + */ + interface WithIfMatch { + /** + * Specifies the ifMatch property: The ETag of the transformation. Omit this value to always overwrite the + * current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent + * changes.. + * + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. + * Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @return the next definition stage. + */ + Update withIfMatch(String ifMatch); + } + + /** + * The stage of the AccessBridge update allowing to specify ifNoneMatch. + */ + interface WithIfNoneMatch { + /** + * Specifies the ifNoneMatch property: Set to '*' to allow a new record set to be created, but to prevent + * updating an existing resource. Other values will result in error from server as they are not supported.. + * + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an + * existing resource. Other values will result in error from server as they are not supported. + * @return the next definition stage. + */ + Update withIfNoneMatch(String ifNoneMatch); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AccessBridge refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AccessBridge refresh(Context context); +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeAllowedName.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeAllowedName.java new file mode 100644 index 000000000000..1a6061daf2a5 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeAllowedName.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.networkcloud.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The allowed names for the access bridge. + */ +public final class AccessBridgeAllowedName extends ExpandableStringEnum { + /** + * The access bridge for bare metal machine bastion access. + */ + public static final AccessBridgeAllowedName BASTION = fromString("Bastion"); + + /** + * The access bridge for cluster access to private vault. + */ + public static final AccessBridgeAllowedName PRIVATE_VAULT = fromString("PrivateVault"); + + /** + * The access bridge for access to the storage dashboard. + */ + public static final AccessBridgeAllowedName STORAGE_DASHBOARD = fromString("StorageDashboard"); + + /** + * Creates a new instance of AccessBridgeAllowedName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AccessBridgeAllowedName() { + } + + /** + * Creates or finds a AccessBridgeAllowedName from its string representation. + * + * @param name a name to look for. + * @return the corresponding AccessBridgeAllowedName. + */ + public static AccessBridgeAllowedName fromString(String name) { + return fromString(name, AccessBridgeAllowedName.class); + } + + /** + * Gets known AccessBridgeAllowedName values. + * + * @return known AccessBridgeAllowedName values. + */ + public static Collection values() { + return values(AccessBridgeAllowedName.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeDetailedStatus.java new file mode 100644 index 000000000000..d947c38b0170 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeDetailedStatus.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.networkcloud.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The detailed status reported by the access bridge. + */ +public final class AccessBridgeDetailedStatus extends ExpandableStringEnum { + /** + * The access bridge is healthy and operating normally. + */ + public static final AccessBridgeDetailedStatus RUNNING = fromString("Running"); + + /** + * The access bridge is experiencing degraded performance or partial outages. + */ + public static final AccessBridgeDetailedStatus DEGRADED = fromString("Degraded"); + + /** + * The access bridge is not operational. + */ + public static final AccessBridgeDetailedStatus FAILED = fromString("Failed"); + + /** + * Creates a new instance of AccessBridgeDetailedStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AccessBridgeDetailedStatus() { + } + + /** + * Creates or finds a AccessBridgeDetailedStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding AccessBridgeDetailedStatus. + */ + public static AccessBridgeDetailedStatus fromString(String name) { + return fromString(name, AccessBridgeDetailedStatus.class); + } + + /** + * Gets known AccessBridgeDetailedStatus values. + * + * @return known AccessBridgeDetailedStatus values. + */ + public static Collection values() { + return values(AccessBridgeDetailedStatus.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeEndpoint.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeEndpoint.java new file mode 100644 index 000000000000..1840efd90ba5 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeEndpoint.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.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; + +/** + * AccessBridgeEndpoint describes a single advertised service endpoint. + */ +@Immutable +public final class AccessBridgeEndpoint implements JsonSerializable { + /* + * The fully qualified domain name used to describe the certificate name for the endpoint. + */ + private String fqdn; + + /* + * The IPv4 address associated with the endpoint. + */ + private String ipv4Address; + + /* + * The IPv6 address associated with the endpoint. + */ + private String ipv6Address; + + /* + * The name that identifies the type of endpoint (for example VIP or host). + */ + private String name; + + /** + * Creates an instance of AccessBridgeEndpoint class. + */ + private AccessBridgeEndpoint() { + } + + /** + * Get the fqdn property: The fully qualified domain name used to describe the certificate name for the endpoint. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Get the ipv4Address property: The IPv4 address associated with the endpoint. + * + * @return the ipv4Address value. + */ + public String ipv4Address() { + return this.ipv4Address; + } + + /** + * Get the ipv6Address property: The IPv6 address associated with the endpoint. + * + * @return the ipv6Address value. + */ + public String ipv6Address() { + return this.ipv6Address; + } + + /** + * Get the name property: The name that identifies the type of endpoint (for example VIP or host). + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessBridgeEndpoint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessBridgeEndpoint 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 AccessBridgeEndpoint. + */ + public static AccessBridgeEndpoint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessBridgeEndpoint deserializedAccessBridgeEndpoint = new AccessBridgeEndpoint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("fqdn".equals(fieldName)) { + deserializedAccessBridgeEndpoint.fqdn = reader.getString(); + } else if ("ipv4Address".equals(fieldName)) { + deserializedAccessBridgeEndpoint.ipv4Address = reader.getString(); + } else if ("ipv6Address".equals(fieldName)) { + deserializedAccessBridgeEndpoint.ipv6Address = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedAccessBridgeEndpoint.name = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAccessBridgeEndpoint; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgePatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgePatchParameters.java new file mode 100644 index 000000000000..fafc624c8a35 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgePatchParameters.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.networkcloud.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; + +/** + * AccessBridgePatchParameters represents the payload for a PATCH request to an access bridge. + */ +@Fluent +public final class AccessBridgePatchParameters implements JsonSerializable { + /* + * The list of the resource properties. + */ + private AccessBridgePatchProperties properties; + + /* + * Resource tags. + */ + private Map tags; + + /** + * Creates an instance of AccessBridgePatchParameters class. + */ + public AccessBridgePatchParameters() { + } + + /** + * Get the properties property: The list of the resource properties. + * + * @return the properties value. + */ + public AccessBridgePatchProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The list of the resource properties. + * + * @param properties the properties value to set. + * @return the AccessBridgePatchParameters object itself. + */ + public AccessBridgePatchParameters withProperties(AccessBridgePatchProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 AccessBridgePatchParameters object itself. + */ + public AccessBridgePatchParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessBridgePatchParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessBridgePatchParameters 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 AccessBridgePatchParameters. + */ + public static AccessBridgePatchParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessBridgePatchParameters deserializedAccessBridgePatchParameters = new AccessBridgePatchParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedAccessBridgePatchParameters.properties = AccessBridgePatchProperties.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedAccessBridgePatchParameters.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedAccessBridgePatchParameters; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgePatchProperties.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgePatchProperties.java new file mode 100644 index 000000000000..5d4bde6c5205 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgePatchProperties.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.networkcloud.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; + +/** + * AccessBridgePatchProperties identifies the mutable properties for patch operations. + */ +@Fluent +public final class AccessBridgePatchProperties implements JsonSerializable { + /* + * The list of security rules enforced by the access bridge. + */ + private List securityRules; + + /** + * Creates an instance of AccessBridgePatchProperties class. + */ + public AccessBridgePatchProperties() { + } + + /** + * Get the securityRules property: The list of security rules enforced by the access bridge. + * + * @return the securityRules value. + */ + public List securityRules() { + return this.securityRules; + } + + /** + * Set the securityRules property: The list of security rules enforced by the access bridge. + * + * @param securityRules the securityRules value to set. + * @return the AccessBridgePatchProperties object itself. + */ + public AccessBridgePatchProperties withSecurityRules(List securityRules) { + this.securityRules = securityRules; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("securityRules", this.securityRules, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessBridgePatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessBridgePatchProperties 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 AccessBridgePatchProperties. + */ + public static AccessBridgePatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessBridgePatchProperties deserializedAccessBridgePatchProperties = new AccessBridgePatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("securityRules".equals(fieldName)) { + List securityRules + = reader.readArray(reader1 -> AccessBridgeSecurityRule.fromJson(reader1)); + deserializedAccessBridgePatchProperties.securityRules = securityRules; + } else { + reader.skipChildren(); + } + } + + return deserializedAccessBridgePatchProperties; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeProvisioningState.java new file mode 100644 index 000000000000..bbab95ce859a --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeProvisioningState.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.networkcloud.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The provisioning state of the access bridge. + */ +public final class AccessBridgeProvisioningState extends ExpandableStringEnum { + /** + * The Accepted status. + */ + public static final AccessBridgeProvisioningState ACCEPTED = fromString("Accepted"); + + /** + * The Canceled status. + */ + public static final AccessBridgeProvisioningState CANCELED = fromString("Canceled"); + + /** + * The Failed status. + */ + public static final AccessBridgeProvisioningState FAILED = fromString("Failed"); + + /** + * The Provisioning status. + */ + public static final AccessBridgeProvisioningState PROVISIONING = fromString("Provisioning"); + + /** + * The Succeeded status. + */ + public static final AccessBridgeProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Creates a new instance of AccessBridgeProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AccessBridgeProvisioningState() { + } + + /** + * Creates or finds a AccessBridgeProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding AccessBridgeProvisioningState. + */ + public static AccessBridgeProvisioningState fromString(String name) { + return fromString(name, AccessBridgeProvisioningState.class); + } + + /** + * Gets known AccessBridgeProvisioningState values. + * + * @return known AccessBridgeProvisioningState values. + */ + public static Collection values() { + return values(AccessBridgeProvisioningState.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeSecurityRule.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeSecurityRule.java new file mode 100644 index 000000000000..7a50c130cd20 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeSecurityRule.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.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; + +/** + * AccessBridgeSecurityRule captures an individual access rule enforced by the bridge. + */ +@Fluent +public final class AccessBridgeSecurityRule implements JsonSerializable { + /* + * The user provided value describing this rule. + */ + private String description; + + /* + * The direction of allowed network traffic based on the rule. + */ + private SecurityRuleDirection direction; + + /* + * The set of IPv4 addresses permitted as the source or destination of the security rule. For as single address, + * utilize a /32 (CIDR notation). One or both Ipv4Addresses and Ipv6Addresses must be specified. Example formats: + * 10.10.10.10-10.10.10.20 or 10.10.10.10/24. + */ + private List ipv4Addresses; + + /* + * The set of IPv6 addresses permitted as the source or destination of the security rule. For as single address, + * utilize a /128 (CIDR notation). One or both Ipv4Addresses and Ipv6Addresses must be specified. Example formats: + * 2001:db8:abcd::1-2001:db8:abcd::ff or 2001:db8:abcd::1/64. + */ + private List ipv6Addresses; + + /* + * The source or destination port or port range. Example 24562 or 24562-24570. + */ + private String port; + + /** + * Creates an instance of AccessBridgeSecurityRule class. + */ + public AccessBridgeSecurityRule() { + } + + /** + * Get the description property: The user provided value describing this rule. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The user provided value describing this rule. + * + * @param description the description value to set. + * @return the AccessBridgeSecurityRule object itself. + */ + public AccessBridgeSecurityRule withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the direction property: The direction of allowed network traffic based on the rule. + * + * @return the direction value. + */ + public SecurityRuleDirection direction() { + return this.direction; + } + + /** + * Set the direction property: The direction of allowed network traffic based on the rule. + * + * @param direction the direction value to set. + * @return the AccessBridgeSecurityRule object itself. + */ + public AccessBridgeSecurityRule withDirection(SecurityRuleDirection direction) { + this.direction = direction; + return this; + } + + /** + * Get the ipv4Addresses property: The set of IPv4 addresses permitted as the source or destination of the security + * rule. For as single address, utilize a /32 (CIDR notation). One or both Ipv4Addresses and Ipv6Addresses must be + * specified. Example formats: 10.10.10.10-10.10.10.20 or 10.10.10.10/24. + * + * @return the ipv4Addresses value. + */ + public List ipv4Addresses() { + return this.ipv4Addresses; + } + + /** + * Set the ipv4Addresses property: The set of IPv4 addresses permitted as the source or destination of the security + * rule. For as single address, utilize a /32 (CIDR notation). One or both Ipv4Addresses and Ipv6Addresses must be + * specified. Example formats: 10.10.10.10-10.10.10.20 or 10.10.10.10/24. + * + * @param ipv4Addresses the ipv4Addresses value to set. + * @return the AccessBridgeSecurityRule object itself. + */ + public AccessBridgeSecurityRule withIpv4Addresses(List ipv4Addresses) { + this.ipv4Addresses = ipv4Addresses; + return this; + } + + /** + * Get the ipv6Addresses property: The set of IPv6 addresses permitted as the source or destination of the security + * rule. For as single address, utilize a /128 (CIDR notation). One or both Ipv4Addresses and Ipv6Addresses must be + * specified. Example formats: 2001:db8:abcd::1-2001:db8:abcd::ff or 2001:db8:abcd::1/64. + * + * @return the ipv6Addresses value. + */ + public List ipv6Addresses() { + return this.ipv6Addresses; + } + + /** + * Set the ipv6Addresses property: The set of IPv6 addresses permitted as the source or destination of the security + * rule. For as single address, utilize a /128 (CIDR notation). One or both Ipv4Addresses and Ipv6Addresses must be + * specified. Example formats: 2001:db8:abcd::1-2001:db8:abcd::ff or 2001:db8:abcd::1/64. + * + * @param ipv6Addresses the ipv6Addresses value to set. + * @return the AccessBridgeSecurityRule object itself. + */ + public AccessBridgeSecurityRule withIpv6Addresses(List ipv6Addresses) { + this.ipv6Addresses = ipv6Addresses; + return this; + } + + /** + * Get the port property: The source or destination port or port range. Example 24562 or 24562-24570. + * + * @return the port value. + */ + public String port() { + return this.port; + } + + /** + * Set the port property: The source or destination port or port range. Example 24562 or 24562-24570. + * + * @param port the port value to set. + * @return the AccessBridgeSecurityRule object itself. + */ + public AccessBridgeSecurityRule withPort(String port) { + this.port = port; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("direction", this.direction == null ? null : this.direction.toString()); + jsonWriter.writeStringField("port", this.port); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeArrayField("ipv4Addresses", this.ipv4Addresses, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ipv6Addresses", this.ipv6Addresses, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessBridgeSecurityRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessBridgeSecurityRule 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 AccessBridgeSecurityRule. + */ + public static AccessBridgeSecurityRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessBridgeSecurityRule deserializedAccessBridgeSecurityRule = new AccessBridgeSecurityRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("direction".equals(fieldName)) { + deserializedAccessBridgeSecurityRule.direction + = SecurityRuleDirection.fromString(reader.getString()); + } else if ("port".equals(fieldName)) { + deserializedAccessBridgeSecurityRule.port = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedAccessBridgeSecurityRule.description = reader.getString(); + } else if ("ipv4Addresses".equals(fieldName)) { + List ipv4Addresses = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessBridgeSecurityRule.ipv4Addresses = ipv4Addresses; + } else if ("ipv6Addresses".equals(fieldName)) { + List ipv6Addresses = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessBridgeSecurityRule.ipv6Addresses = ipv6Addresses; + } else { + reader.skipChildren(); + } + } + + return deserializedAccessBridgeSecurityRule; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridges.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridges.java new file mode 100644 index 000000000000..9bb89de3217f --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridges.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.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 AccessBridges. + */ +public interface AccessBridges { + /** + * Get the properties of the provided access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @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 properties of the provided access bridge along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, + AccessBridgeAllowedName accessBridgeName, Context context); + + /** + * Get the properties of the provided access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the provided access bridge. + */ + AccessBridge getByResourceGroup(String resourceGroupName, AccessBridgeAllowedName accessBridgeName); + + /** + * Delete the specified access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, AccessBridgeAllowedName accessBridgeName); + + /** + * Delete the specified access bridge. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessBridgeName The name of the access bridge. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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, AccessBridgeAllowedName accessBridgeName, String ifMatch, String ifNoneMatch, + Context context); + + /** + * Get a list of access bridges in the provided resource group. + * + * @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 a list of access bridges in the provided resource group as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of access bridges in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 access bridges in the provided resource group as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); + + /** + * Get a list of access bridges in the provided subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of access bridges in the provided subscription as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Get a list of access bridges in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 access bridges in the provided subscription as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Integer top, String skipToken, Context context); + + /** + * Get the properties of the provided access bridge. + * + * @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 properties of the provided access bridge along with {@link Response}. + */ + AccessBridge getById(String id); + + /** + * Get the properties of the provided access bridge. + * + * @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 properties of the provided access bridge along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the specified access bridge. + * + * @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); + + /** + * Delete the specified access bridge. + * + * @param id the resource ID. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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, String ifMatch, String ifNoneMatch, Context context); + + /** + * Begins definition for a new AccessBridge resource. + * + * @param name resource name. + * @return the first stage of the new AccessBridge definition. + */ + AccessBridge.DefinitionStages.Blank define(AccessBridgeAllowedName name); +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ActionState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ActionState.java index fe3debfd26c5..169cf684e3dc 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ActionState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ActionState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -58,7 +58,7 @@ public final class ActionState implements JsonSerializable { /** * Creates an instance of ActionState class. */ - public ActionState() { + private ActionState() { } /** @@ -128,17 +128,6 @@ public List stepStates() { return this.stepStates; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (stepStates() != null) { - stepStates().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ActionStateStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ActionStateStatus.java index a330fd1cdcb0..3e44f263dccd 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ActionStateStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ActionStateStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,17 +12,17 @@ */ public final class ActionStateStatus extends ExpandableStringEnum { /** - * Static value Completed for ActionStateStatus. + * The completed status. */ public static final ActionStateStatus COMPLETED = fromString("Completed"); /** - * Static value InProgress for ActionStateStatus. + * The in-progress status. */ public static final ActionStateStatus IN_PROGRESS = fromString("InProgress"); /** - * Static value Failed for ActionStateStatus. + * The failed status. */ public static final ActionStateStatus FAILED = fromString("Failed"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ActionType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ActionType.java index 29d42ef3dad3..26981344a88a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ActionType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -8,11 +8,11 @@ import java.util.Collection; /** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ public final class ActionType extends ExpandableStringEnum { /** - * Static value Internal for ActionType. + * Actions are for internal-only APIs. */ public static final ActionType INTERNAL = fromString("Internal"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AdministrativeCredentials.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AdministrativeCredentials.java index 2bc9d801c019..927acefa672a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AdministrativeCredentials.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AdministrativeCredentials.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -73,26 +72,6 @@ public AdministrativeCredentials withUsername(String username) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (password() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property password in model AdministrativeCredentials")); - } - if (username() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property username in model AdministrativeCredentials")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AdministrativeCredentials.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AdministratorConfiguration.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AdministratorConfiguration.java index cac48d15c23a..cd4ba3826951 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AdministratorConfiguration.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AdministratorConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -80,17 +80,6 @@ public AdministratorConfiguration withSshPublicKeys(List sshPublic return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sshPublicKeys() != null) { - sshPublicKeys().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AdministratorConfigurationPatch.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AdministratorConfigurationPatch.java index 6194969fb69c..6caed9557ee4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AdministratorConfigurationPatch.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AdministratorConfigurationPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -50,17 +50,6 @@ public AdministratorConfigurationPatch withSshPublicKeys(List sshP return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sshPublicKeys() != null) { - sshPublicKeys().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AdvertiseToFabric.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AdvertiseToFabric.java index 666a18ad793c..fc48828f6b89 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AdvertiseToFabric.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AdvertiseToFabric.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,12 +13,12 @@ */ public final class AdvertiseToFabric extends ExpandableStringEnum { /** - * Static value True for AdvertiseToFabric. + * Advertise to fabric. */ public static final AdvertiseToFabric TRUE = fromString("True"); /** - * Static value False for AdvertiseToFabric. + * Do not advertise to fabric. */ public static final AdvertiseToFabric FALSE = fromString("False"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentOptions.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentOptions.java index ccdb72834bac..e8bd8fe9c79e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentOptions.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentOptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -72,14 +72,6 @@ public AgentOptions withHugepagesSize(HugepagesSize hugepagesSize) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPool.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPool.java index 643a19950890..b84de8d6b2f8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPool.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPool.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -51,14 +51,17 @@ public interface AgentPool { Map tags(); /** - * Gets the etag property: Resource ETag. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ String etag(); /** - * Gets the extendedLocation property: The extended location of the cluster associated with the resource. + * Gets the extendedLocation property: The extendedLocation property. * * @return the extendedLocation value. */ @@ -109,27 +112,6 @@ public interface AgentPool { */ long count(); - /** - * Gets the detailedStatus property: The current status of the agent pool. - * - * @return the detailedStatus value. - */ - AgentPoolDetailedStatus detailedStatus(); - - /** - * Gets the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - String detailedStatusMessage(); - - /** - * Gets the kubernetesVersion property: The Kubernetes version running in this agent pool. - * - * @return the kubernetesVersion value. - */ - String kubernetesVersion(); - /** * Gets the labels property: The labels applied to the nodes in this agent pool. * @@ -146,13 +128,6 @@ public interface AgentPool { */ AgentPoolMode mode(); - /** - * Gets the provisioningState property: The provisioning state of the agent pool. - * - * @return the provisioningState value. - */ - AgentPoolProvisioningState provisioningState(); - /** * Gets the taints property: The taints applied to the nodes in this agent pool. * @@ -174,6 +149,34 @@ public interface AgentPool { */ String vmSkuName(); + /** + * Gets the detailedStatus property: The current status of the agent pool. + * + * @return the detailedStatus value. + */ + AgentPoolDetailedStatus detailedStatus(); + + /** + * Gets the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + String detailedStatusMessage(); + + /** + * Gets the kubernetesVersion property: The Kubernetes version running in this agent pool. + * + * @return the kubernetesVersion value. + */ + String kubernetesVersion(); + + /** + * Gets the provisioningState property: The provisioning state of the agent pool. + * + * @return the provisioningState value. + */ + AgentPoolProvisioningState provisioningState(); + /** * Gets the region of the resource. * @@ -344,10 +347,9 @@ interface WithTags { */ interface WithExtendedLocation { /** - * Specifies the extendedLocation property: The extended location of the cluster associated with the - * resource.. + * Specifies the extendedLocation property: The extendedLocation property.. * - * @param extendedLocation The extended location of the cluster associated with the resource. + * @param extendedLocation The extendedLocation property. * @return the next definition stage. */ WithCreate withExtendedLocation(ExtendedLocation extendedLocation); @@ -521,9 +523,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: The Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags.. * - * @param tags The Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolDetailedStatus.java index 9fe2df6cac5c..c16e6a758331 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,17 +12,17 @@ */ public final class AgentPoolDetailedStatus extends ExpandableStringEnum { /** - * Static value Available for AgentPoolDetailedStatus. + * The Available status. */ public static final AgentPoolDetailedStatus AVAILABLE = fromString("Available"); /** - * Static value Error for AgentPoolDetailedStatus. + * The Error status. */ public static final AgentPoolDetailedStatus ERROR = fromString("Error"); /** - * Static value Provisioning for AgentPoolDetailedStatus. + * The Provisioning status. */ public static final AgentPoolDetailedStatus PROVISIONING = fromString("Provisioning"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolMode.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolMode.java index 47fb80793b21..bef94d25b3f5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolMode.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -14,17 +14,17 @@ */ public final class AgentPoolMode extends ExpandableStringEnum { /** - * Static value System for AgentPoolMode. + * System agent pool. */ public static final AgentPoolMode SYSTEM = fromString("System"); /** - * Static value User for AgentPoolMode. + * User agent pool. */ public static final AgentPoolMode USER = fromString("User"); /** - * Static value NotApplicable for AgentPoolMode. + * Not applicable. */ public static final AgentPoolMode NOT_APPLICABLE = fromString("NotApplicable"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolPatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolPatchParameters.java index 93682c120aa0..8d693c3a5671 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolPatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolPatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -24,7 +24,7 @@ public final class AgentPoolPatchParameters implements JsonSerializable tags; @@ -44,7 +44,7 @@ private AgentPoolPatchProperties innerProperties() { } /** - * Get the tags property: The Azure resource tags that will replace the existing ones. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -53,7 +53,7 @@ public Map tags() { } /** - * Set the tags property: The Azure resource tags that will replace the existing ones. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the AgentPoolPatchParameters object itself. @@ -135,17 +135,6 @@ public AgentPoolPatchParameters withUpgradeSettings(AgentPoolUpgradeSettings upg return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolProvisioningState.java index 025d7f4cea76..ba95d6186bf4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolProvisioningState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,37 +12,37 @@ */ public final class AgentPoolProvisioningState extends ExpandableStringEnum { /** - * Static value Accepted for AgentPoolProvisioningState. + * The Accepted status. */ public static final AgentPoolProvisioningState ACCEPTED = fromString("Accepted"); /** - * Static value Canceled for AgentPoolProvisioningState. + * The Canceled status. */ public static final AgentPoolProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Deleting for AgentPoolProvisioningState. + * The Deleting status. */ public static final AgentPoolProvisioningState DELETING = fromString("Deleting"); /** - * Static value Failed for AgentPoolProvisioningState. + * The Failed status. */ public static final AgentPoolProvisioningState FAILED = fromString("Failed"); /** - * Static value InProgress for AgentPoolProvisioningState. + * The InProgress status. */ public static final AgentPoolProvisioningState IN_PROGRESS = fromString("InProgress"); /** - * Static value Succeeded for AgentPoolProvisioningState. + * The Succeeded status. */ public static final AgentPoolProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Updating for AgentPoolProvisioningState. + * The Updating status. */ public static final AgentPoolProvisioningState UPDATING = fromString("Updating"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolUpgradeSettings.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolUpgradeSettings.java index aa6d8de3eec3..6a0f5a0eef6a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolUpgradeSettings.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolUpgradeSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -122,14 +122,6 @@ public AgentPoolUpgradeSettings withMaxUnavailable(String maxUnavailable) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPools.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPools.java index bcbcef66bd80..2da41285162d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPools.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPools.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,111 +13,95 @@ */ public interface AgentPools { /** - * List agent pools of the Kubernetes cluster. - * - * Get a list of agent pools for the provided Kubernetes cluster. + * Get properties of the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param agentPoolName The name of the Kubernetes cluster agent pool. + * @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 agent pools for the provided Kubernetes cluster as paginated response with - * {@link PagedIterable}. + * @return properties of the provided Kubernetes cluster agent pool along with {@link Response}. */ - PagedIterable listByKubernetesCluster(String resourceGroupName, String kubernetesClusterName); + Response getWithResponse(String resourceGroupName, String kubernetesClusterName, String agentPoolName, + Context context); /** - * List agent pools of the Kubernetes cluster. - * - * Get a list of agent pools for the provided Kubernetes cluster. + * Get properties of the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param agentPoolName The name of the Kubernetes cluster agent pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 agent pools for the provided Kubernetes cluster as paginated response with - * {@link PagedIterable}. + * @return properties of the provided Kubernetes cluster agent pool. */ - PagedIterable listByKubernetesCluster(String resourceGroupName, String kubernetesClusterName, - Integer top, String skipToken, Context context); + AgentPool get(String resourceGroupName, String kubernetesClusterName, String agentPoolName); /** - * Retrieve the Kubernetes cluster agent pool. - * - * Get properties of the provided Kubernetes cluster agent pool. + * Delete the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. * @param agentPoolName The name of the Kubernetes cluster agent pool. - * @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 properties of the provided Kubernetes cluster agent pool along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String kubernetesClusterName, String agentPoolName, - Context context); + void delete(String resourceGroupName, String kubernetesClusterName, String agentPoolName); /** - * Retrieve the Kubernetes cluster agent pool. - * - * Get properties of the provided Kubernetes cluster agent pool. + * Delete the provided Kubernetes cluster agent pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. * @param agentPoolName The name of the Kubernetes cluster agent pool. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 properties of the provided Kubernetes cluster agent pool. */ - AgentPool get(String resourceGroupName, String kubernetesClusterName, String agentPoolName); + void delete(String resourceGroupName, String kubernetesClusterName, String agentPoolName, String ifMatch, + String ifNoneMatch, Context context); /** - * Delete the Kubernetes cluster agent pool. - * - * Delete the provided Kubernetes cluster agent pool. + * Get a list of agent pools for the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param agentPoolName The name of the Kubernetes cluster agent pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a list of agent pools for the provided Kubernetes cluster as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String kubernetesClusterName, String agentPoolName); + PagedIterable listByKubernetesCluster(String resourceGroupName, String kubernetesClusterName); /** - * Delete the Kubernetes cluster agent pool. - * - * Delete the provided Kubernetes cluster agent pool. + * Get a list of agent pools for the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param agentPoolName The name of the Kubernetes cluster agent pool. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of agent pools for the provided Kubernetes cluster as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String kubernetesClusterName, String agentPoolName, - String ifMatch, String ifNoneMatch, Context context); + PagedIterable listByKubernetesCluster(String resourceGroupName, String kubernetesClusterName, + Integer top, String skipToken, Context context); /** - * Retrieve the Kubernetes cluster agent pool. - * * Get properties of the provided Kubernetes cluster agent pool. * * @param id the resource ID. @@ -129,8 +113,6 @@ OperationStatusResult delete(String resourceGroupName, String kubernetesClusterN AgentPool getById(String id); /** - * Retrieve the Kubernetes cluster agent pool. - * * Get properties of the provided Kubernetes cluster agent pool. * * @param id the resource ID. @@ -143,21 +125,16 @@ OperationStatusResult delete(String resourceGroupName, String kubernetesClusterN Response getByIdWithResponse(String id, Context context); /** - * Delete the Kubernetes cluster agent pool. - * * Delete the provided Kubernetes cluster agent pool. * * @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 current status of an async operation. */ - OperationStatusResult deleteById(String id); + void deleteById(String id); /** - * Delete the Kubernetes cluster agent pool. - * * Delete the provided Kubernetes cluster agent pool. * * @param id the resource ID. @@ -169,9 +146,8 @@ OperationStatusResult delete(String resourceGroupName, String kubernetesClusterN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); + void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); /** * Begins definition for a new AgentPool resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AnalyticsOutputSettings.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AnalyticsOutputSettings.java index 280c5bf6a4fd..4755a98b6024 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AnalyticsOutputSettings.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AnalyticsOutputSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -78,17 +78,6 @@ public AnalyticsOutputSettings withAssociatedIdentity(IdentitySelector associate return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (associatedIdentity() != null) { - associatedIdentity().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AttachedNetworkConfiguration.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AttachedNetworkConfiguration.java index 5f261713b79e..1895c3d118ec 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AttachedNetworkConfiguration.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AttachedNetworkConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -99,23 +99,6 @@ public List trunkedNetworks() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (l2Networks() != null) { - l2Networks().forEach(e -> e.validate()); - } - if (l3Networks() != null) { - l3Networks().forEach(e -> e.validate()); - } - if (trunkedNetworks() != null) { - trunkedNetworks().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AvailabilityLifecycle.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AvailabilityLifecycle.java index 85432d4e5985..22b4a0d4995e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AvailabilityLifecycle.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AvailabilityLifecycle.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class AvailabilityLifecycle extends ExpandableStringEnum { /** - * Static value Preview for AvailabilityLifecycle. + * Preview availability. */ public static final AvailabilityLifecycle PREVIEW = fromString("Preview"); /** - * Static value GenerallyAvailable for AvailabilityLifecycle. + * Generally available. */ public static final AvailabilityLifecycle GENERALLY_AVAILABLE = fromString("GenerallyAvailable"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AvailableUpgrade.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AvailableUpgrade.java index 03ba1e29378c..4ed7ca75d785 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AvailableUpgrade.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/AvailableUpgrade.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -29,7 +29,7 @@ public final class AvailableUpgrade implements JsonSerializable tags(); /** - * Gets the etag property: Resource ETag. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ String etag(); /** - * Gets the extendedLocation property: The extended location of the cluster associated with the resource. + * Gets the extendedLocation property: The extended location of the resource. This property is required when + * creating the resource. * * @return the extendedLocation value. */ @@ -71,22 +75,6 @@ public interface BareMetalMachine { */ SystemData systemData(); - /** - * Gets the actionStates property: The current state of any in progress or completed actions. The most recent known - * instance of each action type is shown. - * - * @return the actionStates value. - */ - List actionStates(); - - /** - * Gets the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources - * that have attached this network. - * - * @return the associatedResourceIds value. - */ - List associatedResourceIds(); - /** * Gets the bmcConnectionString property: The connection string for the baseboard management controller including IP * address and protocol. @@ -117,6 +105,79 @@ public interface BareMetalMachine { */ String bootMacAddress(); + /** + * Gets the machineDetails property: The custom details provided by the customer. + * + * @return the machineDetails value. + */ + String machineDetails(); + + /** + * Gets the machineName property: The OS-level hostname assigned to this machine. + * + * @return the machineName value. + */ + String machineName(); + + /** + * Gets the machineSkuId property: The unique internal identifier of the bare metal machine SKU. + * + * @return the machineSkuId value. + */ + String machineSkuId(); + + /** + * Gets the rackId property: The resource ID of the rack where this bare metal machine resides. + * + * @return the rackId value. + */ + String rackId(); + + /** + * Gets the rackSlot property: The rack slot in which this bare metal machine is located, ordered from the bottom up + * i.e. the lowest slot is 1. + * + * @return the rackSlot value. + */ + long rackSlot(); + + /** + * Gets the serialNumber property: The serial number of the bare metal machine. + * + * @return the serialNumber value. + */ + String serialNumber(); + + /** + * Gets the actionStates property: The current state of any in progress or completed actions. The most recent known + * instance of each action type is shown. + * + * @return the actionStates value. + */ + List actionStates(); + + /** + * Gets the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources + * that have attached this network. + * + * @return the associatedResourceIds value. + */ + List associatedResourceIds(); + + /** + * Gets the bmcIpv4Address property: The IPv4 address of the BMC interface for the bare metal machine. + * + * @return the bmcIpv4Address value. + */ + String bmcIpv4Address(); + + /** + * Gets the bmcIpv6Address property: The IPv6 address of the BMC interface for the bare metal machine. + * + * @return the bmcIpv6Address value. + */ + String bmcIpv6Address(); + /** * Gets the caCertificate property: The CA certificate information issued by the platform for connecting to TLS * interfaces for the bare metal machine. Callers add this certificate to the trusted CA store on the Kubernetes @@ -201,20 +262,6 @@ public interface BareMetalMachine { */ String machineClusterVersion(); - /** - * Gets the machineDetails property: The custom details provided by the customer. - * - * @return the machineDetails value. - */ - String machineDetails(); - - /** - * Gets the machineName property: The OS-level hostname assigned to this machine. - * - * @return the machineName value. - */ - String machineName(); - /** * Gets the machineRoles property: The list of roles that are assigned to the cluster node running on this machine. * @@ -223,11 +270,11 @@ public interface BareMetalMachine { List machineRoles(); /** - * Gets the machineSkuId property: The unique internal identifier of the bare metal machine SKU. + * Gets the monitoringConfigurationStatus property: The monitoring configuration status of the bare metal machine. * - * @return the machineSkuId value. + * @return the monitoringConfigurationStatus value. */ - String machineSkuId(); + BareMetalMachineMonitoringConfigurationStatus monitoringConfigurationStatus(); /** * Gets the oamIpv4Address property: The IPv4 address that is assigned to the bare metal machine during the cluster @@ -259,28 +306,6 @@ public interface BareMetalMachine { */ BareMetalMachinePowerState powerState(); - /** - * Gets the provisioningState property: The provisioning state of the bare metal machine. - * - * @return the provisioningState value. - */ - BareMetalMachineProvisioningState provisioningState(); - - /** - * Gets the rackId property: The resource ID of the rack where this bare metal machine resides. - * - * @return the rackId value. - */ - String rackId(); - - /** - * Gets the rackSlot property: The rack slot in which this bare metal machine is located, ordered from the bottom up - * i.e. the lowest slot is 1. - * - * @return the rackSlot value. - */ - long rackSlot(); - /** * Gets the readyState property: The indicator of whether the bare metal machine is ready to receive workloads. * @@ -302,13 +327,6 @@ public interface BareMetalMachine { */ List secretRotationStatus(); - /** - * Gets the serialNumber property: The serial number of the bare metal machine. - * - * @return the serialNumber value. - */ - String serialNumber(); - /** * Gets the serviceTag property: The discovered value of the machine's service tag. * @@ -324,6 +342,13 @@ public interface BareMetalMachine { */ List virtualMachinesAssociatedIds(); + /** + * Gets the provisioningState property: The provisioning state of the bare metal machine. + * + * @return the provisioningState value. + */ + BareMetalMachineProvisioningState provisioningState(); + /** * Gets the region of the resource. * @@ -412,10 +437,11 @@ interface WithResourceGroup { */ interface WithExtendedLocation { /** - * Specifies the extendedLocation property: The extended location of the cluster associated with the - * resource.. + * Specifies the extendedLocation property: The extended location of the resource. This property is required + * when creating the resource.. * - * @param extendedLocation The extended location of the cluster associated with the resource. + * @param extendedLocation The extended location of the resource. This property is required when creating + * the resource. * @return the next definition stage. */ WithBmcConnectionString withExtendedLocation(ExtendedLocation extendedLocation); @@ -675,9 +701,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: The Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags.. * - * @param tags The Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); @@ -746,19 +772,15 @@ interface WithIfNoneMatch { BareMetalMachine refresh(Context context); /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult cordon(); /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @param bareMetalMachineCordonParameters The request body. @@ -766,24 +788,20 @@ interface WithIfNoneMatch { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult cordon(BareMetalMachineCordonParameters bareMetalMachineCordonParameters, Context context); /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult powerOff(); /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param bareMetalMachinePowerOffParameters The request body. @@ -791,49 +809,42 @@ interface WithIfNoneMatch { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult powerOff(BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters, Context context); /** - * Reimage the bare metal machine. - * * Reimage the provided bare metal machine. * * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult reimage(); /** - * Reimage the bare metal machine. - * * Reimage the provided bare metal machine. * + * @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. + * @return the response. */ - OperationStatusResult reimage(Context context); + OperationStatusResult reimage(BareMetalMachineReimageParameters body, Context context); /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult replace(); /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param bareMetalMachineReplaceParameters The request body. @@ -841,37 +852,31 @@ OperationStatusResult powerOff(BareMetalMachinePowerOffParameters bareMetalMachi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult replace(BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters, Context context); /** - * Restart the bare metal machine. - * * Restart the provided bare metal machine. * * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult restart(); /** - * Restart the bare metal machine. - * * Restart the provided bare metal machine. * * @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. + * @return the response. */ OperationStatusResult restart(Context context); /** - * Run the command on the bare metal machine. - * * Run the command or the script on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -879,13 +884,11 @@ OperationStatusResult powerOff(BareMetalMachinePowerOffParameters bareMetalMachi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runCommand(BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters); /** - * Run the command on the bare metal machine. - * * Run the command or the script on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -894,14 +897,12 @@ OperationStatusResult powerOff(BareMetalMachinePowerOffParameters bareMetalMachi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runCommand(BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters, Context context); /** - * Run data extraction for a bare metal machine. - * * Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -909,14 +910,12 @@ OperationStatusResult runCommand(BareMetalMachineRunCommandParameters bareMetalM * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runDataExtracts(BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters); /** - * Run data extraction for a bare metal machine. - * * Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -925,14 +924,12 @@ OperationStatusResult runCommand(BareMetalMachineRunCommandParameters bareMetalM * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runDataExtracts( BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters, Context context); /** - * Run restricted data extraction for a bare metal machine. - * * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with * the command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -941,14 +938,12 @@ OperationStatusResult runDataExtracts( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runDataExtractsRestricted( BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters); /** - * Run restricted data extraction for a bare metal machine. - * * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with * the command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -958,14 +953,12 @@ OperationStatusResult runDataExtractsRestricted( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runDataExtractsRestricted( BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters, Context context); /** - * Run read-only commands against a bare metal machine. - * * Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the * command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -974,14 +967,12 @@ OperationStatusResult runDataExtractsRestricted( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runReadCommands(BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters); /** - * Run read-only commands against a bare metal machine. - * * Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the * command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -991,56 +982,48 @@ OperationStatusResult runDataExtractsRestricted( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runReadCommands( BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters, Context context); /** - * Start the bare metal machine. - * * Start the provided bare metal machine. * * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult start(); /** - * Start the bare metal machine. - * * Start the provided bare metal machine. * * @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. + * @return the response. */ OperationStatusResult start(Context context); /** - * Uncordon the bare metal machine. - * * Uncordon the provided bare metal machine's Kubernetes node. * * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult uncordon(); /** - * Uncordon the bare metal machine. - * * Uncordon the provided bare metal machine's Kubernetes node. * * @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. + * @return the response. */ OperationStatusResult uncordon(Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineCommandSpecification.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineCommandSpecification.java index 75789825cb72..73dc1f59c991 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineCommandSpecification.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineCommandSpecification.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -78,21 +77,6 @@ public BareMetalMachineCommandSpecification withCommand(String command) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (command() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property command in model BareMetalMachineCommandSpecification")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BareMetalMachineCommandSpecification.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineConfigurationData.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineConfigurationData.java index ae537ebba8ab..9c60e10dcbb8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineConfigurationData.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineConfigurationData.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -226,38 +225,6 @@ public BareMetalMachineConfigurationData withSerialNumber(String serialNumber) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (bmcCredentials() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property bmcCredentials in model BareMetalMachineConfigurationData")); - } else { - bmcCredentials().validate(); - } - if (bmcMacAddress() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property bmcMacAddress in model BareMetalMachineConfigurationData")); - } - if (bootMacAddress() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property bootMacAddress in model BareMetalMachineConfigurationData")); - } - if (serialNumber() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property serialNumber in model BareMetalMachineConfigurationData")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BareMetalMachineConfigurationData.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineCordonParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineCordonParameters.java index 163bd98f5c6f..e70c4712c52a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineCordonParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineCordonParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -50,14 +50,6 @@ public BareMetalMachineCordonParameters withEvacuate(BareMetalMachineEvacuate ev return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineCordonStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineCordonStatus.java index 4a77fbe91c38..a23be36cbb74 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineCordonStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineCordonStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class BareMetalMachineCordonStatus extends ExpandableStringEnum { /** - * Static value Cordoned for BareMetalMachineCordonStatus. + * The bare metal machine is cordoned. */ public static final BareMetalMachineCordonStatus CORDONED = fromString("Cordoned"); /** - * Static value Uncordoned for BareMetalMachineCordonStatus. + * The bare metal machine is uncordoned. */ public static final BareMetalMachineCordonStatus UNCORDONED = fromString("Uncordoned"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineDetailedStatus.java index 890d042dab5b..25a03101a2fb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,32 +12,32 @@ */ public final class BareMetalMachineDetailedStatus extends ExpandableStringEnum { /** - * Static value Preparing for BareMetalMachineDetailedStatus. + * The Preparing status. */ public static final BareMetalMachineDetailedStatus PREPARING = fromString("Preparing"); /** - * Static value Error for BareMetalMachineDetailedStatus. + * The Error status. */ public static final BareMetalMachineDetailedStatus ERROR = fromString("Error"); /** - * Static value Available for BareMetalMachineDetailedStatus. + * The Available status. */ public static final BareMetalMachineDetailedStatus AVAILABLE = fromString("Available"); /** - * Static value Provisioning for BareMetalMachineDetailedStatus. + * The Provisioning status. */ public static final BareMetalMachineDetailedStatus PROVISIONING = fromString("Provisioning"); /** - * Static value Provisioned for BareMetalMachineDetailedStatus. + * The Provisioned status. */ public static final BareMetalMachineDetailedStatus PROVISIONED = fromString("Provisioned"); /** - * Static value Deprovisioning for BareMetalMachineDetailedStatus. + * The Deprovisioning status. */ public static final BareMetalMachineDetailedStatus DEPROVISIONING = fromString("Deprovisioning"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineEvacuate.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineEvacuate.java index fa3b1f4cd16a..4f45a59a0c90 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineEvacuate.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineEvacuate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class BareMetalMachineEvacuate extends ExpandableStringEnum { /** - * Static value True for BareMetalMachineEvacuate. + * Evacuate workloads from the node when the bare metal machine is cordoned. */ public static final BareMetalMachineEvacuate TRUE = fromString("True"); /** - * Static value False for BareMetalMachineEvacuate. + * Do not evacuate workloads from the node when the bare metal machine is cordoned. */ public static final BareMetalMachineEvacuate FALSE = fromString("False"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineHardwareValidationResult.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineHardwareValidationResult.java index 09226d4d752f..44b232e3e91f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineHardwareValidationResult.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineHardwareValidationResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,12 +13,12 @@ public final class BareMetalMachineHardwareValidationResult extends ExpandableStringEnum { /** - * Static value Pass for BareMetalMachineHardwareValidationResult. + * The hardware validation passed. */ public static final BareMetalMachineHardwareValidationResult PASS = fromString("Pass"); /** - * Static value Fail for BareMetalMachineHardwareValidationResult. + * The hardware validation failed. */ public static final BareMetalMachineHardwareValidationResult FAIL = fromString("Fail"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySet.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySet.java index dc3c004d3cff..5aa8bd7dca62 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySet.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySet.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -52,14 +52,18 @@ public interface BareMetalMachineKeySet { Map tags(); /** - * Gets the etag property: Resource ETag. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ String etag(); /** - * Gets the extendedLocation property: The extended location of the cluster associated with the resource. + * Gets the extendedLocation property: The extended location of the resource. This property is required when + * creating the resource. * * @return the extendedLocation value. */ @@ -80,20 +84,6 @@ public interface BareMetalMachineKeySet { */ String azureGroupId(); - /** - * Gets the detailedStatus property: The more detailed status of the key set. - * - * @return the detailedStatus value. - */ - BareMetalMachineKeySetDetailedStatus detailedStatus(); - - /** - * Gets the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - String detailedStatusMessage(); - /** * Gets the expiration property: The date and time after which the users in this key set will be removed from the * bare metal machines. @@ -110,13 +100,6 @@ public interface BareMetalMachineKeySet { */ List jumpHostsAllowed(); - /** - * Gets the lastValidation property: The last time this key set was validated. - * - * @return the lastValidation value. - */ - OffsetDateTime lastValidation(); - /** * Gets the osGroupName property: The name of the group that users will be assigned to on the operating system of * the machines. @@ -141,18 +124,32 @@ public interface BareMetalMachineKeySet { String privilegeLevelName(); /** - * Gets the provisioningState property: The provisioning state of the bare metal machine key set. + * Gets the userList property: The unique list of permitted users. * - * @return the provisioningState value. + * @return the userList value. */ - BareMetalMachineKeySetProvisioningState provisioningState(); + List userList(); /** - * Gets the userList property: The unique list of permitted users. + * Gets the detailedStatus property: The more detailed status of the key set. * - * @return the userList value. + * @return the detailedStatus value. */ - List userList(); + BareMetalMachineKeySetDetailedStatus detailedStatus(); + + /** + * Gets the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + String detailedStatusMessage(); + + /** + * Gets the lastValidation property: The last time this key set was validated. + * + * @return the lastValidation value. + */ + OffsetDateTime lastValidation(); /** * Gets the userListStatus property: The status evaluation of each user. @@ -161,6 +158,13 @@ public interface BareMetalMachineKeySet { */ List userListStatus(); + /** + * Gets the provisioningState property: The provisioning state of the bare metal machine key set. + * + * @return the provisioningState value. + */ + BareMetalMachineKeySetProvisioningState provisioningState(); + /** * Gets the region of the resource. * @@ -248,10 +252,11 @@ interface WithParentResource { */ interface WithExtendedLocation { /** - * Specifies the extendedLocation property: The extended location of the cluster associated with the - * resource.. + * Specifies the extendedLocation property: The extended location of the resource. This property is required + * when creating the resource.. * - * @param extendedLocation The extended location of the cluster associated with the resource. + * @param extendedLocation The extended location of the resource. This property is required when creating + * the resource. * @return the next definition stage. */ WithAzureGroupId withExtendedLocation(ExtendedLocation extendedLocation); @@ -461,9 +466,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: The Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags.. * - * @param tags The Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetDetailedStatus.java index 5c816c0483b5..2f2c0669c6c4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,22 +13,22 @@ public final class BareMetalMachineKeySetDetailedStatus extends ExpandableStringEnum { /** - * Static value AllActive for BareMetalMachineKeySetDetailedStatus. + * All users in the key set are active. */ public static final BareMetalMachineKeySetDetailedStatus ALL_ACTIVE = fromString("AllActive"); /** - * Static value SomeInvalid for BareMetalMachineKeySetDetailedStatus. + * Some users in the key set are invalid. */ public static final BareMetalMachineKeySetDetailedStatus SOME_INVALID = fromString("SomeInvalid"); /** - * Static value AllInvalid for BareMetalMachineKeySetDetailedStatus. + * All users in the key set are invalid. */ public static final BareMetalMachineKeySetDetailedStatus ALL_INVALID = fromString("AllInvalid"); /** - * Static value Validating for BareMetalMachineKeySetDetailedStatus. + * Key set is being validated. */ public static final BareMetalMachineKeySetDetailedStatus VALIDATING = fromString("Validating"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetPatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetPatchParameters.java index 3101203dcc4e..2034537e0ab7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetPatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetPatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -27,7 +27,7 @@ public final class BareMetalMachineKeySetPatchParameters private BareMetalMachineKeySetPatchProperties innerProperties; /* - * The Azure resource tags that will replace the existing ones. + * Resource tags. */ private Map tags; @@ -47,7 +47,7 @@ private BareMetalMachineKeySetPatchProperties innerProperties() { } /** - * Get the tags property: The Azure resource tags that will replace the existing ones. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -56,7 +56,7 @@ public Map tags() { } /** - * Set the tags property: The Azure resource tags that will replace the existing ones. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the BareMetalMachineKeySetPatchParameters object itself. @@ -139,17 +139,6 @@ public BareMetalMachineKeySetPatchParameters withUserList(List userL return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetPrivilegeLevel.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetPrivilegeLevel.java index 6d96382c56f0..a8fec6060269 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetPrivilegeLevel.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetPrivilegeLevel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,17 +13,17 @@ public final class BareMetalMachineKeySetPrivilegeLevel extends ExpandableStringEnum { /** - * Static value Standard for BareMetalMachineKeySetPrivilegeLevel. + * Standard access level. */ public static final BareMetalMachineKeySetPrivilegeLevel STANDARD = fromString("Standard"); /** - * Static value Superuser for BareMetalMachineKeySetPrivilegeLevel. + * Superuser access level. */ public static final BareMetalMachineKeySetPrivilegeLevel SUPERUSER = fromString("Superuser"); /** - * Static value Other for BareMetalMachineKeySetPrivilegeLevel. + * Other access level. */ public static final BareMetalMachineKeySetPrivilegeLevel OTHER = fromString("Other"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetProvisioningState.java index ad325c06daa5..6424f1c2273c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetProvisioningState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,27 +13,27 @@ public final class BareMetalMachineKeySetProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for BareMetalMachineKeySetProvisioningState. + * The Succeeded status. */ public static final BareMetalMachineKeySetProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for BareMetalMachineKeySetProvisioningState. + * The Failed status. */ public static final BareMetalMachineKeySetProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for BareMetalMachineKeySetProvisioningState. + * The Canceled status. */ public static final BareMetalMachineKeySetProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Accepted for BareMetalMachineKeySetProvisioningState. + * The Accepted status. */ public static final BareMetalMachineKeySetProvisioningState ACCEPTED = fromString("Accepted"); /** - * Static value Provisioning for BareMetalMachineKeySetProvisioningState. + * The Provisioning status. */ public static final BareMetalMachineKeySetProvisioningState PROVISIONING = fromString("Provisioning"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetUserSetupStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetUserSetupStatus.java index 6143cfb163f1..9da1433e9fde 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetUserSetupStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetUserSetupStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,12 +13,12 @@ public final class BareMetalMachineKeySetUserSetupStatus extends ExpandableStringEnum { /** - * Static value Active for BareMetalMachineKeySetUserSetupStatus. + * The user is currently active. */ public static final BareMetalMachineKeySetUserSetupStatus ACTIVE = fromString("Active"); /** - * Static value Invalid for BareMetalMachineKeySetUserSetupStatus. + * The user is not valid and has no access. */ public static final BareMetalMachineKeySetUserSetupStatus INVALID = fromString("Invalid"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySets.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySets.java index 54e25400c0b6..359088446e60 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySets.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,111 +13,95 @@ */ public interface BareMetalMachineKeySets { /** - * List bare metal machine key sets of the cluster. - * - * Get a list of bare metal machine key sets for the provided cluster. + * Get bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param bareMetalMachineKeySetName The name of the bare metal machine key set. + * @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 bare metal machine key sets for the provided cluster as paginated response with - * {@link PagedIterable}. + * @return bare metal machine key set of the provided cluster along with {@link Response}. */ - PagedIterable listByCluster(String resourceGroupName, String clusterName); + Response getWithResponse(String resourceGroupName, String clusterName, + String bareMetalMachineKeySetName, Context context); /** - * List bare metal machine key sets of the cluster. - * - * Get a list of bare metal machine key sets for the provided cluster. + * Get bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param bareMetalMachineKeySetName The name of the bare metal machine key set. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 bare metal machine key sets for the provided cluster as paginated response with - * {@link PagedIterable}. + * @return bare metal machine key set of the provided cluster. */ - PagedIterable listByCluster(String resourceGroupName, String clusterName, Integer top, - String skipToken, Context context); + BareMetalMachineKeySet get(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName); /** - * Retrieve the bare metal machine key set of the cluster. - * - * Get bare metal machine key set of the provided cluster. + * Delete the bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param bareMetalMachineKeySetName The name of the bare metal machine key set. - * @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 bare metal machine key set of the provided cluster along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String clusterName, - String bareMetalMachineKeySetName, Context context); + void delete(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName); /** - * Retrieve the bare metal machine key set of the cluster. - * - * Get bare metal machine key set of the provided cluster. + * Delete the bare metal machine key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param bareMetalMachineKeySetName The name of the bare metal machine key set. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 bare metal machine key set of the provided cluster. */ - BareMetalMachineKeySet get(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName); + void delete(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, String ifMatch, + String ifNoneMatch, Context context); /** - * Delete the bare metal machine key set of the cluster. - * - * Delete the bare metal machine key set of the provided cluster. + * Get a list of bare metal machine key sets for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param bareMetalMachineKeySetName The name of the bare metal machine key set. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a list of bare metal machine key sets for the provided cluster as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName); + PagedIterable listByCluster(String resourceGroupName, String clusterName); /** - * Delete the bare metal machine key set of the cluster. - * - * Delete the bare metal machine key set of the provided cluster. + * Get a list of bare metal machine key sets for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param bareMetalMachineKeySetName The name of the bare metal machine key set. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of bare metal machine key sets for the provided cluster as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String clusterName, String bareMetalMachineKeySetName, - String ifMatch, String ifNoneMatch, Context context); + PagedIterable listByCluster(String resourceGroupName, String clusterName, Integer top, + String skipToken, Context context); /** - * Retrieve the bare metal machine key set of the cluster. - * * Get bare metal machine key set of the provided cluster. * * @param id the resource ID. @@ -129,8 +113,6 @@ OperationStatusResult delete(String resourceGroupName, String clusterName, Strin BareMetalMachineKeySet getById(String id); /** - * Retrieve the bare metal machine key set of the cluster. - * * Get bare metal machine key set of the provided cluster. * * @param id the resource ID. @@ -143,21 +125,16 @@ OperationStatusResult delete(String resourceGroupName, String clusterName, Strin Response getByIdWithResponse(String id, Context context); /** - * Delete the bare metal machine key set of the cluster. - * * Delete the bare metal machine key set of the provided cluster. * * @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 current status of an async operation. */ - OperationStatusResult deleteById(String id); + void deleteById(String id); /** - * Delete the bare metal machine key set of the cluster. - * * Delete the bare metal machine key set of the provided cluster. * * @param id the resource ID. @@ -169,9 +146,8 @@ OperationStatusResult delete(String resourceGroupName, String clusterName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); + void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); /** * Begins definition for a new BareMetalMachineKeySet resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineMetricsConfigurationStatusLogLevel.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineMetricsConfigurationStatusLogLevel.java new file mode 100644 index 000000000000..01efc8beeee3 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineMetricsConfigurationStatusLogLevel.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.networkcloud.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The log level for the monitoring configuration status of the bare metal machine. + */ +public final class BareMetalMachineMetricsConfigurationStatusLogLevel + extends ExpandableStringEnum { + /** + * Logs are emitted at the default log level. + */ + public static final BareMetalMachineMetricsConfigurationStatusLogLevel DEFAULT = fromString("Default"); + + /** + * Logs are emitted at the Nexus log level. + */ + public static final BareMetalMachineMetricsConfigurationStatusLogLevel NEXUS = fromString("Nexus"); + + /** + * Creates a new instance of BareMetalMachineMetricsConfigurationStatusLogLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BareMetalMachineMetricsConfigurationStatusLogLevel() { + } + + /** + * Creates or finds a BareMetalMachineMetricsConfigurationStatusLogLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding BareMetalMachineMetricsConfigurationStatusLogLevel. + */ + public static BareMetalMachineMetricsConfigurationStatusLogLevel fromString(String name) { + return fromString(name, BareMetalMachineMetricsConfigurationStatusLogLevel.class); + } + + /** + * Gets known BareMetalMachineMetricsConfigurationStatusLogLevel values. + * + * @return known BareMetalMachineMetricsConfigurationStatusLogLevel values. + */ + public static Collection values() { + return values(BareMetalMachineMetricsConfigurationStatusLogLevel.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineMetricsConfigurationStatusMetricsLevel.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineMetricsConfigurationStatusMetricsLevel.java new file mode 100644 index 000000000000..bd374038fe90 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineMetricsConfigurationStatusMetricsLevel.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.networkcloud.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The metrics level for the monitoring configuration status of the bare metal machine. + */ +public final class BareMetalMachineMetricsConfigurationStatusMetricsLevel + extends ExpandableStringEnum { + /** + * Metrics are emitted at the default metrics level. + */ + public static final BareMetalMachineMetricsConfigurationStatusMetricsLevel DEFAULT = fromString("Default"); + + /** + * Metrics are emitted at the Nexus metrics level. + */ + public static final BareMetalMachineMetricsConfigurationStatusMetricsLevel NEXUS = fromString("Nexus"); + + /** + * Creates a new instance of BareMetalMachineMetricsConfigurationStatusMetricsLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BareMetalMachineMetricsConfigurationStatusMetricsLevel() { + } + + /** + * Creates or finds a BareMetalMachineMetricsConfigurationStatusMetricsLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding BareMetalMachineMetricsConfigurationStatusMetricsLevel. + */ + public static BareMetalMachineMetricsConfigurationStatusMetricsLevel fromString(String name) { + return fromString(name, BareMetalMachineMetricsConfigurationStatusMetricsLevel.class); + } + + /** + * Gets known BareMetalMachineMetricsConfigurationStatusMetricsLevel values. + * + * @return known BareMetalMachineMetricsConfigurationStatusMetricsLevel values. + */ + public static Collection values() { + return values(BareMetalMachineMetricsConfigurationStatusMetricsLevel.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineMonitoringConfigurationStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineMonitoringConfigurationStatus.java new file mode 100644 index 000000000000..b9b02169aa69 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineMonitoringConfigurationStatus.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.networkcloud.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; + +/** + * BareMetalMachineMonitoringConfigurationStatus represents the monitoring configuration status of the bare metal + * machine. + */ +@Immutable +public final class BareMetalMachineMonitoringConfigurationStatus + implements JsonSerializable { + /* + * The log level for the monitoring configuration status of the bare metal machine. + */ + private BareMetalMachineMetricsConfigurationStatusLogLevel logLevel; + + /* + * The metrics level for the monitoring configuration status of the bare metal machine. + */ + private BareMetalMachineMetricsConfigurationStatusMetricsLevel metricsLevel; + + /** + * Creates an instance of BareMetalMachineMonitoringConfigurationStatus class. + */ + private BareMetalMachineMonitoringConfigurationStatus() { + } + + /** + * Get the logLevel property: The log level for the monitoring configuration status of the bare metal machine. + * + * @return the logLevel value. + */ + public BareMetalMachineMetricsConfigurationStatusLogLevel logLevel() { + return this.logLevel; + } + + /** + * Get the metricsLevel property: The metrics level for the monitoring configuration status of the bare metal + * machine. + * + * @return the metricsLevel value. + */ + public BareMetalMachineMetricsConfigurationStatusMetricsLevel metricsLevel() { + return this.metricsLevel; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("logLevel", this.logLevel == null ? null : this.logLevel.toString()); + jsonWriter.writeStringField("metricsLevel", this.metricsLevel == null ? null : this.metricsLevel.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BareMetalMachineMonitoringConfigurationStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BareMetalMachineMonitoringConfigurationStatus 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 BareMetalMachineMonitoringConfigurationStatus. + */ + public static BareMetalMachineMonitoringConfigurationStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BareMetalMachineMonitoringConfigurationStatus deserializedBareMetalMachineMonitoringConfigurationStatus + = new BareMetalMachineMonitoringConfigurationStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("logLevel".equals(fieldName)) { + deserializedBareMetalMachineMonitoringConfigurationStatus.logLevel + = BareMetalMachineMetricsConfigurationStatusLogLevel.fromString(reader.getString()); + } else if ("metricsLevel".equals(fieldName)) { + deserializedBareMetalMachineMonitoringConfigurationStatus.metricsLevel + = BareMetalMachineMetricsConfigurationStatusMetricsLevel.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedBareMetalMachineMonitoringConfigurationStatus; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePatchParameters.java index e46ad3ac5134..b839b8d8ad0e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -24,7 +24,7 @@ public final class BareMetalMachinePatchParameters implements JsonSerializable tags; @@ -44,7 +44,7 @@ private BareMetalMachinePatchProperties innerProperties() { } /** - * Get the tags property: The Azure resource tags that will replace the existing ones. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -53,7 +53,7 @@ public Map tags() { } /** - * Set the tags property: The Azure resource tags that will replace the existing ones. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the BareMetalMachinePatchParameters object itself. @@ -88,17 +88,6 @@ public BareMetalMachinePatchParameters withMachineDetails(String machineDetails) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePowerOffParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePowerOffParameters.java index 29afa40b9984..238dd5b6a1b6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePowerOffParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePowerOffParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -49,14 +49,6 @@ public BareMetalMachinePowerOffParameters withSkipShutdown(BareMetalMachineSkipS return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePowerState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePowerState.java index 9e7d4f3abfc0..b4364b95537d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePowerState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePowerState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class BareMetalMachinePowerState extends ExpandableStringEnum { /** - * Static value On for BareMetalMachinePowerState. + * The bare metal machine was marked as powered on in the latest check of the baseboard management controller. */ public static final BareMetalMachinePowerState ON = fromString("On"); /** - * Static value Off for BareMetalMachinePowerState. + * The bare metal machine was marked as powered off in the latest check of the baseboard management controller. */ public static final BareMetalMachinePowerState OFF = fromString("Off"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineProvisioningState.java index 55a16c1bbceb..93f1905cf7b5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineProvisioningState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,27 +12,27 @@ */ public final class BareMetalMachineProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for BareMetalMachineProvisioningState. + * The Succeeded status. */ public static final BareMetalMachineProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for BareMetalMachineProvisioningState. + * The Failed status. */ public static final BareMetalMachineProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for BareMetalMachineProvisioningState. + * The Canceled status. */ public static final BareMetalMachineProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Provisioning for BareMetalMachineProvisioningState. + * The Provisioning status. */ public static final BareMetalMachineProvisioningState PROVISIONING = fromString("Provisioning"); /** - * Static value Accepted for BareMetalMachineProvisioningState. + * The Accepted status. */ public static final BareMetalMachineProvisioningState ACCEPTED = fromString("Accepted"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReadyState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReadyState.java index 1acbfe881d37..655cddf45be9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReadyState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReadyState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class BareMetalMachineReadyState extends ExpandableStringEnum { /** - * Static value True for BareMetalMachineReadyState. + * The bare metal machine is ready to receive workloads. */ public static final BareMetalMachineReadyState TRUE = fromString("True"); /** - * Static value False for BareMetalMachineReadyState. + * The bare metal machine is not ready to receive workloads. */ public static final BareMetalMachineReadyState FALSE = fromString("False"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReimageParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReimageParameters.java new file mode 100644 index 000000000000..8f4002f67869 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReimageParameters.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.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; + +/** + * BareMetalMachineReimageParameters represents the body of the request to reimage a bare metal machine. + */ +@Fluent +public final class BareMetalMachineReimageParameters implements JsonSerializable { + /* + * The safeguard mode to use for the reimage action, where None indicates to bypass safeguards and All indicates to + * utilize all safeguards. If not specified, the default is All. + */ + private BareMetalMachineReimageSafeguardMode safeguardMode; + + /** + * Creates an instance of BareMetalMachineReimageParameters class. + */ + public BareMetalMachineReimageParameters() { + } + + /** + * Get the safeguardMode property: The safeguard mode to use for the reimage action, where None indicates to bypass + * safeguards and All indicates to utilize all safeguards. If not specified, the default is All. + * + * @return the safeguardMode value. + */ + public BareMetalMachineReimageSafeguardMode safeguardMode() { + return this.safeguardMode; + } + + /** + * Set the safeguardMode property: The safeguard mode to use for the reimage action, where None indicates to bypass + * safeguards and All indicates to utilize all safeguards. If not specified, the default is All. + * + * @param safeguardMode the safeguardMode value to set. + * @return the BareMetalMachineReimageParameters object itself. + */ + public BareMetalMachineReimageParameters withSafeguardMode(BareMetalMachineReimageSafeguardMode safeguardMode) { + this.safeguardMode = safeguardMode; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("safeguardMode", this.safeguardMode == null ? null : this.safeguardMode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BareMetalMachineReimageParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BareMetalMachineReimageParameters 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 BareMetalMachineReimageParameters. + */ + public static BareMetalMachineReimageParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BareMetalMachineReimageParameters deserializedBareMetalMachineReimageParameters + = new BareMetalMachineReimageParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("safeguardMode".equals(fieldName)) { + deserializedBareMetalMachineReimageParameters.safeguardMode + = BareMetalMachineReimageSafeguardMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedBareMetalMachineReimageParameters; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReimageSafeguardMode.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReimageSafeguardMode.java new file mode 100644 index 000000000000..90d007dced99 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReimageSafeguardMode.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.networkcloud.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The safeguard mode to use for the reimage action, where None indicates to bypass safeguards and All indicates to + * utilize all safeguards. + */ +public final class BareMetalMachineReimageSafeguardMode + extends ExpandableStringEnum { + /** + * Run all pre‑operation validation checks before performing the reimage. If any check fails, the request is + * rejected and no changes are made. + */ + public static final BareMetalMachineReimageSafeguardMode ALL = fromString("All"); + + /** + * Skip all safeguards and perform the reimage without running pre‑operation validation checks. + */ + public static final BareMetalMachineReimageSafeguardMode NONE = fromString("None"); + + /** + * Creates a new instance of BareMetalMachineReimageSafeguardMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BareMetalMachineReimageSafeguardMode() { + } + + /** + * Creates or finds a BareMetalMachineReimageSafeguardMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding BareMetalMachineReimageSafeguardMode. + */ + public static BareMetalMachineReimageSafeguardMode fromString(String name) { + return fromString(name, BareMetalMachineReimageSafeguardMode.class); + } + + /** + * Gets known BareMetalMachineReimageSafeguardMode values. + * + * @return known BareMetalMachineReimageSafeguardMode values. + */ + public static Collection values() { + return values(BareMetalMachineReimageSafeguardMode.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReplaceParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReplaceParameters.java index c649329e2c99..6304226fb93a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReplaceParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReplaceParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -211,17 +211,6 @@ public BareMetalMachineReplaceParameters withStoragePolicy(BareMetalMachineRepla return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (bmcCredentials() != null) { - bmcCredentials().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReplaceSafeguardMode.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReplaceSafeguardMode.java index cd7cb9213738..66639c7022a7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReplaceSafeguardMode.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReplaceSafeguardMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -14,12 +14,12 @@ public final class BareMetalMachineReplaceSafeguardMode extends ExpandableStringEnum { /** - * Static value All for BareMetalMachineReplaceSafeguardMode. + * All safeguards will be utilized during the replace action. */ public static final BareMetalMachineReplaceSafeguardMode ALL = fromString("All"); /** - * Static value None for BareMetalMachineReplaceSafeguardMode. + * No safeguards will be utilized during the replace action. */ public static final BareMetalMachineReplaceSafeguardMode NONE = fromString("None"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReplaceStoragePolicy.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReplaceStoragePolicy.java index 0b7ec21468cb..2d6f0d590dd1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReplaceStoragePolicy.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReplaceStoragePolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,12 +13,12 @@ public final class BareMetalMachineReplaceStoragePolicy extends ExpandableStringEnum { /** - * Static value Preserve for BareMetalMachineReplaceStoragePolicy. + * Storage will be preserved and not cleared during the replace action. */ public static final BareMetalMachineReplaceStoragePolicy PRESERVE = fromString("Preserve"); /** - * Static value DiscardAll for BareMetalMachineReplaceStoragePolicy. + * Storage will be cleared during the replace action. */ public static final BareMetalMachineReplaceStoragePolicy DISCARD_ALL = fromString("DiscardAll"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunCommandParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunCommandParameters.java index ca94bc0574ba..0984e025ef6a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunCommandParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunCommandParameters.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -109,21 +108,6 @@ public BareMetalMachineRunCommandParameters withScript(String script) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (script() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property script in model BareMetalMachineRunCommandParameters")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BareMetalMachineRunCommandParameters.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunDataExtractsParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunDataExtractsParameters.java index 9180229f4057..c5667ea70425 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunDataExtractsParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunDataExtractsParameters.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -84,23 +83,6 @@ public BareMetalMachineRunDataExtractsParameters withLimitTimeSeconds(long limit return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (commands() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property commands in model BareMetalMachineRunDataExtractsParameters")); - } else { - commands().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BareMetalMachineRunDataExtractsParameters.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunReadCommandsParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunReadCommandsParameters.java index 631f01283d65..25925795ba98 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunReadCommandsParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunReadCommandsParameters.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -82,23 +81,6 @@ public BareMetalMachineRunReadCommandsParameters withLimitTimeSeconds(long limit return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (commands() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property commands in model BareMetalMachineRunReadCommandsParameters")); - } else { - commands().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BareMetalMachineRunReadCommandsParameters.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineSkipShutdown.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineSkipShutdown.java index 8d5a04052b8e..614445620985 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineSkipShutdown.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineSkipShutdown.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class BareMetalMachineSkipShutdown extends ExpandableStringEnum { /** - * Static value True for BareMetalMachineSkipShutdown. + * Skip the graceful OS shutdown and power off the bare metal machine immediately. */ public static final BareMetalMachineSkipShutdown TRUE = fromString("True"); /** - * Static value False for BareMetalMachineSkipShutdown. + * Do not skip the graceful OS shutdown and power off the bare metal machine immediately. */ public static final BareMetalMachineSkipShutdown FALSE = fromString("False"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachines.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachines.java index fecd1aca011d..926d1a2d30db 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachines.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachines.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,136 +13,116 @@ */ public interface BareMetalMachines { /** - * List bare metal machines in the subscription. - * - * Get a list of bare metal machines in the provided subscription. + * Get properties of the provided bare metal machine. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param bareMetalMachineName The name of the bare metal machine. + * @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 bare metal machines in the provided subscription as paginated response with - * {@link PagedIterable}. + * @return properties of the provided bare metal machine along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String bareMetalMachineName, + Context context); /** - * List bare metal machines in the subscription. - * - * Get a list of bare metal machines in the provided subscription. + * Get properties of the provided bare metal machine. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param bareMetalMachineName The name of the bare metal machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 bare metal machines in the provided subscription as paginated response with - * {@link PagedIterable}. + * @return properties of the provided bare metal machine. */ - PagedIterable list(Integer top, String skipToken, Context context); + BareMetalMachine getByResourceGroup(String resourceGroupName, String bareMetalMachineName); /** - * List bare metal machines in the resource group. - * - * Get a list of bare metal machines in the provided resource group. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param bareMetalMachineName The name of the bare metal machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 bare metal machines in the provided resource group as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void deleteByResourceGroup(String resourceGroupName, String bareMetalMachineName); /** - * List bare metal machines in the resource group. - * - * Get a list of bare metal machines in the provided resource group. + * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of + * this resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param bareMetalMachineName The name of the bare metal machine. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 bare metal machines in the provided resource group as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + void delete(String resourceGroupName, String bareMetalMachineName, String ifMatch, String ifNoneMatch, Context context); /** - * Retrieve the bare metal machine. - * - * Get properties of the provided bare metal machine. + * Get a list of bare metal machines in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @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 properties of the provided bare metal machine along with {@link Response}. + * @return a list of bare metal machines in the provided resource group as paginated response with + * {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String bareMetalMachineName, - Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Retrieve the bare metal machine. - * - * Get properties of the provided bare metal machine. + * Get a list of bare metal machines in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 properties of the provided bare metal machine. + * @return a list of bare metal machines in the provided resource group as paginated response with + * {@link PagedIterable}. */ - BareMetalMachine getByResourceGroup(String resourceGroupName, String bareMetalMachineName); + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); /** - * Delete the bare metal machine. - * - * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of - * this resource is managed by the system. + * Get a list of bare metal machines in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a list of bare metal machines in the provided subscription as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult deleteByResourceGroup(String resourceGroupName, String bareMetalMachineName); + PagedIterable list(); /** - * Delete the bare metal machine. - * - * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of - * this resource is managed by the system. + * Get a list of bare metal machines in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of bare metal machines in the provided subscription as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String bareMetalMachineName, String ifMatch, - String ifNoneMatch, Context context); + PagedIterable list(Integer top, String skipToken, Context context); /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -150,13 +130,11 @@ OperationStatusResult delete(String resourceGroupName, String bareMetalMachineNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult cordon(String resourceGroupName, String bareMetalMachineName); /** - * Cordon the bare metal machine. - * * Cordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -166,14 +144,12 @@ OperationStatusResult delete(String resourceGroupName, String bareMetalMachineNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult cordon(String resourceGroupName, String bareMetalMachineName, BareMetalMachineCordonParameters bareMetalMachineCordonParameters, Context context); /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -181,13 +157,11 @@ OperationStatusResult cordon(String resourceGroupName, String bareMetalMachineNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult powerOff(String resourceGroupName, String bareMetalMachineName); /** - * Power off the bare metal machine. - * * Power off the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -197,14 +171,12 @@ OperationStatusResult cordon(String resourceGroupName, String bareMetalMachineNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult powerOff(String resourceGroupName, String bareMetalMachineName, BareMetalMachinePowerOffParameters bareMetalMachinePowerOffParameters, Context context); /** - * Reimage the bare metal machine. - * * Reimage the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -212,28 +184,26 @@ OperationStatusResult powerOff(String resourceGroupName, String bareMetalMachine * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult reimage(String resourceGroupName, String bareMetalMachineName); /** - * Reimage the bare metal machine. - * * Reimage the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param bareMetalMachineName The name of the bare metal machine. + * @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. + * @return the response. */ - OperationStatusResult reimage(String resourceGroupName, String bareMetalMachineName, Context context); + OperationStatusResult reimage(String resourceGroupName, String bareMetalMachineName, + BareMetalMachineReimageParameters body, Context context); /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -241,13 +211,11 @@ OperationStatusResult powerOff(String resourceGroupName, String bareMetalMachine * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult replace(String resourceGroupName, String bareMetalMachineName); /** - * Replace (service) the bare metal machine. - * * Replace the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -257,14 +225,12 @@ OperationStatusResult powerOff(String resourceGroupName, String bareMetalMachine * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult replace(String resourceGroupName, String bareMetalMachineName, BareMetalMachineReplaceParameters bareMetalMachineReplaceParameters, Context context); /** - * Restart the bare metal machine. - * * Restart the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -272,13 +238,11 @@ OperationStatusResult replace(String resourceGroupName, String bareMetalMachineN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult restart(String resourceGroupName, String bareMetalMachineName); /** - * Restart the bare metal machine. - * * Restart the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -287,13 +251,11 @@ OperationStatusResult replace(String resourceGroupName, String bareMetalMachineN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult restart(String resourceGroupName, String bareMetalMachineName, Context context); /** - * Run the command on the bare metal machine. - * * Run the command or the script on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -303,14 +265,12 @@ OperationStatusResult replace(String resourceGroupName, String bareMetalMachineN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runCommand(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters); /** - * Run the command on the bare metal machine. - * * Run the command or the script on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -321,14 +281,12 @@ OperationStatusResult runCommand(String resourceGroupName, String bareMetalMachi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runCommand(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunCommandParameters bareMetalMachineRunCommandParameters, Context context); /** - * Run data extraction for a bare metal machine. - * * Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -338,14 +296,12 @@ OperationStatusResult runCommand(String resourceGroupName, String bareMetalMachi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runDataExtracts(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters); /** - * Run data extraction for a bare metal machine. - * * Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command * execution results and the command exit code can be retrieved from the operation status API once available. * @@ -356,14 +312,12 @@ OperationStatusResult runDataExtracts(String resourceGroupName, String bareMetal * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runDataExtracts(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsParameters, Context context); /** - * Run restricted data extraction for a bare metal machine. - * * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with * the command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -374,14 +328,12 @@ OperationStatusResult runDataExtracts(String resourceGroupName, String bareMetal * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runDataExtractsRestricted(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters); /** - * Run restricted data extraction for a bare metal machine. - * * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with * the command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -393,14 +345,12 @@ OperationStatusResult runDataExtractsRestricted(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runDataExtractsRestricted(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunDataExtractsParameters bareMetalMachineRunDataExtractsRestrictedParameters, Context context); /** - * Run read-only commands against a bare metal machine. - * * Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the * command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -411,14 +361,12 @@ OperationStatusResult runDataExtractsRestricted(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runReadCommands(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters); /** - * Run read-only commands against a bare metal machine. - * * Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the * command execution results and the command exit code can be retrieved from the operation status API once * available. @@ -430,14 +378,12 @@ OperationStatusResult runReadCommands(String resourceGroupName, String bareMetal * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runReadCommands(String resourceGroupName, String bareMetalMachineName, BareMetalMachineRunReadCommandsParameters bareMetalMachineRunReadCommandsParameters, Context context); /** - * Start the bare metal machine. - * * Start the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -445,13 +391,11 @@ OperationStatusResult runReadCommands(String resourceGroupName, String bareMetal * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult start(String resourceGroupName, String bareMetalMachineName); /** - * Start the bare metal machine. - * * Start the provided bare metal machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -460,13 +404,11 @@ OperationStatusResult runReadCommands(String resourceGroupName, String bareMetal * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult start(String resourceGroupName, String bareMetalMachineName, Context context); /** - * Uncordon the bare metal machine. - * * Uncordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -474,13 +416,11 @@ OperationStatusResult runReadCommands(String resourceGroupName, String bareMetal * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult uncordon(String resourceGroupName, String bareMetalMachineName); /** - * Uncordon the bare metal machine. - * * Uncordon the provided bare metal machine's Kubernetes node. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -489,13 +429,11 @@ OperationStatusResult runReadCommands(String resourceGroupName, String bareMetal * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult uncordon(String resourceGroupName, String bareMetalMachineName, Context context); /** - * Retrieve the bare metal machine. - * * Get properties of the provided bare metal machine. * * @param id the resource ID. @@ -507,8 +445,6 @@ OperationStatusResult runReadCommands(String resourceGroupName, String bareMetal BareMetalMachine getById(String id); /** - * Retrieve the bare metal machine. - * * Get properties of the provided bare metal machine. * * @param id the resource ID. @@ -521,8 +457,6 @@ OperationStatusResult runReadCommands(String resourceGroupName, String bareMetal Response getByIdWithResponse(String id, Context context); /** - * Delete the bare metal machine. - * * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of * this resource is managed by the system. * @@ -530,13 +464,10 @@ OperationStatusResult runReadCommands(String resourceGroupName, String bareMetal * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteById(String id); + void deleteById(String id); /** - * Delete the bare metal machine. - * * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of * this resource is managed by the system. * @@ -549,9 +480,8 @@ OperationStatusResult runReadCommands(String resourceGroupName, String bareMetal * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); + void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); /** * Begins definition for a new BareMetalMachine resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BfdEnabled.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BfdEnabled.java index 6b2f662f1bbf..27b29029b2db 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BfdEnabled.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BfdEnabled.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class BfdEnabled extends ExpandableStringEnum { /** - * Static value True for BfdEnabled. + * BFD is enabled for this BGP peer. */ public static final BfdEnabled TRUE = fromString("True"); /** - * Static value False for BfdEnabled. + * BFD is disabled for this BGP peer. */ public static final BfdEnabled FALSE = fromString("False"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BgpAdvertisement.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BgpAdvertisement.java index 492bc5d8e004..b17fe7b8adb9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BgpAdvertisement.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BgpAdvertisement.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -133,21 +132,6 @@ public BgpAdvertisement withPeers(List peers) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ipAddressPools() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property ipAddressPools in model BgpAdvertisement")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BgpAdvertisement.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BgpMultiHop.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BgpMultiHop.java index 0340daa0dca0..f5857a1fb6de 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BgpMultiHop.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BgpMultiHop.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class BgpMultiHop extends ExpandableStringEnum { /** - * Static value True for BgpMultiHop. + * Enable multi-hop peering support. */ public static final BgpMultiHop TRUE = fromString("True"); /** - * Static value False for BgpMultiHop. + * Disable multi-hop peering support. */ public static final BgpMultiHop FALSE = fromString("False"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BgpServiceLoadBalancerConfiguration.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BgpServiceLoadBalancerConfiguration.java index 7802c71ec8c3..557e287b855b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BgpServiceLoadBalancerConfiguration.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BgpServiceLoadBalancerConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -133,23 +133,6 @@ public BgpServiceLoadBalancerConfiguration withIpAddressPools(List e.validate()); - } - if (bgpPeers() != null) { - bgpPeers().forEach(e -> e.validate()); - } - if (ipAddressPools() != null) { - ipAddressPools().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySet.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySet.java index 70d87a405816..bb843eae60c0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySet.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySet.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -52,14 +52,18 @@ public interface BmcKeySet { Map tags(); /** - * Gets the etag property: Resource ETag. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ String etag(); /** - * Gets the extendedLocation property: The extended location of the cluster associated with the resource. + * Gets the extendedLocation property: The extended location of the resource. This property is required when + * creating the resource. * * @return the extendedLocation value. */ @@ -81,61 +85,61 @@ public interface BmcKeySet { String azureGroupId(); /** - * Gets the detailedStatus property: The more detailed status of the key set. + * Gets the expiration property: The date and time after which the users in this key set will be removed from the + * baseboard management controllers. * - * @return the detailedStatus value. + * @return the expiration value. */ - BmcKeySetDetailedStatus detailedStatus(); + OffsetDateTime expiration(); /** - * Gets the detailedStatusMessage property: The descriptive message about the current detailed status. + * Gets the privilegeLevel property: The access level allowed for the users in this key set. * - * @return the detailedStatusMessage value. + * @return the privilegeLevel value. */ - String detailedStatusMessage(); + BmcKeySetPrivilegeLevel privilegeLevel(); /** - * Gets the expiration property: The date and time after which the users in this key set will be removed from the - * baseboard management controllers. + * Gets the userList property: The unique list of permitted users. * - * @return the expiration value. + * @return the userList value. */ - OffsetDateTime expiration(); + List userList(); /** - * Gets the lastValidation property: The last time this key set was validated. + * Gets the detailedStatus property: The more detailed status of the key set. * - * @return the lastValidation value. + * @return the detailedStatus value. */ - OffsetDateTime lastValidation(); + BmcKeySetDetailedStatus detailedStatus(); /** - * Gets the privilegeLevel property: The access level allowed for the users in this key set. + * Gets the detailedStatusMessage property: The descriptive message about the current detailed status. * - * @return the privilegeLevel value. + * @return the detailedStatusMessage value. */ - BmcKeySetPrivilegeLevel privilegeLevel(); + String detailedStatusMessage(); /** - * Gets the provisioningState property: The provisioning state of the baseboard management controller key set. + * Gets the lastValidation property: The last time this key set was validated. * - * @return the provisioningState value. + * @return the lastValidation value. */ - BmcKeySetProvisioningState provisioningState(); + OffsetDateTime lastValidation(); /** - * Gets the userList property: The unique list of permitted users. + * Gets the userListStatus property: The status evaluation of each user. * - * @return the userList value. + * @return the userListStatus value. */ - List userList(); + List userListStatus(); /** - * Gets the userListStatus property: The status evaluation of each user. + * Gets the provisioningState property: The provisioning state of the baseboard management controller key set. * - * @return the userListStatus value. + * @return the provisioningState value. */ - List userListStatus(); + BmcKeySetProvisioningState provisioningState(); /** * Gets the region of the resource. @@ -224,10 +228,11 @@ interface WithParentResource { */ interface WithExtendedLocation { /** - * Specifies the extendedLocation property: The extended location of the cluster associated with the - * resource.. + * Specifies the extendedLocation property: The extended location of the resource. This property is required + * when creating the resource.. * - * @param extendedLocation The extended location of the cluster associated with the resource. + * @param extendedLocation The extended location of the resource. This property is required when creating + * the resource. * @return the next definition stage. */ WithAzureGroupId withExtendedLocation(ExtendedLocation extendedLocation); @@ -393,9 +398,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: The Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags.. * - * @param tags The Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetDetailedStatus.java index 6456e3b1415e..6afee4cff7e0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,22 +12,22 @@ */ public final class BmcKeySetDetailedStatus extends ExpandableStringEnum { /** - * Static value AllActive for BmcKeySetDetailedStatus. + * The AllActive status. */ public static final BmcKeySetDetailedStatus ALL_ACTIVE = fromString("AllActive"); /** - * Static value SomeInvalid for BmcKeySetDetailedStatus. + * The SomeInvalid status. */ public static final BmcKeySetDetailedStatus SOME_INVALID = fromString("SomeInvalid"); /** - * Static value AllInvalid for BmcKeySetDetailedStatus. + * The AllInvalid status. */ public static final BmcKeySetDetailedStatus ALL_INVALID = fromString("AllInvalid"); /** - * Static value Validating for BmcKeySetDetailedStatus. + * The Validating status. */ public static final BmcKeySetDetailedStatus VALIDATING = fromString("Validating"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetPatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetPatchParameters.java index 1362f1cd6f90..514a849bafad 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetPatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetPatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -26,7 +26,7 @@ public final class BmcKeySetPatchParameters implements JsonSerializable tags; @@ -46,7 +46,7 @@ private BmcKeySetPatchProperties innerProperties() { } /** - * Get the tags property: The Azure resource tags that will replace the existing ones. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -55,7 +55,7 @@ public Map tags() { } /** - * Set the tags property: The Azure resource tags that will replace the existing ones. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the BmcKeySetPatchParameters object itself. @@ -113,17 +113,6 @@ public BmcKeySetPatchParameters withUserList(List userList) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetPrivilegeLevel.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetPrivilegeLevel.java index aff7bb047c5d..2b739b26eac3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetPrivilegeLevel.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetPrivilegeLevel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class BmcKeySetPrivilegeLevel extends ExpandableStringEnum { /** - * Static value ReadOnly for BmcKeySetPrivilegeLevel. + * ReadOnly privilege level. */ public static final BmcKeySetPrivilegeLevel READ_ONLY = fromString("ReadOnly"); /** - * Static value Administrator for BmcKeySetPrivilegeLevel. + * Administrator privilege level. */ public static final BmcKeySetPrivilegeLevel ADMINISTRATOR = fromString("Administrator"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetProvisioningState.java index 7802a79b761d..5880f4af142b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetProvisioningState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,27 +12,27 @@ */ public final class BmcKeySetProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for BmcKeySetProvisioningState. + * The Succeeded status. */ public static final BmcKeySetProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for BmcKeySetProvisioningState. + * The Failed status. */ public static final BmcKeySetProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for BmcKeySetProvisioningState. + * The Canceled status. */ public static final BmcKeySetProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Accepted for BmcKeySetProvisioningState. + * The Accepted status. */ public static final BmcKeySetProvisioningState ACCEPTED = fromString("Accepted"); /** - * Static value Provisioning for BmcKeySetProvisioningState. + * The Provisioning status. */ public static final BmcKeySetProvisioningState PROVISIONING = fromString("Provisioning"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySets.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySets.java index 343bba162e7e..41286f51dc53 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySets.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,111 +13,95 @@ */ public interface BmcKeySets { /** - * List baseboard management controller key sets of the cluster. - * - * Get a list of baseboard management controller key sets for the provided cluster. + * Get baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param bmcKeySetName The name of the baseboard management controller key set. + * @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 baseboard management controller key sets for the provided cluster as paginated response with - * {@link PagedIterable}. + * @return baseboard management controller key set of the provided cluster along with {@link Response}. */ - PagedIterable listByCluster(String resourceGroupName, String clusterName); + Response getWithResponse(String resourceGroupName, String clusterName, String bmcKeySetName, + Context context); /** - * List baseboard management controller key sets of the cluster. - * - * Get a list of baseboard management controller key sets for the provided cluster. + * Get baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param bmcKeySetName The name of the baseboard management controller key set. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 baseboard management controller key sets for the provided cluster as paginated response with - * {@link PagedIterable}. + * @return baseboard management controller key set of the provided cluster. */ - PagedIterable listByCluster(String resourceGroupName, String clusterName, Integer top, String skipToken, - Context context); + BmcKeySet get(String resourceGroupName, String clusterName, String bmcKeySetName); /** - * Retrieve the baseboard management controller key set of the cluster. - * - * Get baseboard management controller key set of the provided cluster. + * Delete the baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param bmcKeySetName The name of the baseboard management controller key set. - * @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 baseboard management controller key set of the provided cluster along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String clusterName, String bmcKeySetName, - Context context); + void delete(String resourceGroupName, String clusterName, String bmcKeySetName); /** - * Retrieve the baseboard management controller key set of the cluster. - * - * Get baseboard management controller key set of the provided cluster. + * Delete the baseboard management controller key set of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param bmcKeySetName The name of the baseboard management controller key set. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 baseboard management controller key set of the provided cluster. */ - BmcKeySet get(String resourceGroupName, String clusterName, String bmcKeySetName); + void delete(String resourceGroupName, String clusterName, String bmcKeySetName, String ifMatch, String ifNoneMatch, + Context context); /** - * Delete the baseboard management controller key set of the cluster. - * - * Delete the baseboard management controller key set of the provided cluster. + * Get a list of baseboard management controller key sets for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param bmcKeySetName The name of the baseboard management controller key set. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a list of baseboard management controller key sets for the provided cluster as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String clusterName, String bmcKeySetName); + PagedIterable listByCluster(String resourceGroupName, String clusterName); /** - * Delete the baseboard management controller key set of the cluster. - * - * Delete the baseboard management controller key set of the provided cluster. + * Get a list of baseboard management controller key sets for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param bmcKeySetName The name of the baseboard management controller key set. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of baseboard management controller key sets for the provided cluster as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String clusterName, String bmcKeySetName, String ifMatch, - String ifNoneMatch, Context context); + PagedIterable listByCluster(String resourceGroupName, String clusterName, Integer top, String skipToken, + Context context); /** - * Retrieve the baseboard management controller key set of the cluster. - * * Get baseboard management controller key set of the provided cluster. * * @param id the resource ID. @@ -129,8 +113,6 @@ OperationStatusResult delete(String resourceGroupName, String clusterName, Strin BmcKeySet getById(String id); /** - * Retrieve the baseboard management controller key set of the cluster. - * * Get baseboard management controller key set of the provided cluster. * * @param id the resource ID. @@ -143,21 +125,16 @@ OperationStatusResult delete(String resourceGroupName, String clusterName, Strin Response getByIdWithResponse(String id, Context context); /** - * Delete the baseboard management controller key set of the cluster. - * * Delete the baseboard management controller key set of the provided cluster. * * @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 current status of an async operation. */ - OperationStatusResult deleteById(String id); + void deleteById(String id); /** - * Delete the baseboard management controller key set of the cluster. - * * Delete the baseboard management controller key set of the provided cluster. * * @param id the resource ID. @@ -169,9 +146,8 @@ OperationStatusResult delete(String resourceGroupName, String clusterName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); + void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); /** * Begins definition for a new BmcKeySet resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BootstrapProtocol.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BootstrapProtocol.java index 67d72c15e308..5088982cf76e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BootstrapProtocol.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/BootstrapProtocol.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,7 +12,7 @@ */ public final class BootstrapProtocol extends ExpandableStringEnum { /** - * Static value PXE for BootstrapProtocol. + * PXE bootstrap protocol. */ public static final BootstrapProtocol PXE = fromString("PXE"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CertificateInfo.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CertificateInfo.java index a81fccdc0498..3b1677ba7cde 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CertificateInfo.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CertificateInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -29,7 +29,7 @@ public final class CertificateInfo implements JsonSerializable /** * Creates an instance of CertificateInfo class. */ - public CertificateInfo() { + private CertificateInfo() { } /** @@ -50,14 +50,6 @@ public String value() { return this.value; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetwork.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetwork.java index ba7e8f38e0ab..6494a0d8c6fb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetwork.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetwork.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -51,14 +51,18 @@ public interface CloudServicesNetwork { Map tags(); /** - * Gets the etag property: Resource ETag. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ String etag(); /** - * Gets the extendedLocation property: The extended location of the cluster associated with the resource. + * Gets the extendedLocation property: The extended location of the resource. This property is required when + * creating the resource. * * @return the extendedLocation value. */ @@ -79,6 +83,21 @@ public interface CloudServicesNetwork { */ List additionalEgressEndpoints(); + /** + * Gets the enableDefaultEgressEndpoints property: The indicator of whether the platform default endpoints are + * allowed for the egress traffic. + * + * @return the enableDefaultEgressEndpoints value. + */ + CloudServicesNetworkEnableDefaultEgressEndpoints enableDefaultEgressEndpoints(); + + /** + * Gets the storageOptions property: The storage options for the cloud services network. + * + * @return the storageOptions value. + */ + CloudServicesNetworkStorageOptions storageOptions(); + /** * Gets the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources * that have attached this network. @@ -109,14 +128,6 @@ public interface CloudServicesNetwork { */ String detailedStatusMessage(); - /** - * Gets the enableDefaultEgressEndpoints property: The indicator of whether the platform default endpoints are - * allowed for the egress traffic. - * - * @return the enableDefaultEgressEndpoints value. - */ - CloudServicesNetworkEnableDefaultEgressEndpoints enableDefaultEgressEndpoints(); - /** * Gets the enabledEgressEndpoints property: The full list of additional and default egress endpoints that are * currently enabled. @@ -141,20 +152,6 @@ public interface CloudServicesNetwork { */ String interfaceName(); - /** - * Gets the provisioningState property: The provisioning state of the cloud services network. - * - * @return the provisioningState value. - */ - CloudServicesNetworkProvisioningState provisioningState(); - - /** - * Gets the storageOptions property: The storage options for the cloud services network. - * - * @return the storageOptions value. - */ - CloudServicesNetworkStorageOptions storageOptions(); - /** * Gets the storageStatus property: The storage status for the cloud services network. * @@ -171,6 +168,13 @@ public interface CloudServicesNetwork { */ List virtualMachinesAssociatedIds(); + /** + * Gets the provisioningState property: The provisioning state of the cloud services network. + * + * @return the provisioningState value. + */ + CloudServicesNetworkProvisioningState provisioningState(); + /** * Gets the region of the resource. * @@ -255,10 +259,11 @@ interface WithResourceGroup { */ interface WithExtendedLocation { /** - * Specifies the extendedLocation property: The extended location of the cluster associated with the - * resource.. + * Specifies the extendedLocation property: The extended location of the resource. This property is required + * when creating the resource.. * - * @param extendedLocation The extended location of the cluster associated with the resource. + * @param extendedLocation The extended location of the resource. This property is required when creating + * the resource. * @return the next definition stage. */ WithCreate withExtendedLocation(ExtendedLocation extendedLocation); @@ -414,9 +419,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: The Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags.. * - * @param tags The Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkDetailedStatus.java index 62d068d1fe04..2c4fe8d1755a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,17 +12,17 @@ */ public final class CloudServicesNetworkDetailedStatus extends ExpandableStringEnum { /** - * Static value Error for CloudServicesNetworkDetailedStatus. + * The Error status. */ public static final CloudServicesNetworkDetailedStatus ERROR = fromString("Error"); /** - * Static value Available for CloudServicesNetworkDetailedStatus. + * The Available status. */ public static final CloudServicesNetworkDetailedStatus AVAILABLE = fromString("Available"); /** - * Static value Provisioning for CloudServicesNetworkDetailedStatus. + * The Provisioning status. */ public static final CloudServicesNetworkDetailedStatus PROVISIONING = fromString("Provisioning"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkEnableDefaultEgressEndpoints.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkEnableDefaultEgressEndpoints.java index cb90db45111d..6f64873c3e73 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkEnableDefaultEgressEndpoints.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkEnableDefaultEgressEndpoints.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,12 +13,12 @@ public final class CloudServicesNetworkEnableDefaultEgressEndpoints extends ExpandableStringEnum { /** - * Static value True for CloudServicesNetworkEnableDefaultEgressEndpoints. + * Enable default egress endpoints. */ public static final CloudServicesNetworkEnableDefaultEgressEndpoints TRUE = fromString("True"); /** - * Static value False for CloudServicesNetworkEnableDefaultEgressEndpoints. + * Disable default egress endpoints. */ public static final CloudServicesNetworkEnableDefaultEgressEndpoints FALSE = fromString("False"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkPatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkPatchParameters.java index e08c2cc9671b..03e7e6a71d39 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkPatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkPatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -26,7 +26,7 @@ public final class CloudServicesNetworkPatchParameters private CloudServicesNetworkPatchProperties innerProperties; /* - * The Azure resource tags that will replace the existing ones. + * Resource tags. */ private Map tags; @@ -46,7 +46,7 @@ private CloudServicesNetworkPatchProperties innerProperties() { } /** - * Get the tags property: The Azure resource tags that will replace the existing ones. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -55,7 +55,7 @@ public Map tags() { } /** - * Set the tags property: The Azure resource tags that will replace the existing ones. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the CloudServicesNetworkPatchParameters object itself. @@ -141,17 +141,6 @@ public CloudServicesNetworkStorageOptionsPatch storageOptions() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkProvisioningState.java index 30ac919efd19..4421d79b4a34 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkProvisioningState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,27 +13,27 @@ public final class CloudServicesNetworkProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for CloudServicesNetworkProvisioningState. + * The Succeeded status. */ public static final CloudServicesNetworkProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for CloudServicesNetworkProvisioningState. + * The Failed status. */ public static final CloudServicesNetworkProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for CloudServicesNetworkProvisioningState. + * The Canceled status. */ public static final CloudServicesNetworkProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Provisioning for CloudServicesNetworkProvisioningState. + * The Provisioning status. */ public static final CloudServicesNetworkProvisioningState PROVISIONING = fromString("Provisioning"); /** - * Static value Accepted for CloudServicesNetworkProvisioningState. + * The Accepted status. */ public static final CloudServicesNetworkProvisioningState ACCEPTED = fromString("Accepted"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageMode.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageMode.java index b8a0965a5707..98260ea1d59c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageMode.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,12 +13,12 @@ */ public final class CloudServicesNetworkStorageMode extends ExpandableStringEnum { /** - * Static value None for CloudServicesNetworkStorageMode. + * No shared storage. */ public static final CloudServicesNetworkStorageMode NONE = fromString("None"); /** - * Static value Standard for CloudServicesNetworkStorageMode. + * Standard shared storage. */ public static final CloudServicesNetworkStorageMode STANDARD = fromString("Standard"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageOptions.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageOptions.java index ae03ae694c71..1ff5b3d4e700 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageOptions.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageOptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -100,14 +100,6 @@ public CloudServicesNetworkStorageOptions withStorageApplianceId(String storageA return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageOptionsPatch.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageOptionsPatch.java index e2b407608c11..be84b7bb1478 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageOptionsPatch.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageOptionsPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -98,14 +98,6 @@ public CloudServicesNetworkStorageOptionsPatch withStorageApplianceId(String sto return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageStatus.java index d3e84c34d1ff..2c93eb184e0a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -44,7 +44,7 @@ public final class CloudServicesNetworkStorageStatus implements JsonSerializable /** * Creates an instance of CloudServicesNetworkStorageStatus class. */ - public CloudServicesNetworkStorageStatus() { + private CloudServicesNetworkStorageStatus() { } /** @@ -92,14 +92,6 @@ public String volumeId() { return this.volumeId; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageStatusStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageStatusStatus.java index 5117ac5e7b7f..7ee8b88faadc 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageStatusStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageStatusStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,20 +13,35 @@ public final class CloudServicesNetworkStorageStatusStatus extends ExpandableStringEnum { /** - * Static value Available for CloudServicesNetworkStorageStatusStatus. + * The storage allocation is available. */ public static final CloudServicesNetworkStorageStatusStatus AVAILABLE = fromString("Available"); /** - * Static value ExpandingVolume for CloudServicesNetworkStorageStatusStatus. + * The storage allocation is expanding the volume. */ public static final CloudServicesNetworkStorageStatusStatus EXPANDING_VOLUME = fromString("ExpandingVolume"); /** - * Static value ExpansionFailed for CloudServicesNetworkStorageStatusStatus. + * The expansion of the storage allocation has failed. */ public static final CloudServicesNetworkStorageStatusStatus EXPANSION_FAILED = fromString("ExpansionFailed"); + /** + * The storage allocation is initializing. + */ + public static final CloudServicesNetworkStorageStatusStatus INITIALIZING = fromString("Initializing"); + + /** + * The storage allocation has no status. + */ + public static final CloudServicesNetworkStorageStatusStatus NONE = fromString("None"); + + /** + * The storage allocation is being repaired. + */ + public static final CloudServicesNetworkStorageStatusStatus REPAIRING = fromString("Repairing"); + /** * Creates a new instance of CloudServicesNetworkStorageStatusStatus value. * diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworks.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworks.java index aee6dde6be48..3e3e194cd215 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworks.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworks.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,134 +13,114 @@ */ public interface CloudServicesNetworks { /** - * List cloud services networks in the subscription. - * - * Get a list of cloud services networks in the provided subscription. + * Get properties of the provided cloud services network. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudServicesNetworkName The name of the cloud services 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 a list of cloud services networks in the provided subscription as paginated response with - * {@link PagedIterable}. + * @return properties of the provided cloud services network along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, + String cloudServicesNetworkName, Context context); /** - * List cloud services networks in the subscription. - * - * Get a list of cloud services networks in the provided subscription. + * Get properties of the provided cloud services network. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudServicesNetworkName The name of the cloud services 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 a list of cloud services networks in the provided subscription as paginated response with - * {@link PagedIterable}. + * @return properties of the provided cloud services network. */ - PagedIterable list(Integer top, String skipToken, Context context); + CloudServicesNetwork getByResourceGroup(String resourceGroupName, String cloudServicesNetworkName); /** - * List cloud services networks in the resource group. - * - * Get a list of cloud services networks in the provided resource group. + * Delete the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudServicesNetworkName The name of the cloud services 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 a list of cloud services networks in the provided resource group as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void deleteByResourceGroup(String resourceGroupName, String cloudServicesNetworkName); /** - * List cloud services networks in the resource group. - * - * Get a list of cloud services networks in the provided resource group. + * Delete the provided cloud services network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param cloudServicesNetworkName The name of the cloud services network. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 cloud services networks in the provided resource group as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + void delete(String resourceGroupName, String cloudServicesNetworkName, String ifMatch, String ifNoneMatch, Context context); /** - * Retrieve the cloud services network. - * - * Get properties of the provided cloud services network. + * Get a list of cloud services networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services 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 properties of the provided cloud services network along with {@link Response}. + * @return a list of cloud services networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, - String cloudServicesNetworkName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Retrieve the cloud services network. - * - * Get properties of the provided cloud services network. + * Get a list of cloud services networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 properties of the provided cloud services network. + * @return a list of cloud services networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - CloudServicesNetwork getByResourceGroup(String resourceGroupName, String cloudServicesNetworkName); + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); /** - * Delete the cloud services network. - * - * Delete the provided cloud services network. + * Get a list of cloud services networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services 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 current status of an async operation. + * @return a list of cloud services networks in the provided subscription as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult deleteByResourceGroup(String resourceGroupName, String cloudServicesNetworkName); + PagedIterable list(); /** - * Delete the cloud services network. - * - * Delete the provided cloud services network. + * Get a list of cloud services networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of cloud services networks in the provided subscription as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String cloudServicesNetworkName, String ifMatch, - String ifNoneMatch, Context context); + PagedIterable list(Integer top, String skipToken, Context context); /** - * Retrieve the cloud services network. - * * Get properties of the provided cloud services network. * * @param id the resource ID. @@ -152,8 +132,6 @@ OperationStatusResult delete(String resourceGroupName, String cloudServicesNetwo CloudServicesNetwork getById(String id); /** - * Retrieve the cloud services network. - * * Get properties of the provided cloud services network. * * @param id the resource ID. @@ -166,21 +144,16 @@ OperationStatusResult delete(String resourceGroupName, String cloudServicesNetwo Response getByIdWithResponse(String id, Context context); /** - * Delete the cloud services network. - * * Delete the provided cloud services 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 current status of an async operation. */ - OperationStatusResult deleteById(String id); + void deleteById(String id); /** - * Delete the cloud services network. - * * Delete the provided cloud services network. * * @param id the resource ID. @@ -192,9 +165,8 @@ OperationStatusResult delete(String resourceGroupName, String cloudServicesNetwo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); + void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); /** * Begins definition for a new CloudServicesNetwork resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Cluster.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Cluster.java index e493d65812cb..4881effcb06c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Cluster.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Cluster.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -8,6 +8,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.networkcloud.fluent.models.ClusterInner; +import java.time.OffsetDateTime; import java.util.List; import java.util.Map; @@ -51,40 +52,45 @@ public interface Cluster { Map tags(); /** - * Gets the etag property: Resource ETag. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ String etag(); /** - * Gets the extendedLocation property: The extended location of the cluster manager associated with the cluster. + * Gets the extendedLocation property: The extended location of the resource. This property is required when + * creating the resource. * * @return the extendedLocation value. */ ExtendedLocation extendedLocation(); /** - * Gets the identity property: The identity for the resource. + * Gets the identity property: The managed service identities assigned to this resource. * * @return the identity value. */ ManagedServiceIdentity identity(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Gets the kind property: The type (kind) of the cluster. When specified, the value must exactly match the kind + * configured on the cluster manager that manages the cluster. If omitted, the service will default the value to the + * kind value of the cluster manager. * - * @return the systemData value. + * @return the kind value. */ - SystemData systemData(); + DeploymentType kind(); /** - * Gets the actionStates property: The current state of any in progress or completed actions. The most recent known - * instance of each action type is shown. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the actionStates value. + * @return the systemData value. */ - List actionStates(); + SystemData systemData(); /** * Gets the aggregatorOrSingleRackDefinition property: The rack definition that is intended to reflect only a single @@ -110,38 +116,6 @@ public interface Cluster { */ String analyticsWorkspaceId(); - /** - * Gets the availableUpgradeVersions property: The list of cluster runtime version upgrades available for this - * cluster. - * - * @return the availableUpgradeVersions value. - */ - List availableUpgradeVersions(); - - /** - * Gets the clusterCapacity property: The capacity supported by this cluster. - * - * @return the clusterCapacity value. - */ - ClusterCapacity clusterCapacity(); - - /** - * Gets the clusterConnectionStatus property: The latest heartbeat status between the cluster manager and the - * cluster. - * - * @return the clusterConnectionStatus value. - */ - ClusterConnectionStatus clusterConnectionStatus(); - - /** - * Gets the clusterExtendedLocation property: The extended location (custom location) that represents the cluster's - * control plane location. This extended location is used to route the requests of child objects of the cluster that - * are handled by the platform operator. - * - * @return the clusterExtendedLocation value. - */ - ExtendedLocation clusterExtendedLocation(); - /** * Gets the clusterLocation property: The customer-provided location information to identify where the cluster * resides. @@ -150,22 +124,6 @@ public interface Cluster { */ String clusterLocation(); - /** - * Gets the clusterManagerConnectionStatus property: The latest connectivity status between cluster manager and the - * cluster. - * - * @return the clusterManagerConnectionStatus value. - */ - ClusterManagerConnectionStatus clusterManagerConnectionStatus(); - - /** - * Gets the clusterManagerId property: The resource ID of the cluster manager that manages this cluster. This is set - * by the Cluster Manager when the cluster is created. - * - * @return the clusterManagerId value. - */ - String clusterManagerId(); - /** * Gets the clusterServicePrincipal property: Field Deprecated: Use managed identity to provide cluster privileges. * The service principal to be used by the cluster during Arc Appliance installation. @@ -212,29 +170,6 @@ public interface Cluster { */ List computeRackDefinitions(); - /** - * Gets the detailedStatus property: The current detailed status of the cluster. - * - * @return the detailedStatus value. - */ - ClusterDetailedStatus detailedStatus(); - - /** - * Gets the detailedStatusMessage property: The descriptive message about the detailed status. - * - * @return the detailedStatusMessage value. - */ - String detailedStatusMessage(); - - /** - * Gets the hybridAksExtendedLocation property: Field Deprecated. This field will not be populated in an upcoming - * version. The extended location (custom location) that represents the Hybrid AKS control plane location. This - * extended location is used when creating provisioned clusters (Hybrid AKS clusters). - * - * @return the hybridAksExtendedLocation value. - */ - ExtendedLocation hybridAksExtendedLocation(); - /** * Gets the managedResourceGroupConfiguration property: The configuration of the managed resource group associated * with the resource. @@ -243,13 +178,6 @@ public interface Cluster { */ ManagedResourceGroupConfiguration managedResourceGroupConfiguration(); - /** - * Gets the manualActionCount property: The count of Manual Action Taken (MAT) events that have not been validated. - * - * @return the manualActionCount value. - */ - Long manualActionCount(); - /** * Gets the networkFabricId property: The resource ID of the Network Fabric associated with the cluster. * @@ -257,13 +185,6 @@ public interface Cluster { */ String networkFabricId(); - /** - * Gets the provisioningState property: The provisioning state of the cluster. - * - * @return the provisioningState value. - */ - ClusterProvisioningState provisioningState(); - /** * Gets the runtimeProtectionConfiguration property: The settings for cluster runtime protection. * @@ -287,13 +208,6 @@ public interface Cluster { */ SecretArchiveSettings secretArchiveSettings(); - /** - * Gets the supportExpiryDate property: The support end date of the runtime version of the cluster. - * - * @return the supportExpiryDate value. - */ - String supportExpiryDate(); - /** * Gets the updateStrategy property: The strategy for updating the cluster. * @@ -309,6 +223,115 @@ public interface Cluster { */ VulnerabilityScanningSettings vulnerabilityScanningSettings(); + /** + * Gets the actionStates property: The current state of any in progress or completed actions. The most recent known + * instance of each action type is shown. + * + * @return the actionStates value. + */ + List actionStates(); + + /** + * Gets the availableUpgradeVersions property: The list of cluster runtime version upgrades available for this + * cluster. + * + * @return the availableUpgradeVersions value. + */ + List availableUpgradeVersions(); + + /** + * Gets the clusterCapacity property: The capacity supported by this cluster. + * + * @return the clusterCapacity value. + */ + ClusterCapacity clusterCapacity(); + + /** + * Gets the clusterConnectionStatus property: The latest heartbeat status between the cluster manager and the + * cluster. + * + * @return the clusterConnectionStatus value. + */ + ClusterConnectionStatus clusterConnectionStatus(); + + /** + * Gets the clusterExtendedLocation property: The extended location (custom location) that represents the cluster's + * control plane location. This extended location is used to route the requests of child objects of the cluster that + * are handled by the platform operator. + * + * @return the clusterExtendedLocation value. + */ + ExtendedLocation clusterExtendedLocation(); + + /** + * Gets the clusterManagerConnectionStatus property: The latest connectivity status between cluster manager and the + * cluster. + * + * @return the clusterManagerConnectionStatus value. + */ + ClusterManagerConnectionStatus clusterManagerConnectionStatus(); + + /** + * Gets the clusterManagerId property: The resource ID of the cluster manager that manages this cluster. This is set + * by the Cluster Manager when the cluster is created. + * + * @return the clusterManagerId value. + */ + String clusterManagerId(); + + /** + * Gets the detailedStatus property: The current detailed status of the cluster. + * + * @return the detailedStatus value. + */ + ClusterDetailedStatus detailedStatus(); + + /** + * Gets the detailedStatusMessage property: The descriptive message about the detailed status. + * + * @return the detailedStatusMessage value. + */ + String detailedStatusMessage(); + + /** + * Gets the hybridAksExtendedLocation property: Field Deprecated. This field will not be populated in an upcoming + * version. The extended location (custom location) that represents the Hybrid AKS control plane location. This + * extended location is used when creating provisioned clusters (Hybrid AKS clusters). + * + * @return the hybridAksExtendedLocation value. + */ + ExtendedLocation hybridAksExtendedLocation(); + + /** + * Gets the lastSuccessfulVersionUpdateTime property: The date and time of the end of the last successful version + * update for the cluster. + * + * @return the lastSuccessfulVersionUpdateTime value. + */ + OffsetDateTime lastSuccessfulVersionUpdateTime(); + + /** + * Gets the managedCredentials property: The list of credentials that are managed for the cluster and can be rotated + * on-demand. + * + * @return the managedCredentials value. + */ + List managedCredentials(); + + /** + * Gets the manualActionCount property: The count of Manual Action Taken (MAT) events that have not been validated. + * + * @return the manualActionCount value. + */ + Long manualActionCount(); + + /** + * Gets the supportExpiryDate property: The support end date of the runtime version of the cluster. + * + * @return the supportExpiryDate value. + */ + String supportExpiryDate(); + /** * Gets the workloadResourceIds property: The list of workload resource IDs that are hosted within this cluster. * @@ -316,6 +339,13 @@ public interface Cluster { */ List workloadResourceIds(); + /** + * Gets the provisioningState property: The provisioning state of the cluster. + * + * @return the provisioningState value. + */ + ClusterProvisioningState provisioningState(); + /** * Gets the region of the resource. * @@ -402,10 +432,11 @@ interface WithResourceGroup { */ interface WithExtendedLocation { /** - * Specifies the extendedLocation property: The extended location of the cluster manager associated with the - * cluster.. + * Specifies the extendedLocation property: The extended location of the resource. This property is required + * when creating the resource.. * - * @param extendedLocation The extended location of the cluster manager associated with the cluster. + * @param extendedLocation The extended location of the resource. This property is required when creating + * the resource. * @return the next definition stage. */ WithAggregatorOrSingleRackDefinition withExtendedLocation(ExtendedLocation extendedLocation); @@ -471,14 +502,14 @@ interface WithNetworkFabricId { * created, but also allows for any other optional properties to be specified. */ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, - DefinitionStages.WithAnalyticsOutputSettings, DefinitionStages.WithAnalyticsWorkspaceId, - DefinitionStages.WithClusterLocation, DefinitionStages.WithClusterServicePrincipal, - DefinitionStages.WithCommandOutputSettings, DefinitionStages.WithComputeDeploymentThreshold, - DefinitionStages.WithComputeRackDefinitions, DefinitionStages.WithManagedResourceGroupConfiguration, - DefinitionStages.WithRuntimeProtectionConfiguration, DefinitionStages.WithSecretArchive, - DefinitionStages.WithSecretArchiveSettings, DefinitionStages.WithUpdateStrategy, - DefinitionStages.WithVulnerabilityScanningSettings, DefinitionStages.WithIfMatch, - DefinitionStages.WithIfNoneMatch { + DefinitionStages.WithKind, DefinitionStages.WithAnalyticsOutputSettings, + DefinitionStages.WithAnalyticsWorkspaceId, DefinitionStages.WithClusterLocation, + DefinitionStages.WithClusterServicePrincipal, DefinitionStages.WithCommandOutputSettings, + DefinitionStages.WithComputeDeploymentThreshold, DefinitionStages.WithComputeRackDefinitions, + DefinitionStages.WithManagedResourceGroupConfiguration, DefinitionStages.WithRuntimeProtectionConfiguration, + DefinitionStages.WithSecretArchive, DefinitionStages.WithSecretArchiveSettings, + DefinitionStages.WithUpdateStrategy, DefinitionStages.WithVulnerabilityScanningSettings, + DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { /** * Executes the create request. * @@ -513,14 +544,31 @@ interface WithTags { */ interface WithIdentity { /** - * Specifies the identity property: The identity for the resource.. + * Specifies the identity property: The managed service identities assigned to this resource.. * - * @param identity The identity for the resource. + * @param identity The managed service identities assigned to this resource. * @return the next definition stage. */ WithCreate withIdentity(ManagedServiceIdentity identity); } + /** + * The stage of the Cluster definition allowing to specify kind. + */ + interface WithKind { + /** + * Specifies the kind property: The type (kind) of the cluster. When specified, the value must exactly match + * the kind configured on the cluster manager that manages the cluster. If omitted, the service will default + * the value to the kind value of the cluster manager.. + * + * @param kind The type (kind) of the cluster. When specified, the value must exactly match the kind + * configured on the cluster manager that manages the cluster. If omitted, the service will default the + * value to the kind value of the cluster manager. + * @return the next definition stage. + */ + WithCreate withKind(DeploymentType kind); + } + /** * The stage of the Cluster definition allowing to specify analyticsOutputSettings. */ @@ -787,9 +835,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: The Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags.. * - * @param tags The Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); @@ -1031,8 +1079,6 @@ interface WithIfNoneMatch { Cluster refresh(Context context); /** - * Continue a paused update to the cluster version. - * * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after * completing a segment of the update. * @@ -1040,14 +1086,12 @@ interface WithIfNoneMatch { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult continueUpdateVersion(ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters); /** - * Continue a paused update to the cluster version. - * * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after * completing a segment of the update. * @@ -1056,25 +1100,21 @@ interface WithIfNoneMatch { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult continueUpdateVersion( ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters, Context context); /** - * Deploy the cluster. - * * Deploy the cluster using the rack configuration provided during creation. * * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult deploy(); /** - * Deploy the cluster. - * * Deploy the cluster using the rack configuration provided during creation. * * @param clusterDeployParameters The request body. @@ -1082,25 +1122,67 @@ OperationStatusResult continueUpdateVersion( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult deploy(ClusterDeployParameters clusterDeployParameters, Context context); /** - * Execute a runtime protection scan on the cluster. + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. + * + * @throws com.azure.core.management.exception.ManagementException 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. + */ + OperationStatusResult inspect(); + + /** + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. + * + * @param clusterInspectParameters The request body. + * @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. + */ + OperationStatusResult inspect(ClusterInspectParameters clusterInspectParameters, Context context); + + /** + * Rotate the specified cluster credential. + * + * @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 response. + */ + OperationStatusResult rotateCredential(ClusterRotateCredentialParameters body); + + /** + * Rotate the specified cluster credential. * + * @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 response. + */ + OperationStatusResult rotateCredential(ClusterRotateCredentialParameters body, Context context); + + /** * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult scanRuntime(); /** - * Execute a runtime protection scan on the cluster. - * * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -1109,26 +1191,22 @@ OperationStatusResult continueUpdateVersion( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult scanRuntime(ClusterScanRuntimeParameters clusterScanRuntimeParameters, Context context); /** - * Update the cluster version. - * * Update the version of the provided cluster to one of the available supported versions. * * @param clusterUpdateVersionParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult updateVersion(ClusterUpdateVersionParameters clusterUpdateVersionParameters); /** - * Update the cluster version. - * * Update the version of the provided cluster to one of the available supported versions. * * @param clusterUpdateVersionParameters The request body. @@ -1136,7 +1214,7 @@ OperationStatusResult continueUpdateVersion( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult updateVersion(ClusterUpdateVersionParameters clusterUpdateVersionParameters, Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterAvailableUpgradeVersion.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterAvailableUpgradeVersion.java index 3fa3393b9a81..e2428c5649cd 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterAvailableUpgradeVersion.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterAvailableUpgradeVersion.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -49,7 +49,7 @@ public final class ClusterAvailableUpgradeVersion implements JsonSerializable { /* * The remaining appliance-based storage in GB available for workload use. Measured in gibibytes. @@ -59,7 +59,7 @@ public final class ClusterCapacity implements JsonSerializable /** * Creates an instance of ClusterCapacity class. */ - public ClusterCapacity() { + private ClusterCapacity() { } /** @@ -72,18 +72,6 @@ public Long availableApplianceStorageGB() { return this.availableApplianceStorageGB; } - /** - * Set the availableApplianceStorageGB property: The remaining appliance-based storage in GB available for workload - * use. Measured in gibibytes. - * - * @param availableApplianceStorageGB the availableApplianceStorageGB value to set. - * @return the ClusterCapacity object itself. - */ - public ClusterCapacity withAvailableApplianceStorageGB(Long availableApplianceStorageGB) { - this.availableApplianceStorageGB = availableApplianceStorageGB; - return this; - } - /** * Get the availableCoreCount property: The remaining number of cores that are available in this cluster for * workload use. @@ -94,18 +82,6 @@ public Long availableCoreCount() { return this.availableCoreCount; } - /** - * Set the availableCoreCount property: The remaining number of cores that are available in this cluster for - * workload use. - * - * @param availableCoreCount the availableCoreCount value to set. - * @return the ClusterCapacity object itself. - */ - public ClusterCapacity withAvailableCoreCount(Long availableCoreCount) { - this.availableCoreCount = availableCoreCount; - return this; - } - /** * Get the availableHostStorageGB property: The remaining machine or host-based storage in GB available for workload * use. Measured in gibibytes. @@ -116,18 +92,6 @@ public Long availableHostStorageGB() { return this.availableHostStorageGB; } - /** - * Set the availableHostStorageGB property: The remaining machine or host-based storage in GB available for workload - * use. Measured in gibibytes. - * - * @param availableHostStorageGB the availableHostStorageGB value to set. - * @return the ClusterCapacity object itself. - */ - public ClusterCapacity withAvailableHostStorageGB(Long availableHostStorageGB) { - this.availableHostStorageGB = availableHostStorageGB; - return this; - } - /** * Get the availableMemoryGB property: The remaining memory in GB that are available in this cluster for workload * use. Measured in gibibytes. @@ -138,18 +102,6 @@ public Long availableMemoryGB() { return this.availableMemoryGB; } - /** - * Set the availableMemoryGB property: The remaining memory in GB that are available in this cluster for workload - * use. Measured in gibibytes. - * - * @param availableMemoryGB the availableMemoryGB value to set. - * @return the ClusterCapacity object itself. - */ - public ClusterCapacity withAvailableMemoryGB(Long availableMemoryGB) { - this.availableMemoryGB = availableMemoryGB; - return this; - } - /** * Get the totalApplianceStorageGB property: The total appliance-based storage in GB supported by this cluster for * workload use. Measured in gibibytes. @@ -160,18 +112,6 @@ public Long totalApplianceStorageGB() { return this.totalApplianceStorageGB; } - /** - * Set the totalApplianceStorageGB property: The total appliance-based storage in GB supported by this cluster for - * workload use. Measured in gibibytes. - * - * @param totalApplianceStorageGB the totalApplianceStorageGB value to set. - * @return the ClusterCapacity object itself. - */ - public ClusterCapacity withTotalApplianceStorageGB(Long totalApplianceStorageGB) { - this.totalApplianceStorageGB = totalApplianceStorageGB; - return this; - } - /** * Get the totalCoreCount property: The total number of cores that are supported by this cluster for workload use. * @@ -181,17 +121,6 @@ public Long totalCoreCount() { return this.totalCoreCount; } - /** - * Set the totalCoreCount property: The total number of cores that are supported by this cluster for workload use. - * - * @param totalCoreCount the totalCoreCount value to set. - * @return the ClusterCapacity object itself. - */ - public ClusterCapacity withTotalCoreCount(Long totalCoreCount) { - this.totalCoreCount = totalCoreCount; - return this; - } - /** * Get the totalHostStorageGB property: The total machine or host-based storage in GB supported by this cluster for * workload use. Measured in gibibytes. @@ -202,18 +131,6 @@ public Long totalHostStorageGB() { return this.totalHostStorageGB; } - /** - * Set the totalHostStorageGB property: The total machine or host-based storage in GB supported by this cluster for - * workload use. Measured in gibibytes. - * - * @param totalHostStorageGB the totalHostStorageGB value to set. - * @return the ClusterCapacity object itself. - */ - public ClusterCapacity withTotalHostStorageGB(Long totalHostStorageGB) { - this.totalHostStorageGB = totalHostStorageGB; - return this; - } - /** * Get the totalMemoryGB property: The total memory supported by this cluster for workload use. Measured in * gibibytes. @@ -224,26 +141,6 @@ public Long totalMemoryGB() { return this.totalMemoryGB; } - /** - * Set the totalMemoryGB property: The total memory supported by this cluster for workload use. Measured in - * gibibytes. - * - * @param totalMemoryGB the totalMemoryGB value to set. - * @return the ClusterCapacity object itself. - */ - public ClusterCapacity withTotalMemoryGB(Long totalMemoryGB) { - this.totalMemoryGB = totalMemoryGB; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterConnectionStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterConnectionStatus.java index b4ce91801626..dd4e22058b83 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterConnectionStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterConnectionStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,22 +12,22 @@ */ public final class ClusterConnectionStatus extends ExpandableStringEnum { /** - * Static value Connected for ClusterConnectionStatus. + * The latest heartbeat status is healthy. */ public static final ClusterConnectionStatus CONNECTED = fromString("Connected"); /** - * Static value Disconnected for ClusterConnectionStatus. + * The latest heartbeat status is unhealthy. */ public static final ClusterConnectionStatus DISCONNECTED = fromString("Disconnected"); /** - * Static value Timeout for ClusterConnectionStatus. + * Too many of the latest heartbeats were missed. */ public static final ClusterConnectionStatus TIMEOUT = fromString("Timeout"); /** - * Static value Undefined for ClusterConnectionStatus. + * Could not determine the latest heartbeat status. */ public static final ClusterConnectionStatus UNDEFINED = fromString("Undefined"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterContinueUpdateVersionMachineGroupTargetingMode.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterContinueUpdateVersionMachineGroupTargetingMode.java index b4cd2efb1f76..2e3be606a8f9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterContinueUpdateVersionMachineGroupTargetingMode.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterContinueUpdateVersionMachineGroupTargetingMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,7 +13,7 @@ public final class ClusterContinueUpdateVersionMachineGroupTargetingMode extends ExpandableStringEnum { /** - * Static value AlphaByRack for ClusterContinueUpdateVersionMachineGroupTargetingMode. + * Racks will be targeted for update in alphabetical order based on the rack name. */ public static final ClusterContinueUpdateVersionMachineGroupTargetingMode ALPHA_BY_RACK = fromString("AlphaByRack"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterContinueUpdateVersionParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterContinueUpdateVersionParameters.java index 146f51948e15..11ba0f04ca05 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterContinueUpdateVersionParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterContinueUpdateVersionParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -23,6 +23,12 @@ public final class ClusterContinueUpdateVersionParameters */ private ClusterContinueUpdateVersionMachineGroupTargetingMode machineGroupTargetingMode; + /* + * Specifies how safeguards are applied during the continue update version operation. Use All to run all + * pre‑operation validation checks. Use None to bypass safeguards. If not specified, the default is All. + */ + private ClusterContinueUpdateVersionSafeguardMode safeguardMode; + /** * Creates an instance of ClusterContinueUpdateVersionParameters class. */ @@ -53,11 +59,28 @@ public ClusterContinueUpdateVersionMachineGroupTargetingMode machineGroupTargeti } /** - * Validates the instance. + * Get the safeguardMode property: Specifies how safeguards are applied during the continue update version + * operation. Use All to run all pre‑operation validation checks. Use None to bypass safeguards. If not specified, + * the default is All. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the safeguardMode value. */ - public void validate() { + public ClusterContinueUpdateVersionSafeguardMode safeguardMode() { + return this.safeguardMode; + } + + /** + * Set the safeguardMode property: Specifies how safeguards are applied during the continue update version + * operation. Use All to run all pre‑operation validation checks. Use None to bypass safeguards. If not specified, + * the default is All. + * + * @param safeguardMode the safeguardMode value to set. + * @return the ClusterContinueUpdateVersionParameters object itself. + */ + public ClusterContinueUpdateVersionParameters + withSafeguardMode(ClusterContinueUpdateVersionSafeguardMode safeguardMode) { + this.safeguardMode = safeguardMode; + return this; } /** @@ -68,6 +91,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("machineGroupTargetingMode", this.machineGroupTargetingMode == null ? null : this.machineGroupTargetingMode.toString()); + jsonWriter.writeStringField("safeguardMode", this.safeguardMode == null ? null : this.safeguardMode.toString()); return jsonWriter.writeEndObject(); } @@ -90,6 +114,9 @@ public static ClusterContinueUpdateVersionParameters fromJson(JsonReader jsonRea if ("machineGroupTargetingMode".equals(fieldName)) { deserializedClusterContinueUpdateVersionParameters.machineGroupTargetingMode = ClusterContinueUpdateVersionMachineGroupTargetingMode.fromString(reader.getString()); + } else if ("safeguardMode".equals(fieldName)) { + deserializedClusterContinueUpdateVersionParameters.safeguardMode + = ClusterContinueUpdateVersionSafeguardMode.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterContinueUpdateVersionSafeguardMode.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterContinueUpdateVersionSafeguardMode.java new file mode 100644 index 000000000000..d4ce48d15464 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterContinueUpdateVersionSafeguardMode.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * ClusterContinueUpdateVersionSafeguardMode represents the mode of the cluster continue update safeguards. + */ +public final class ClusterContinueUpdateVersionSafeguardMode + extends ExpandableStringEnum { + /** + * Run all pre‑operation validation checks before continuing the version update. If any check fails, the request is + * rejected and no changes are made. + */ + public static final ClusterContinueUpdateVersionSafeguardMode ALL = fromString("All"); + + /** + * Skip all safeguards and continue the version update without running pre‑operation validation checks. + */ + public static final ClusterContinueUpdateVersionSafeguardMode NONE = fromString("None"); + + /** + * Creates a new instance of ClusterContinueUpdateVersionSafeguardMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClusterContinueUpdateVersionSafeguardMode() { + } + + /** + * Creates or finds a ClusterContinueUpdateVersionSafeguardMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterContinueUpdateVersionSafeguardMode. + */ + public static ClusterContinueUpdateVersionSafeguardMode fromString(String name) { + return fromString(name, ClusterContinueUpdateVersionSafeguardMode.class); + } + + /** + * Gets known ClusterContinueUpdateVersionSafeguardMode values. + * + * @return known ClusterContinueUpdateVersionSafeguardMode values. + */ + public static Collection values() { + return values(ClusterContinueUpdateVersionSafeguardMode.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterDeployParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterDeployParameters.java index 6de1851575dd..f7207bf3e3e1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterDeployParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterDeployParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -50,14 +50,6 @@ public ClusterDeployParameters withSkipValidationsForMachines(List skipV return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterDetailedStatus.java index 7328a86d237e..cdb5c970ca24 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,47 +12,47 @@ */ public final class ClusterDetailedStatus extends ExpandableStringEnum { /** - * Static value PendingDeployment for ClusterDetailedStatus. + * The PendingDeployment status. */ public static final ClusterDetailedStatus PENDING_DEPLOYMENT = fromString("PendingDeployment"); /** - * Static value Deploying for ClusterDetailedStatus. + * The Deploying status. */ public static final ClusterDetailedStatus DEPLOYING = fromString("Deploying"); /** - * Static value Running for ClusterDetailedStatus. + * The Running status. */ public static final ClusterDetailedStatus RUNNING = fromString("Running"); /** - * Static value Updating for ClusterDetailedStatus. + * The Updating status. */ public static final ClusterDetailedStatus UPDATING = fromString("Updating"); /** - * Static value UpdatePaused for ClusterDetailedStatus. + * The UpdatePaused status. */ public static final ClusterDetailedStatus UPDATE_PAUSED = fromString("UpdatePaused"); /** - * Static value Degraded for ClusterDetailedStatus. + * The Degraded status. */ public static final ClusterDetailedStatus DEGRADED = fromString("Degraded"); /** - * Static value Deleting for ClusterDetailedStatus. + * The Deleting status. */ public static final ClusterDetailedStatus DELETING = fromString("Deleting"); /** - * Static value Disconnected for ClusterDetailedStatus. + * The Disconnected status. */ public static final ClusterDetailedStatus DISCONNECTED = fromString("Disconnected"); /** - * Static value Failed for ClusterDetailedStatus. + * The Failed status. */ public static final ClusterDetailedStatus FAILED = fromString("Failed"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterInspectAdditionalAction.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterInspectAdditionalAction.java new file mode 100644 index 000000000000..9e7b767435c9 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterInspectAdditionalAction.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.networkcloud.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Additional actions supplement the default non-disruptive cluster inspection. Additional actions may be disallowed if + * the cluster is in a deployed and running state. + */ +public final class ClusterInspectAdditionalAction extends ExpandableStringEnum { + /** + * Indicates that hardware reset should be performed during inspection. + */ + public static final ClusterInspectAdditionalAction RESET_HARDWARE = fromString("ResetHardware"); + + /** + * Creates a new instance of ClusterInspectAdditionalAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClusterInspectAdditionalAction() { + } + + /** + * Creates or finds a ClusterInspectAdditionalAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterInspectAdditionalAction. + */ + public static ClusterInspectAdditionalAction fromString(String name) { + return fromString(name, ClusterInspectAdditionalAction.class); + } + + /** + * Gets known ClusterInspectAdditionalAction values. + * + * @return known ClusterInspectAdditionalAction values. + */ + public static Collection values() { + return values(ClusterInspectAdditionalAction.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterInspectParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterInspectParameters.java new file mode 100644 index 000000000000..3e942ad47fd2 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterInspectParameters.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.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; + +/** + * ClusterInspectParameters represents the body of the request to inspect the cluster. + */ +@Fluent +public final class ClusterInspectParameters implements JsonSerializable { + /* + * Additional actions supplement the default non-disruptive cluster inspection. Additional actions may be disallowed + * if the cluster is in a deployed and running state. + */ + private List additionalActions; + + /* + * Indicates which devices are included in the inspection. By default, all devices that can be targeted will be + * included in the inspection. + */ + private FilterDevices filterDevices; + + /** + * Creates an instance of ClusterInspectParameters class. + */ + public ClusterInspectParameters() { + } + + /** + * Get the additionalActions property: Additional actions supplement the default non-disruptive cluster inspection. + * Additional actions may be disallowed if the cluster is in a deployed and running state. + * + * @return the additionalActions value. + */ + public List additionalActions() { + return this.additionalActions; + } + + /** + * Set the additionalActions property: Additional actions supplement the default non-disruptive cluster inspection. + * Additional actions may be disallowed if the cluster is in a deployed and running state. + * + * @param additionalActions the additionalActions value to set. + * @return the ClusterInspectParameters object itself. + */ + public ClusterInspectParameters withAdditionalActions(List additionalActions) { + this.additionalActions = additionalActions; + return this; + } + + /** + * Get the filterDevices property: Indicates which devices are included in the inspection. By default, all devices + * that can be targeted will be included in the inspection. + * + * @return the filterDevices value. + */ + public FilterDevices filterDevices() { + return this.filterDevices; + } + + /** + * Set the filterDevices property: Indicates which devices are included in the inspection. By default, all devices + * that can be targeted will be included in the inspection. + * + * @param filterDevices the filterDevices value to set. + * @return the ClusterInspectParameters object itself. + */ + public ClusterInspectParameters withFilterDevices(FilterDevices filterDevices) { + this.filterDevices = filterDevices; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("additionalActions", this.additionalActions, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeJsonField("filterDevices", this.filterDevices); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterInspectParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterInspectParameters 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 ClusterInspectParameters. + */ + public static ClusterInspectParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterInspectParameters deserializedClusterInspectParameters = new ClusterInspectParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("additionalActions".equals(fieldName)) { + List additionalActions + = reader.readArray(reader1 -> ClusterInspectAdditionalAction.fromString(reader1.getString())); + deserializedClusterInspectParameters.additionalActions = additionalActions; + } else if ("filterDevices".equals(fieldName)) { + deserializedClusterInspectParameters.filterDevices = FilterDevices.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterInspectParameters; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManager.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManager.java index 3d85cee776f3..e28b6eea223d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManager.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -51,19 +51,29 @@ public interface ClusterManager { Map tags(); /** - * Gets the etag property: Resource ETag. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ String etag(); /** - * Gets the identity property: The identity of the cluster manager. + * Gets the identity property: The managed service identities assigned to this resource. * * @return the identity value. */ ManagedServiceIdentity identity(); + /** + * Gets the kind property: The kind of the cluster manager. + * + * @return the kind value. + */ + DeploymentType kind(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -142,6 +152,13 @@ public interface ClusterManager { */ ClusterManagerProvisioningState provisioningState(); + /** + * Gets the relayConfiguration property: The relay configuration for the cluster manager. + * + * @return the relayConfiguration value. + */ + ClusterManagerRelayConfiguration relayConfiguration(); + /** * Gets the vmSize property: The size of the Azure virtual machines to use for hosting the cluster manager resource. * @@ -247,8 +264,8 @@ interface WithFabricControllerId { * The stage of the ClusterManager 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.WithIdentity, DefinitionStages.WithAnalyticsWorkspaceId, + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithAnalyticsWorkspaceId, DefinitionStages.WithAvailabilityZones, DefinitionStages.WithManagedResourceGroupConfiguration, DefinitionStages.WithVmSize, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { /** @@ -285,14 +302,27 @@ interface WithTags { */ interface WithIdentity { /** - * Specifies the identity property: The identity of the cluster manager.. + * Specifies the identity property: The managed service identities assigned to this resource.. * - * @param identity The identity of the cluster manager. + * @param identity The managed service identities assigned to this resource. * @return the next definition stage. */ WithCreate withIdentity(ManagedServiceIdentity identity); } + /** + * The stage of the ClusterManager definition allowing to specify kind. + */ + interface WithKind { + /** + * Specifies the kind property: The kind of the cluster manager.. + * + * @param kind The kind of the cluster manager. + * @return the next definition stage. + */ + WithCreate withKind(DeploymentType kind); + } + /** * The stage of the ClusterManager definition allowing to specify analyticsWorkspaceId. */ @@ -422,9 +452,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: The Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags.. * - * @param tags The Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); @@ -489,4 +519,31 @@ interface WithIfNoneMatch { * @return the refreshed resource. */ ClusterManager refresh(Context context); + + /** + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. + * + * @throws com.azure.core.management.exception.ManagementException 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. + */ + OperationStatusResult updateRelayPrivateEndpointConnection(); + + /** + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. + * + * @param clusterManagerUpdateRelayPrivateEndpointConnectionParameters The request body. + * @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. + */ + OperationStatusResult updateRelayPrivateEndpointConnection( + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters, + Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerConnectionStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerConnectionStatus.java index aa9492cdf5de..5665bf28511a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerConnectionStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerConnectionStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class ClusterManagerConnectionStatus extends ExpandableStringEnum { /** - * Static value Connected for ClusterManagerConnectionStatus. + * The latest connectivity status is healthy. */ public static final ClusterManagerConnectionStatus CONNECTED = fromString("Connected"); /** - * Static value Unreachable for ClusterManagerConnectionStatus. + * Connectivity could not be established. */ public static final ClusterManagerConnectionStatus UNREACHABLE = fromString("Unreachable"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerDetailedStatus.java index 31868c474ac7..ea3271c912d7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,32 +12,32 @@ */ public final class ClusterManagerDetailedStatus extends ExpandableStringEnum { /** - * Static value Error for ClusterManagerDetailedStatus. + * The Error status. */ public static final ClusterManagerDetailedStatus ERROR = fromString("Error"); /** - * Static value Available for ClusterManagerDetailedStatus. + * The Available status. */ public static final ClusterManagerDetailedStatus AVAILABLE = fromString("Available"); /** - * Static value Provisioning for ClusterManagerDetailedStatus. + * The Provisioning status. */ public static final ClusterManagerDetailedStatus PROVISIONING = fromString("Provisioning"); /** - * Static value ProvisioningFailed for ClusterManagerDetailedStatus. + * The ProvisioningFailed status. */ public static final ClusterManagerDetailedStatus PROVISIONING_FAILED = fromString("ProvisioningFailed"); /** - * Static value Updating for ClusterManagerDetailedStatus. + * The Updating status. */ public static final ClusterManagerDetailedStatus UPDATING = fromString("Updating"); /** - * Static value UpdateFailed for ClusterManagerDetailedStatus. + * The UpdateFailed status. */ public static final ClusterManagerDetailedStatus UPDATE_FAILED = fromString("UpdateFailed"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerPatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerPatchParameters.java index 08e10bcf757b..89d1bd9d983e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerPatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerPatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -23,7 +23,7 @@ public final class ClusterManagerPatchParameters implements JsonSerializable tags; @@ -54,7 +54,7 @@ public ClusterManagerPatchParameters withIdentity(ManagedServiceIdentity identit } /** - * Get the tags property: The Azure resource tags that will replace the existing ones. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -63,7 +63,7 @@ public Map tags() { } /** - * Set the tags property: The Azure resource tags that will replace the existing ones. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the ClusterManagerPatchParameters object itself. @@ -73,17 +73,6 @@ public ClusterManagerPatchParameters withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerProvisioningState.java index cc2eb1f88796..8219adbc843f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerProvisioningState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,32 +12,32 @@ */ public final class ClusterManagerProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for ClusterManagerProvisioningState. + * The Succeeded status. */ public static final ClusterManagerProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for ClusterManagerProvisioningState. + * The Failed status. */ public static final ClusterManagerProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for ClusterManagerProvisioningState. + * The Canceled status. */ public static final ClusterManagerProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Provisioning for ClusterManagerProvisioningState. + * The Provisioning status. */ public static final ClusterManagerProvisioningState PROVISIONING = fromString("Provisioning"); /** - * Static value Accepted for ClusterManagerProvisioningState. + * The Accepted status. */ public static final ClusterManagerProvisioningState ACCEPTED = fromString("Accepted"); /** - * Static value Updating for ClusterManagerProvisioningState. + * The Updating status. */ public static final ClusterManagerProvisioningState UPDATING = fromString("Updating"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerRelayConfiguration.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerRelayConfiguration.java new file mode 100644 index 000000000000..2c81558db4e8 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerRelayConfiguration.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.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; + +/** + * ClusterManagerRelayConfiguration represents the relay configuration for the cluster manager. + */ +@Immutable +public final class ClusterManagerRelayConfiguration implements JsonSerializable { + /* + * The resource ID of the Azure relay namespace managed by the cluster manager. + */ + private String relayNamespaceId; + + /** + * Creates an instance of ClusterManagerRelayConfiguration class. + */ + private ClusterManagerRelayConfiguration() { + } + + /** + * Get the relayNamespaceId property: The resource ID of the Azure relay namespace managed by the cluster manager. + * + * @return the relayNamespaceId value. + */ + public String relayNamespaceId() { + return this.relayNamespaceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("relayNamespaceId", this.relayNamespaceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterManagerRelayConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterManagerRelayConfiguration 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 ClusterManagerRelayConfiguration. + */ + public static ClusterManagerRelayConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterManagerRelayConfiguration deserializedClusterManagerRelayConfiguration + = new ClusterManagerRelayConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("relayNamespaceId".equals(fieldName)) { + deserializedClusterManagerRelayConfiguration.relayNamespaceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterManagerRelayConfiguration; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerUpdateRelayPrivateEndpointConnectionParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerUpdateRelayPrivateEndpointConnectionParameters.java new file mode 100644 index 000000000000..2749176008a5 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerUpdateRelayPrivateEndpointConnectionParameters.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.networkcloud.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; + +/** + * ClusterManagerUpdateRelayPrivateEndpointConnectionParameters represents the body of the request to approve or reject + * the relay private endpoint connection for the private relay managed by a cluster manager. + */ +@Fluent +public final class ClusterManagerUpdateRelayPrivateEndpointConnectionParameters + implements JsonSerializable { + /* + * The state to set for the private endpoint connection. + */ + private RelayPrivateEndpointConnectionState connectionState; + + /* + * The description to associate with the private endpoint connection. + */ + private String description; + + /* + * The resource ID of private endpoint to be permitted or denied connection to the relay namespace. + */ + private String privateEndpointResourceId; + + /** + * Creates an instance of ClusterManagerUpdateRelayPrivateEndpointConnectionParameters class. + */ + public ClusterManagerUpdateRelayPrivateEndpointConnectionParameters() { + } + + /** + * Get the connectionState property: The state to set for the private endpoint connection. + * + * @return the connectionState value. + */ + public RelayPrivateEndpointConnectionState connectionState() { + return this.connectionState; + } + + /** + * Set the connectionState property: The state to set for the private endpoint connection. + * + * @param connectionState the connectionState value to set. + * @return the ClusterManagerUpdateRelayPrivateEndpointConnectionParameters object itself. + */ + public ClusterManagerUpdateRelayPrivateEndpointConnectionParameters + withConnectionState(RelayPrivateEndpointConnectionState connectionState) { + this.connectionState = connectionState; + return this; + } + + /** + * Get the description property: The description to associate with the private endpoint connection. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description to associate with the private endpoint connection. + * + * @param description the description value to set. + * @return the ClusterManagerUpdateRelayPrivateEndpointConnectionParameters object itself. + */ + public ClusterManagerUpdateRelayPrivateEndpointConnectionParameters withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the privateEndpointResourceId property: The resource ID of private endpoint to be permitted or denied + * connection to the relay namespace. + * + * @return the privateEndpointResourceId value. + */ + public String privateEndpointResourceId() { + return this.privateEndpointResourceId; + } + + /** + * Set the privateEndpointResourceId property: The resource ID of private endpoint to be permitted or denied + * connection to the relay namespace. + * + * @param privateEndpointResourceId the privateEndpointResourceId value to set. + * @return the ClusterManagerUpdateRelayPrivateEndpointConnectionParameters object itself. + */ + public ClusterManagerUpdateRelayPrivateEndpointConnectionParameters + withPrivateEndpointResourceId(String privateEndpointResourceId) { + this.privateEndpointResourceId = privateEndpointResourceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("connectionState", + this.connectionState == null ? null : this.connectionState.toString()); + jsonWriter.writeStringField("privateEndpointResourceId", this.privateEndpointResourceId); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterManagerUpdateRelayPrivateEndpointConnectionParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterManagerUpdateRelayPrivateEndpointConnectionParameters 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 + * ClusterManagerUpdateRelayPrivateEndpointConnectionParameters. + */ + public static ClusterManagerUpdateRelayPrivateEndpointConnectionParameters fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters deserializedClusterManagerUpdateRelayPrivateEndpointConnectionParameters + = new ClusterManagerUpdateRelayPrivateEndpointConnectionParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("connectionState".equals(fieldName)) { + deserializedClusterManagerUpdateRelayPrivateEndpointConnectionParameters.connectionState + = RelayPrivateEndpointConnectionState.fromString(reader.getString()); + } else if ("privateEndpointResourceId".equals(fieldName)) { + deserializedClusterManagerUpdateRelayPrivateEndpointConnectionParameters.privateEndpointResourceId + = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedClusterManagerUpdateRelayPrivateEndpointConnectionParameters.description + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterManagerUpdateRelayPrivateEndpointConnectionParameters; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagers.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagers.java index dda4768a62de..0b7be0c707db 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagers.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,35 +13,60 @@ */ public interface ClusterManagers { /** - * List cluster managers in the subscription. + * Get the properties of the provided cluster manager. * - * Get a list of cluster managers in the provided subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. + * @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 properties of the provided cluster manager along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String clusterManagerName, + Context context); + + /** + * Get the properties of the provided cluster manager. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 cluster managers in the provided subscription as paginated response with {@link PagedIterable}. + * @return the properties of the provided cluster manager. */ - PagedIterable list(); + ClusterManager getByResourceGroup(String resourceGroupName, String clusterManagerName); /** - * List cluster managers in the subscription. + * Delete the provided cluster manager. * - * Get a list of cluster managers in the provided subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterManagerName); + + /** + * Delete the provided cluster manager. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterManagerName The name of the cluster manager. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 cluster managers in the provided subscription as paginated response with {@link PagedIterable}. */ - PagedIterable list(Integer top, String skipToken, Context context); + void delete(String resourceGroupName, String clusterManagerName, String ifMatch, String ifNoneMatch, + Context context); /** - * List cluster managers in the resource group. - * * Get a list of cluster managers in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -54,8 +79,6 @@ public interface ClusterManagers { PagedIterable listByResourceGroup(String resourceGroupName); /** - * List cluster managers in the resource group. - * * Get a list of cluster managers in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -73,72 +96,61 @@ PagedIterable listByResourceGroup(String resourceGroupName, Inte Context context); /** - * Retrieve the cluster manager. - * - * Get the properties of the provided cluster manager. + * Get a list of cluster managers in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterManagerName The name of the cluster manager. - * @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 properties of the provided cluster manager along with {@link Response}. + * @return a list of cluster managers in the provided subscription as paginated response with {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String clusterManagerName, - Context context); + PagedIterable list(); /** - * Retrieve the cluster manager. - * - * Get the properties of the provided cluster manager. + * Get a list of cluster managers in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterManagerName The name of the cluster manager. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 properties of the provided cluster manager. + * @return a list of cluster managers in the provided subscription as paginated response with {@link PagedIterable}. */ - ClusterManager getByResourceGroup(String resourceGroupName, String clusterManagerName); + PagedIterable list(Integer top, String skipToken, Context context); /** - * Delete the cluster manager. - * - * Delete the provided cluster manager. + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ - OperationStatusResult deleteByResourceGroup(String resourceGroupName, String clusterManagerName); + OperationStatusResult updateRelayPrivateEndpointConnection(String resourceGroupName, String clusterManagerName); /** - * Delete the cluster manager. - * - * Delete the provided cluster manager. + * Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. + * Use this operation to approve or reject a pending private endpoint connection request for the relay namespace + * managed by the cluster manager. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterManagerName The name of the cluster manager. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param clusterManagerUpdateRelayPrivateEndpointConnectionParameters The request body. * @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. + * @return the response. */ - OperationStatusResult delete(String resourceGroupName, String clusterManagerName, String ifMatch, - String ifNoneMatch, Context context); + OperationStatusResult updateRelayPrivateEndpointConnection(String resourceGroupName, String clusterManagerName, + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters clusterManagerUpdateRelayPrivateEndpointConnectionParameters, + Context context); /** - * Retrieve the cluster manager. - * * Get the properties of the provided cluster manager. * * @param id the resource ID. @@ -150,8 +162,6 @@ OperationStatusResult delete(String resourceGroupName, String clusterManagerName ClusterManager getById(String id); /** - * Retrieve the cluster manager. - * * Get the properties of the provided cluster manager. * * @param id the resource ID. @@ -164,21 +174,16 @@ OperationStatusResult delete(String resourceGroupName, String clusterManagerName Response getByIdWithResponse(String id, Context context); /** - * Delete the cluster manager. - * * Delete the provided cluster manager. * * @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 current status of an async operation. */ - OperationStatusResult deleteById(String id); + void deleteById(String id); /** - * Delete the cluster manager. - * * Delete the provided cluster manager. * * @param id the resource ID. @@ -190,9 +195,8 @@ OperationStatusResult delete(String resourceGroupName, String clusterManagerName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); + void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); /** * Begins definition for a new ClusterManager resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfiguration.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfiguration.java index aad7c96dc484..ac8ed66d669a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfiguration.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -51,14 +51,18 @@ public interface ClusterMetricsConfiguration { Map tags(); /** - * Gets the etag property: Resource ETag. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ String etag(); /** - * Gets the extendedLocation property: The extended location of the cluster associated with the resource. + * Gets the extendedLocation property: The extended location of the resource. This property is required when + * creating the resource. * * @return the extendedLocation value. */ @@ -71,6 +75,14 @@ public interface ClusterMetricsConfiguration { */ SystemData systemData(); + /** + * Gets the enabledMetrics property: The list of metric names that have been chosen to be enabled in addition to the + * core set of enabled metrics. + * + * @return the enabledMetrics value. + */ + List enabledMetrics(); + /** * Gets the collectionInterval property: The interval in minutes by which metrics will be collected. * @@ -100,14 +112,6 @@ public interface ClusterMetricsConfiguration { */ List disabledMetrics(); - /** - * Gets the enabledMetrics property: The list of metric names that have been chosen to be enabled in addition to the - * core set of enabled metrics. - * - * @return the enabledMetrics value. - */ - List enabledMetrics(); - /** * Gets the provisioningState property: The provisioning state of the metrics configuration. * @@ -201,10 +205,11 @@ interface WithParentResource { */ interface WithExtendedLocation { /** - * Specifies the extendedLocation property: The extended location of the cluster associated with the - * resource.. + * Specifies the extendedLocation property: The extended location of the resource. This property is required + * when creating the resource.. * - * @param extendedLocation The extended location of the cluster associated with the resource. + * @param extendedLocation The extended location of the resource. This property is required when creating + * the resource. * @return the next definition stage. */ WithCollectionInterval withExtendedLocation(ExtendedLocation extendedLocation); @@ -342,9 +347,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: The Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags.. * - * @param tags The Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfigurationDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfigurationDetailedStatus.java index 75133b69083f..73bba4253cc3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfigurationDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfigurationDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,17 +13,17 @@ public final class ClusterMetricsConfigurationDetailedStatus extends ExpandableStringEnum { /** - * Static value Processing for ClusterMetricsConfigurationDetailedStatus. + * The Processing status. */ public static final ClusterMetricsConfigurationDetailedStatus PROCESSING = fromString("Processing"); /** - * Static value Applied for ClusterMetricsConfigurationDetailedStatus. + * The Applied status. */ public static final ClusterMetricsConfigurationDetailedStatus APPLIED = fromString("Applied"); /** - * Static value Error for ClusterMetricsConfigurationDetailedStatus. + * The Error status. */ public static final ClusterMetricsConfigurationDetailedStatus ERROR = fromString("Error"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfigurationPatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfigurationPatchParameters.java index 8469955a3282..2c2b976ec078 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfigurationPatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfigurationPatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -27,7 +27,7 @@ public final class ClusterMetricsConfigurationPatchParameters private ClusterMetricsConfigurationPatchProperties innerProperties; /* - * The Azure resource tags that will replace the existing ones. + * Resource tags. */ private Map tags; @@ -47,7 +47,7 @@ private ClusterMetricsConfigurationPatchProperties innerProperties() { } /** - * Get the tags property: The Azure resource tags that will replace the existing ones. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -56,7 +56,7 @@ public Map tags() { } /** - * Set the tags property: The Azure resource tags that will replace the existing ones. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the ClusterMetricsConfigurationPatchParameters object itself. @@ -114,17 +114,6 @@ public ClusterMetricsConfigurationPatchParameters withEnabledMetrics(List { /** - * Static value Succeeded for ClusterMetricsConfigurationProvisioningState. + * The Succeeded status. */ public static final ClusterMetricsConfigurationProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for ClusterMetricsConfigurationProvisioningState. + * The Failed status. */ public static final ClusterMetricsConfigurationProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for ClusterMetricsConfigurationProvisioningState. + * The Canceled status. */ public static final ClusterMetricsConfigurationProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Accepted for ClusterMetricsConfigurationProvisioningState. + * The Accepted status. */ public static final ClusterMetricsConfigurationProvisioningState ACCEPTED = fromString("Accepted"); /** - * Static value Provisioning for ClusterMetricsConfigurationProvisioningState. + * The Provisioning status. */ public static final ClusterMetricsConfigurationProvisioningState PROVISIONING = fromString("Provisioning"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterPatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterPatchParameters.java index 0d2d5cd25cbe..b7a1e060ed23 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterPatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterPatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -30,7 +30,7 @@ public final class ClusterPatchParameters implements JsonSerializable tags; @@ -70,7 +70,7 @@ private ClusterPatchProperties innerProperties() { } /** - * Get the tags property: The Azure resource tags that will replace the existing ones. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -79,7 +79,7 @@ public Map tags() { } /** - * Set the tags property: The Azure resource tags that will replace the existing ones. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the ClusterPatchParameters object itself. @@ -388,20 +388,6 @@ public VulnerabilityScanningSettingsPatch vulnerabilityScanningSettings() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterProvisioningState.java index d552cf4b2f39..a62018bcf0d6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterProvisioningState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,32 +12,32 @@ */ public final class ClusterProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for ClusterProvisioningState. + * The Succeeded status. */ public static final ClusterProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for ClusterProvisioningState. + * The Failed status. */ public static final ClusterProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for ClusterProvisioningState. + * The Canceled status. */ public static final ClusterProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Accepted for ClusterProvisioningState. + * The Accepted status. */ public static final ClusterProvisioningState ACCEPTED = fromString("Accepted"); /** - * Static value Validating for ClusterProvisioningState. + * The Validating status. */ public static final ClusterProvisioningState VALIDATING = fromString("Validating"); /** - * Static value Updating for ClusterProvisioningState. + * The Updating status. */ public static final ClusterProvisioningState UPDATING = fromString("Updating"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterRotateCredentialParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterRotateCredentialParameters.java new file mode 100644 index 000000000000..110a5d18ec3a --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterRotateCredentialParameters.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.networkcloud.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; + +/** + * ClusterRotateCredentialParameters represents the body of the request to rotate cluster credentials. + */ +@Fluent +public final class ClusterRotateCredentialParameters implements JsonSerializable { + /* + * The list of credential names for the credentials to rotate. + */ + private List credentials; + + /** + * Creates an instance of ClusterRotateCredentialParameters class. + */ + public ClusterRotateCredentialParameters() { + } + + /** + * Get the credentials property: The list of credential names for the credentials to rotate. + * + * @return the credentials value. + */ + public List credentials() { + return this.credentials; + } + + /** + * Set the credentials property: The list of credential names for the credentials to rotate. + * + * @param credentials the credentials value to set. + * @return the ClusterRotateCredentialParameters object itself. + */ + public ClusterRotateCredentialParameters withCredentials(List credentials) { + this.credentials = credentials; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("credentials", this.credentials, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterRotateCredentialParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterRotateCredentialParameters 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 ClusterRotateCredentialParameters. + */ + public static ClusterRotateCredentialParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterRotateCredentialParameters deserializedClusterRotateCredentialParameters + = new ClusterRotateCredentialParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("credentials".equals(fieldName)) { + List credentials = reader.readArray(reader1 -> reader1.getString()); + deserializedClusterRotateCredentialParameters.credentials = credentials; + } else { + reader.skipChildren(); + } + } + + return deserializedClusterRotateCredentialParameters; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterScanRuntimeParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterScanRuntimeParameters.java index 799799be2aff..be2160c5cbf2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterScanRuntimeParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterScanRuntimeParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -47,14 +47,6 @@ public ClusterScanRuntimeParameters withScanActivity(ClusterScanRuntimeParameter return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterScanRuntimeParametersScanActivity.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterScanRuntimeParametersScanActivity.java index 0d210fab3ad5..743a4c630172 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterScanRuntimeParametersScanActivity.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterScanRuntimeParametersScanActivity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,12 +13,12 @@ public final class ClusterScanRuntimeParametersScanActivity extends ExpandableStringEnum { /** - * Static value Scan for ClusterScanRuntimeParametersScanActivity. + * Scan the cluster. */ public static final ClusterScanRuntimeParametersScanActivity SCAN = fromString("Scan"); /** - * Static value Skip for ClusterScanRuntimeParametersScanActivity. + * Do not scan the cluster. */ public static final ClusterScanRuntimeParametersScanActivity SKIP = fromString("Skip"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterSecretArchive.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterSecretArchive.java index 4b4948e25777..3a89a41b2ed2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterSecretArchive.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterSecretArchive.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -75,21 +74,6 @@ public ClusterSecretArchive withUseKeyVault(ClusterSecretArchiveEnabled useKeyVa return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyVaultId() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property keyVaultId in model ClusterSecretArchive")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ClusterSecretArchive.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterSecretArchiveEnabled.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterSecretArchiveEnabled.java index 88ba06fa0d76..5a44a8b0b689 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterSecretArchiveEnabled.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterSecretArchiveEnabled.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class ClusterSecretArchiveEnabled extends ExpandableStringEnum { /** - * Static value True for ClusterSecretArchiveEnabled. + * Enable the cluster secret archive with the specified key vault. */ public static final ClusterSecretArchiveEnabled TRUE = fromString("True"); /** - * Static value False for ClusterSecretArchiveEnabled. + * Disable use of the cluster secret archive even if a key vault is specified. */ public static final ClusterSecretArchiveEnabled FALSE = fromString("False"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterType.java index cf31299db584..9a8b3e1cea27 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class ClusterType extends ExpandableStringEnum { /** - * Static value SingleRack for ClusterType. + * Single rack configuration. */ public static final ClusterType SINGLE_RACK = fromString("SingleRack"); /** - * Static value MultiRack for ClusterType. + * Multi-rack configuration. */ public static final ClusterType MULTI_RACK = fromString("MultiRack"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateStrategy.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateStrategy.java index 5ee400264a93..707fb133013f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateStrategy.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateStrategy.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -153,26 +152,6 @@ public ClusterUpdateStrategy withWaitTimeMinutes(Long waitTimeMinutes) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (strategyType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property strategyType in model ClusterUpdateStrategy")); - } - if (thresholdType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property thresholdType in model ClusterUpdateStrategy")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ClusterUpdateStrategy.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateStrategyType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateStrategyType.java index 5f10cbd5d831..5ba955e5de2a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateStrategyType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateStrategyType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class ClusterUpdateStrategyType extends ExpandableStringEnum { /** - * Static value Rack for ClusterUpdateStrategyType. + * Update the cluster in rack-by-rack increments. */ public static final ClusterUpdateStrategyType RACK = fromString("Rack"); /** - * Static value PauseAfterRack for ClusterUpdateStrategyType. + * Pause after each rack is updated. */ public static final ClusterUpdateStrategyType PAUSE_AFTER_RACK = fromString("PauseAfterRack"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateVersionParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateVersionParameters.java index dc53521a67cf..64e0a85b9dc0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateVersionParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateVersionParameters.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -17,6 +16,12 @@ */ @Fluent public final class ClusterUpdateVersionParameters implements JsonSerializable { + /* + * Specifies how safeguards are applied during the update version operation. Use All to run all pre‑operation + * validation checks. Use None to bypass safeguards. If not specified, the default is All. + */ + private ClusterUpdateVersionSafeguardMode safeguardMode; + /* * The version to be applied to the cluster during update. */ @@ -28,6 +33,28 @@ public final class ClusterUpdateVersionParameters implements JsonSerializable { + /** + * Run all pre‑operation validation checks before performing the version update. If any check fails, the request is + * rejected and no changes are made. + */ + public static final ClusterUpdateVersionSafeguardMode ALL = fromString("All"); + + /** + * Skip all safeguards and perform the version update without running pre‑operation validation checks. + */ + public static final ClusterUpdateVersionSafeguardMode NONE = fromString("None"); + + /** + * Creates a new instance of ClusterUpdateVersionSafeguardMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClusterUpdateVersionSafeguardMode() { + } + + /** + * Creates or finds a ClusterUpdateVersionSafeguardMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterUpdateVersionSafeguardMode. + */ + public static ClusterUpdateVersionSafeguardMode fromString(String name) { + return fromString(name, ClusterUpdateVersionSafeguardMode.class); + } + + /** + * Gets known ClusterUpdateVersionSafeguardMode values. + * + * @return known ClusterUpdateVersionSafeguardMode values. + */ + public static Collection values() { + return values(ClusterUpdateVersionSafeguardMode.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Clusters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Clusters.java index fb6272367d24..65ac772f6050 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Clusters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Clusters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,35 +13,58 @@ */ public interface Clusters { /** - * List clusters in the subscription. + * Get properties of the provided cluster. * - * Get a list of clusters in the provided subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 properties of the provided cluster along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, Context context); + + /** + * Get properties of the provided cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 clusters in the provided subscription as paginated response with {@link PagedIterable}. + * @return properties of the provided cluster. */ - PagedIterable list(); + Cluster getByResourceGroup(String resourceGroupName, String clusterName); /** - * List clusters in the subscription. + * Delete the provided cluster. * - * Get a list of clusters in the provided subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterName); + + /** + * Delete the provided cluster. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 clusters in the provided subscription as paginated response with {@link PagedIterable}. */ - PagedIterable list(Integer top, String skipToken, Context context); + void delete(String resourceGroupName, String clusterName, String ifMatch, String ifNoneMatch, Context context); /** - * List clusters in the resource group. - * * Get a list of clusters in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -53,8 +76,6 @@ public interface Clusters { PagedIterable listByResourceGroup(String resourceGroupName); /** - * List clusters in the resource group. - * * Get a list of clusters in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -71,137 +92,145 @@ PagedIterable listByResourceGroup(String resourceGroupName, Integer top Context context); /** - * Retrieve the cluster. + * Get a list of clusters in the provided subscription. * - * Get properties of the provided cluster. + * @throws com.azure.core.management.exception.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 clusters in the provided subscription as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Get a list of clusters in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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 properties of the provided cluster along with {@link Response}. + * @return a list of clusters in the provided subscription as paginated response with {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, Context context); + PagedIterable list(Integer top, String skipToken, Context context); /** - * Retrieve the cluster. - * - * Get properties of the provided cluster. + * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after + * completing a segment of the update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param clusterContinueUpdateVersionParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the provided cluster. + * @return the response. */ - Cluster getByResourceGroup(String resourceGroupName, String clusterName); + OperationStatusResult continueUpdateVersion(String resourceGroupName, String clusterName, + ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters); /** - * Delete the cluster. - * - * Delete the provided cluster. + * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after + * completing a segment of the update. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param clusterContinueUpdateVersionParameters The request body. + * @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. + * @return the response. */ - OperationStatusResult deleteByResourceGroup(String resourceGroupName, String clusterName); + OperationStatusResult continueUpdateVersion(String resourceGroupName, String clusterName, + ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters, Context context); /** - * Delete the cluster. + * Deploy the cluster using the rack configuration provided during creation. * - * Delete the provided cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + OperationStatusResult deploy(String resourceGroupName, String clusterName); + + /** + * Deploy the cluster using the rack configuration provided during creation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param clusterDeployParameters The request body. * @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. + * @return the response. */ - OperationStatusResult delete(String resourceGroupName, String clusterName, String ifMatch, String ifNoneMatch, - Context context); + OperationStatusResult deploy(String resourceGroupName, String clusterName, + ClusterDeployParameters clusterDeployParameters, Context context); /** - * Continue a paused update to the cluster version. - * - * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after - * completing a segment of the update. + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterContinueUpdateVersionParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ - OperationStatusResult continueUpdateVersion(String resourceGroupName, String clusterName, - ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters); + OperationStatusResult inspect(String resourceGroupName, String clusterName); /** - * Continue a paused update to the cluster version. - * - * Trigger the continuation of an update for a cluster with a matching update strategy that has paused after - * completing a segment of the update. + * Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied + * additional actions and filters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterContinueUpdateVersionParameters The request body. + * @param clusterInspectParameters The request body. * @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. + * @return the response. */ - OperationStatusResult continueUpdateVersion(String resourceGroupName, String clusterName, - ClusterContinueUpdateVersionParameters clusterContinueUpdateVersionParameters, Context context); + OperationStatusResult inspect(String resourceGroupName, String clusterName, + ClusterInspectParameters clusterInspectParameters, Context context); /** - * Deploy the cluster. - * - * Deploy the cluster using the rack configuration provided during creation. + * Rotate the specified cluster credential. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @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. + * @return the response. */ - OperationStatusResult deploy(String resourceGroupName, String clusterName); + OperationStatusResult rotateCredential(String resourceGroupName, String clusterName, + ClusterRotateCredentialParameters body); /** - * Deploy the cluster. - * - * Deploy the cluster using the rack configuration provided during creation. + * Rotate the specified cluster credential. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param clusterDeployParameters The request body. + * @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. + * @return the response. */ - OperationStatusResult deploy(String resourceGroupName, String clusterName, - ClusterDeployParameters clusterDeployParameters, Context context); + OperationStatusResult rotateCredential(String resourceGroupName, String clusterName, + ClusterRotateCredentialParameters body, Context context); /** - * Execute a runtime protection scan on the cluster. - * * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -210,13 +239,11 @@ OperationStatusResult deploy(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult scanRuntime(String resourceGroupName, String clusterName); /** - * Execute a runtime protection scan on the cluster. - * * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with * the cluster configuration. * @@ -227,14 +254,12 @@ OperationStatusResult deploy(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult scanRuntime(String resourceGroupName, String clusterName, ClusterScanRuntimeParameters clusterScanRuntimeParameters, Context context); /** - * Update the cluster version. - * * Update the version of the provided cluster to one of the available supported versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -243,14 +268,12 @@ OperationStatusResult scanRuntime(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult updateVersion(String resourceGroupName, String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters); /** - * Update the cluster version. - * * Update the version of the provided cluster to one of the available supported versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -260,14 +283,12 @@ OperationStatusResult updateVersion(String resourceGroupName, String clusterName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult updateVersion(String resourceGroupName, String clusterName, ClusterUpdateVersionParameters clusterUpdateVersionParameters, Context context); /** - * Retrieve the cluster. - * * Get properties of the provided cluster. * * @param id the resource ID. @@ -279,8 +300,6 @@ OperationStatusResult updateVersion(String resourceGroupName, String clusterName Cluster getById(String id); /** - * Retrieve the cluster. - * * Get properties of the provided cluster. * * @param id the resource ID. @@ -293,21 +312,16 @@ OperationStatusResult updateVersion(String resourceGroupName, String clusterName Response getByIdWithResponse(String id, Context context); /** - * Delete the cluster. - * * Delete the provided cluster. * * @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 current status of an async operation. */ - OperationStatusResult deleteById(String id); + void deleteById(String id); /** - * Delete the cluster. - * * Delete the provided cluster. * * @param id the resource ID. @@ -319,9 +333,8 @@ OperationStatusResult updateVersion(String resourceGroupName, String clusterName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); + void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); /** * Begins definition for a new Cluster resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputOverride.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputOverride.java index 3ff1674e9ea1..822c26bc625d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputOverride.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputOverride.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -102,17 +102,6 @@ public CommandOutputOverride withContainerUrl(String containerUrl) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (associatedIdentity() != null) { - associatedIdentity().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputSettings.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputSettings.java index ff2175b2a357..77968d6f81c0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputSettings.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -109,20 +109,6 @@ public CommandOutputSettings withOverrides(List overrides return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (associatedIdentity() != null) { - associatedIdentity().validate(); - } - if (overrides() != null) { - overrides().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputType.java index 3e1f2dac2280..7cf62dfdf38c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,29 +12,36 @@ */ public final class CommandOutputType extends ExpandableStringEnum { /** - * Static value BareMetalMachineRunCommand for CommandOutputType. + * BareMetalMachineRunCommand output type. */ public static final CommandOutputType BARE_METAL_MACHINE_RUN_COMMAND = fromString("BareMetalMachineRunCommand"); /** - * Static value BareMetalMachineRunDataExtracts for CommandOutputType. + * BareMetalMachineRunDataExtracts output type. */ public static final CommandOutputType BARE_METAL_MACHINE_RUN_DATA_EXTRACTS = fromString("BareMetalMachineRunDataExtracts"); /** - * Static value BareMetalMachineRunReadCommands for CommandOutputType. + * BareMetalMachineRunReadCommands output type. */ public static final CommandOutputType BARE_METAL_MACHINE_RUN_READ_COMMANDS = fromString("BareMetalMachineRunReadCommands"); /** - * Static value StorageRunReadCommands for CommandOutputType. + * ClusterSupportAdministrativeActions output type supporting administrative actions that can be run on a cluster + * for support purposes. + */ + public static final CommandOutputType CLUSTER_SUPPORT_ADMINISTRATIVE_ACTIONS + = fromString("ClusterSupportAdministrativeActions"); + + /** + * StorageRunReadCommands output type. */ public static final CommandOutputType STORAGE_RUN_READ_COMMANDS = fromString("StorageRunReadCommands"); /** - * Static value BareMetalMachineRunDataExtractsRestricted for CommandOutputType. + * BareMetalMachineRunDataExtractsRestricted output type. */ public static final CommandOutputType BARE_METAL_MACHINE_RUN_DATA_EXTRACTS_RESTRICTED = fromString("BareMetalMachineRunDataExtractsRestricted"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Console.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Console.java index 2deb9c8799ed..f99a2a67014b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Console.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Console.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -51,15 +51,18 @@ public interface Console { Map tags(); /** - * Gets the etag property: Resource ETag. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ String etag(); /** - * Gets the extendedLocation property: The extended location of the cluster manager associated with the cluster this - * virtual machine is created on. + * Gets the extendedLocation property: The extended location of the resource. This property is required when + * creating the resource. * * @return the extendedLocation value. */ @@ -72,20 +75,6 @@ public interface Console { */ SystemData systemData(); - /** - * Gets the detailedStatus property: The more detailed status of the console. - * - * @return the detailedStatus value. - */ - ConsoleDetailedStatus detailedStatus(); - - /** - * Gets the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - String detailedStatusMessage(); - /** * Gets the enabled property: The indicator of whether the console access is enabled. * @@ -101,27 +90,34 @@ public interface Console { OffsetDateTime expiration(); /** - * Gets the privateLinkServiceId property: The resource ID of the private link service that is used to provide - * virtual machine console access. + * Gets the sshPublicKey property: The SSH public key that will be provisioned for user access. The user is expected + * to have the corresponding SSH private key for logging in. * - * @return the privateLinkServiceId value. + * @return the sshPublicKey value. */ - String privateLinkServiceId(); + SshPublicKey sshPublicKey(); /** - * Gets the provisioningState property: The provisioning state of the virtual machine console. + * Gets the detailedStatus property: The more detailed status of the console. * - * @return the provisioningState value. + * @return the detailedStatus value. */ - ConsoleProvisioningState provisioningState(); + ConsoleDetailedStatus detailedStatus(); /** - * Gets the sshPublicKey property: The SSH public key that will be provisioned for user access. The user is expected - * to have the corresponding SSH private key for logging in. + * Gets the detailedStatusMessage property: The descriptive message about the current detailed status. * - * @return the sshPublicKey value. + * @return the detailedStatusMessage value. */ - SshPublicKey sshPublicKey(); + String detailedStatusMessage(); + + /** + * Gets the privateLinkServiceId property: The resource ID of the private link service that is used to provide + * virtual machine console access. + * + * @return the privateLinkServiceId value. + */ + String privateLinkServiceId(); /** * Gets the virtualMachineAccessId property: The unique identifier for the virtual machine that is used to access @@ -131,6 +127,13 @@ public interface Console { */ String virtualMachineAccessId(); + /** + * Gets the provisioningState property: The provisioning state of the virtual machine console. + * + * @return the provisioningState value. + */ + ConsoleProvisioningState provisioningState(); + /** * Gets the region of the resource. * @@ -217,11 +220,11 @@ interface WithParentResource { */ interface WithExtendedLocation { /** - * Specifies the extendedLocation property: The extended location of the cluster manager associated with the - * cluster this virtual machine is created on.. + * Specifies the extendedLocation property: The extended location of the resource. This property is required + * when creating the resource.. * - * @param extendedLocation The extended location of the cluster manager associated with the cluster this - * virtual machine is created on. + * @param extendedLocation The extended location of the resource. This property is required when creating + * the resource. * @return the next definition stage. */ WithEnabled withExtendedLocation(ExtendedLocation extendedLocation); @@ -372,9 +375,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: The Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags.. * - * @param tags The Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsoleDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsoleDetailedStatus.java index eadcc4cf1063..de616eec93f8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsoleDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsoleDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class ConsoleDetailedStatus extends ExpandableStringEnum { /** - * Static value Ready for ConsoleDetailedStatus. + * The Ready status. */ public static final ConsoleDetailedStatus READY = fromString("Ready"); /** - * Static value Error for ConsoleDetailedStatus. + * The Error status. */ public static final ConsoleDetailedStatus ERROR = fromString("Error"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsoleEnabled.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsoleEnabled.java index f21a8259c1b4..cea8b53df4f8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsoleEnabled.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsoleEnabled.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class ConsoleEnabled extends ExpandableStringEnum { /** - * Static value True for ConsoleEnabled. + * Console access enabled. */ public static final ConsoleEnabled TRUE = fromString("True"); /** - * Static value False for ConsoleEnabled. + * Console access disabled. */ public static final ConsoleEnabled FALSE = fromString("False"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsolePatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsolePatchParameters.java index 5578771f877a..540537d93d6f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsolePatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsolePatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -25,7 +25,7 @@ public final class ConsolePatchParameters implements JsonSerializable tags; @@ -45,7 +45,7 @@ private ConsolePatchProperties innerProperties() { } /** - * Get the tags property: The Azure resource tags that will replace the existing ones. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -54,7 +54,7 @@ public Map tags() { } /** - * Set the tags property: The Azure resource tags that will replace the existing ones. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the ConsolePatchParameters object itself. @@ -135,17 +135,6 @@ public ConsolePatchParameters withSshPublicKey(SshPublicKey sshPublicKey) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsoleProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsoleProvisioningState.java index 480d83c0673e..79d827a97b87 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsoleProvisioningState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ConsoleProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,29 +12,29 @@ */ public final class ConsoleProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for ConsoleProvisioningState. + * The Succeeded status. */ public static final ConsoleProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for ConsoleProvisioningState. + * The Failed status. */ public static final ConsoleProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for ConsoleProvisioningState. + * The Canceled status. */ public static final ConsoleProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Provisioning for ConsoleProvisioningState. + * The Accepted status. */ - public static final ConsoleProvisioningState PROVISIONING = fromString("Provisioning"); + public static final ConsoleProvisioningState ACCEPTED = fromString("Accepted"); /** - * Static value Accepted for ConsoleProvisioningState. + * The Provisioning status. */ - public static final ConsoleProvisioningState ACCEPTED = fromString("Accepted"); + public static final ConsoleProvisioningState PROVISIONING = fromString("Provisioning"); /** * Creates a new instance of ConsoleProvisioningState value. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Consoles.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Consoles.java index d1b366cfb78b..2c2ec2dea7c4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Consoles.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Consoles.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,109 +13,93 @@ */ public interface Consoles { /** - * List consoles of the virtual machine. - * - * Get a list of consoles for the provided virtual machine. + * Get properties of the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. + * @param consoleName The name of the virtual machine console. + * @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 consoles for the provided virtual machine as paginated response with {@link PagedIterable}. + * @return properties of the provided virtual machine console along with {@link Response}. */ - PagedIterable listByVirtualMachine(String resourceGroupName, String virtualMachineName); + Response getWithResponse(String resourceGroupName, String virtualMachineName, String consoleName, + Context context); /** - * List consoles of the virtual machine. - * - * Get a list of consoles for the provided virtual machine. + * Get properties of the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param consoleName The name of the virtual machine console. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 consoles for the provided virtual machine as paginated response with {@link PagedIterable}. + * @return properties of the provided virtual machine console. */ - PagedIterable listByVirtualMachine(String resourceGroupName, String virtualMachineName, Integer top, - String skipToken, Context context); + Console get(String resourceGroupName, String virtualMachineName, String consoleName); /** - * Retrieve the virtual machine console. - * - * Get properties of the provided virtual machine console. + * Delete the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. * @param consoleName The name of the virtual machine console. - * @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 properties of the provided virtual machine console along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String virtualMachineName, String consoleName, - Context context); + void delete(String resourceGroupName, String virtualMachineName, String consoleName); /** - * Retrieve the virtual machine console. - * - * Get properties of the provided virtual machine console. + * Delete the provided virtual machine console. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. * @param consoleName The name of the virtual machine console. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 properties of the provided virtual machine console. */ - Console get(String resourceGroupName, String virtualMachineName, String consoleName); + void delete(String resourceGroupName, String virtualMachineName, String consoleName, String ifMatch, + String ifNoneMatch, Context context); /** - * Delete the virtual machine console. - * - * Delete the provided virtual machine console. + * Get a list of consoles for the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. - * @param consoleName The name of the virtual machine console. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a list of consoles for the provided virtual machine as paginated response with {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String virtualMachineName, String consoleName); + PagedIterable listByVirtualMachine(String resourceGroupName, String virtualMachineName); /** - * Delete the virtual machine console. - * - * Delete the provided virtual machine console. + * Get a list of consoles for the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineName The name of the virtual machine. - * @param consoleName The name of the virtual machine console. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of consoles for the provided virtual machine as paginated response with {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String virtualMachineName, String consoleName, - String ifMatch, String ifNoneMatch, Context context); + PagedIterable listByVirtualMachine(String resourceGroupName, String virtualMachineName, Integer top, + String skipToken, Context context); /** - * Retrieve the virtual machine console. - * * Get properties of the provided virtual machine console. * * @param id the resource ID. @@ -127,8 +111,6 @@ OperationStatusResult delete(String resourceGroupName, String virtualMachineName Console getById(String id); /** - * Retrieve the virtual machine console. - * * Get properties of the provided virtual machine console. * * @param id the resource ID. @@ -141,21 +123,16 @@ OperationStatusResult delete(String resourceGroupName, String virtualMachineName Response getByIdWithResponse(String id, Context context); /** - * Delete the virtual machine console. - * * Delete the provided virtual machine console. * * @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 current status of an async operation. */ - OperationStatusResult deleteById(String id); + void deleteById(String id); /** - * Delete the virtual machine console. - * * Delete the provided virtual machine console. * * @param id the resource ID. @@ -167,9 +144,8 @@ OperationStatusResult delete(String resourceGroupName, String virtualMachineName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); + void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); /** * Begins definition for a new Console resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ControlImpact.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ControlImpact.java index ba27e4f3bb64..fdbc7df91388 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ControlImpact.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ControlImpact.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class ControlImpact extends ExpandableStringEnum { /** - * Static value True for ControlImpact. + * The control plane will be impacted during the upgrade. */ public static final ControlImpact TRUE = fromString("True"); /** - * Static value False for ControlImpact. + * The control plane will not be impacted during the upgrade. */ public static final ControlImpact FALSE = fromString("False"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ControlPlaneNodeConfiguration.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ControlPlaneNodeConfiguration.java index 3f48f1353d69..7fdf4eb4dfde 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ControlPlaneNodeConfiguration.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ControlPlaneNodeConfiguration.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -131,24 +130,6 @@ public ControlPlaneNodeConfiguration withVmSkuName(String vmSkuName) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (administratorConfiguration() != null) { - administratorConfiguration().validate(); - } - if (vmSkuName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property vmSkuName in model ControlPlaneNodeConfiguration")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ControlPlaneNodeConfiguration.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ControlPlaneNodePatchConfiguration.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ControlPlaneNodePatchConfiguration.java index 98ba2ee8ea0e..f9771160251f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ControlPlaneNodePatchConfiguration.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ControlPlaneNodePatchConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -76,17 +76,6 @@ public ControlPlaneNodePatchConfiguration withCount(Long count) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (administratorConfiguration() != null) { - administratorConfiguration().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DefaultGateway.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DefaultGateway.java index c0aafcedda68..d40e832ea3a1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DefaultGateway.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DefaultGateway.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,12 +13,12 @@ */ public final class DefaultGateway extends ExpandableStringEnum { /** - * Static value True for DefaultGateway. + * This is the default gateway. */ public static final DefaultGateway TRUE = fromString("True"); /** - * Static value False for DefaultGateway. + * This is not the default gateway. */ public static final DefaultGateway FALSE = fromString("False"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DeploymentType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DeploymentType.java new file mode 100644 index 000000000000..3f7401a1483e --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DeploymentType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type (kind) of the cluster. When specified, the value must exactly match the kind configured on the cluster + * manager that manages the cluster. If omitted, the service will default the value to the kind value of the cluster + * manager. + */ +public final class DeploymentType extends ExpandableStringEnum { + /** + * Azure Operator Nexus. + */ + public static final DeploymentType NEXUS = fromString("Nexus"); + + /** + * Azure Local. + */ + public static final DeploymentType AZURE_LOCAL = fromString("AzureLocal"); + + /** + * Creates a new instance of DeploymentType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeploymentType() { + } + + /** + * Creates or finds a DeploymentType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentType. + */ + public static DeploymentType fromString(String name) { + return fromString(name, DeploymentType.class); + } + + /** + * Gets known DeploymentType values. + * + * @return known DeploymentType values. + */ + public static Collection values() { + return values(DeploymentType.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DeviceConnectionType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DeviceConnectionType.java index ae0206d20e7f..c7022c97cd77 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DeviceConnectionType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DeviceConnectionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,7 +12,7 @@ */ public final class DeviceConnectionType extends ExpandableStringEnum { /** - * Static value PCI for DeviceConnectionType. + * PCI connection type. */ public static final DeviceConnectionType PCI = fromString("PCI"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DiskType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DiskType.java index 17fcd08d0e82..b538d2fa23ad 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DiskType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/DiskType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class DiskType extends ExpandableStringEnum { /** - * Static value HDD for DiskType. + * HDD disk type. */ public static final DiskType HDD = fromString("HDD"); /** - * Static value SSD for DiskType. + * SSD disk type. */ public static final DiskType SSD = fromString("SSD"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/EgressEndpoint.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/EgressEndpoint.java index 45183c258c48..0772fbd97d35 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/EgressEndpoint.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/EgressEndpoint.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -81,26 +80,6 @@ public EgressEndpoint withEndpoints(List endpoints) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (category() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property category in model EgressEndpoint")); - } - if (endpoints() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property endpoints in model EgressEndpoint")); - } else { - endpoints().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EgressEndpoint.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/EndpointDependency.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/EndpointDependency.java index 857117e6bc9b..380a7c76717e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/EndpointDependency.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/EndpointDependency.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -73,20 +72,6 @@ public EndpointDependency withPort(Long port) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (domainName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property domainName in model EndpointDependency")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EndpointDependency.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ExtendedLocation.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ExtendedLocation.java index 78af3d07d989..5bf4507a6c1d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ExtendedLocation.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ExtendedLocation.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -13,19 +12,19 @@ import java.io.IOException; /** - * ExtendedLocation represents the Azure custom location where the resource will be created. + * The complex type of the extended location. */ @Fluent public final class ExtendedLocation implements JsonSerializable { /* - * The resource ID of the extended location on which the resource will be created. + * The name of the extended location. */ private String name; /* - * The extended location type, for example, CustomLocation. + * The type of the extended location. */ - private String type; + private ExtendedLocationType type; /** * Creates an instance of ExtendedLocation class. @@ -34,7 +33,7 @@ public ExtendedLocation() { } /** - * Get the name property: The resource ID of the extended location on which the resource will be created. + * Get the name property: The name of the extended location. * * @return the name value. */ @@ -43,7 +42,7 @@ public String name() { } /** - * Set the name property: The resource ID of the extended location on which the resource will be created. + * Set the name property: The name of the extended location. * * @param name the name value to set. * @return the ExtendedLocation object itself. @@ -54,43 +53,25 @@ public ExtendedLocation withName(String name) { } /** - * Get the type property: The extended location type, for example, CustomLocation. + * Get the type property: The type of the extended location. * * @return the type value. */ - public String type() { + public ExtendedLocationType type() { return this.type; } /** - * Set the type property: The extended location type, for example, CustomLocation. + * Set the type property: The type of the extended location. * * @param type the type value to set. * @return the ExtendedLocation object itself. */ - public ExtendedLocation withType(String type) { + public ExtendedLocation withType(ExtendedLocationType type) { this.type = type; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model ExtendedLocation")); - } - if (type() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property type in model ExtendedLocation")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ExtendedLocation.class); - /** * {@inheritDoc} */ @@ -98,7 +79,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); return jsonWriter.writeEndObject(); } @@ -121,7 +102,7 @@ public static ExtendedLocation fromJson(JsonReader jsonReader) throws IOExceptio if ("name".equals(fieldName)) { deserializedExtendedLocation.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedExtendedLocation.type = reader.getString(); + deserializedExtendedLocation.type = ExtendedLocationType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ExtendedLocationType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ExtendedLocationType.java new file mode 100644 index 000000000000..4836b5896618 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ExtendedLocationType.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.networkcloud.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The supported ExtendedLocation types. + */ +public final class ExtendedLocationType extends ExpandableStringEnum { + /** + * Azure Edge Zones location type. + */ + public static final ExtendedLocationType EDGE_ZONE = fromString("EdgeZone"); + + /** + * Azure Custom Locations type. + */ + public static final ExtendedLocationType CUSTOM_LOCATION = fromString("CustomLocation"); + + /** + * Creates a new instance of ExtendedLocationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExtendedLocationType() { + } + + /** + * Creates or finds a ExtendedLocationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExtendedLocationType. + */ + public static ExtendedLocationType fromString(String name) { + return fromString(name, ExtendedLocationType.class); + } + + /** + * Gets known ExtendedLocationType values. + * + * @return known ExtendedLocationType values. + */ + public static Collection values() { + return values(ExtendedLocationType.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/FabricPeeringEnabled.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/FabricPeeringEnabled.java index d00c4c366a99..b5e1e074d66f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/FabricPeeringEnabled.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/FabricPeeringEnabled.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class FabricPeeringEnabled extends ExpandableStringEnum { /** - * Static value True for FabricPeeringEnabled. + * Enable fabric peering. */ public static final FabricPeeringEnabled TRUE = fromString("True"); /** - * Static value False for FabricPeeringEnabled. + * Disable fabric peering. */ public static final FabricPeeringEnabled FALSE = fromString("False"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/FeatureDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/FeatureDetailedStatus.java index 892f3d50f3e9..76d0a4bf3f3f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/FeatureDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/FeatureDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,17 +12,17 @@ */ public final class FeatureDetailedStatus extends ExpandableStringEnum { /** - * Static value Running for FeatureDetailedStatus. + * The Running status. */ public static final FeatureDetailedStatus RUNNING = fromString("Running"); /** - * Static value Failed for FeatureDetailedStatus. + * The Failed status. */ public static final FeatureDetailedStatus FAILED = fromString("Failed"); /** - * Static value Unknown for FeatureDetailedStatus. + * The Unknown status. */ public static final FeatureDetailedStatus UNKNOWN = fromString("Unknown"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/FeatureStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/FeatureStatus.java index 85cd700a60dc..cea539294829 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/FeatureStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/FeatureStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -39,7 +39,7 @@ public final class FeatureStatus implements JsonSerializable { /** * Creates an instance of FeatureStatus class. */ - public FeatureStatus() { + private FeatureStatus() { } /** @@ -78,14 +78,6 @@ public String version() { return this.version; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/FilterDevices.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/FilterDevices.java new file mode 100644 index 000000000000..174d32e78af8 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/FilterDevices.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.networkcloud.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; + +/** + * FilterDevices defines the filtered target of the inspection. + */ +@Fluent +public final class FilterDevices implements JsonSerializable { + /* + * The list of bare metal machine names to include in the inspection. + */ + private List bareMetalMachineNames; + + /* + * The list of rack names to include in the inspection. + */ + private List rackNames; + + /** + * Creates an instance of FilterDevices class. + */ + public FilterDevices() { + } + + /** + * Get the bareMetalMachineNames property: The list of bare metal machine names to include in the inspection. + * + * @return the bareMetalMachineNames value. + */ + public List bareMetalMachineNames() { + return this.bareMetalMachineNames; + } + + /** + * Set the bareMetalMachineNames property: The list of bare metal machine names to include in the inspection. + * + * @param bareMetalMachineNames the bareMetalMachineNames value to set. + * @return the FilterDevices object itself. + */ + public FilterDevices withBareMetalMachineNames(List bareMetalMachineNames) { + this.bareMetalMachineNames = bareMetalMachineNames; + return this; + } + + /** + * Get the rackNames property: The list of rack names to include in the inspection. + * + * @return the rackNames value. + */ + public List rackNames() { + return this.rackNames; + } + + /** + * Set the rackNames property: The list of rack names to include in the inspection. + * + * @param rackNames the rackNames value to set. + * @return the FilterDevices object itself. + */ + public FilterDevices withRackNames(List rackNames) { + this.rackNames = rackNames; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("bareMetalMachineNames", this.bareMetalMachineNames, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("rackNames", this.rackNames, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FilterDevices from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FilterDevices 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 FilterDevices. + */ + public static FilterDevices fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FilterDevices deserializedFilterDevices = new FilterDevices(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bareMetalMachineNames".equals(fieldName)) { + List bareMetalMachineNames = reader.readArray(reader1 -> reader1.getString()); + deserializedFilterDevices.bareMetalMachineNames = bareMetalMachineNames; + } else if ("rackNames".equals(fieldName)) { + List rackNames = reader.readArray(reader1 -> reader1.getString()); + deserializedFilterDevices.rackNames = rackNames; + } else { + reader.skipChildren(); + } + } + + return deserializedFilterDevices; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HardwareInventory.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HardwareInventory.java index e91867f4dbfb..f32550165357 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HardwareInventory.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HardwareInventory.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -38,7 +38,7 @@ public final class HardwareInventory implements JsonSerializable nics() { return this.nics; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (interfaces() != null) { - interfaces().forEach(e -> e.validate()); - } - if (nics() != null) { - nics().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HardwareInventoryNetworkInterface.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HardwareInventoryNetworkInterface.java index 684fe29ef136..3a66b63c7811 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HardwareInventoryNetworkInterface.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HardwareInventoryNetworkInterface.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -40,7 +40,7 @@ public final class HardwareInventoryNetworkInterface implements JsonSerializable /** * Creates an instance of HardwareInventoryNetworkInterface class. */ - public HardwareInventoryNetworkInterface() { + private HardwareInventoryNetworkInterface() { } /** @@ -80,14 +80,6 @@ public String networkInterfaceId() { return this.networkInterfaceId; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HardwareValidationStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HardwareValidationStatus.java index 97f4b5b611f0..d46974d5faed 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HardwareValidationStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HardwareValidationStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -31,7 +31,7 @@ public final class HardwareValidationStatus implements JsonSerializable { /** - * Static value 2M for HugepagesSize. + * 2M hugepages. */ public static final HugepagesSize TWOM = fromString("2M"); /** - * Static value 1G for HugepagesSize. + * 1G hugepages. */ public static final HugepagesSize ONEG = fromString("1G"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HybridAksIpamEnabled.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HybridAksIpamEnabled.java index 5abaa42078a9..035379bf4042 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HybridAksIpamEnabled.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HybridAksIpamEnabled.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -14,12 +14,12 @@ */ public final class HybridAksIpamEnabled extends ExpandableStringEnum { /** - * Static value True for HybridAksIpamEnabled. + * Hybrid AKS IPAM allocation is enabled. */ public static final HybridAksIpamEnabled TRUE = fromString("True"); /** - * Static value False for HybridAksIpamEnabled. + * Hybrid AKS IPAM allocation is disabled. */ public static final HybridAksIpamEnabled FALSE = fromString("False"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HybridAksPluginType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HybridAksPluginType.java index 66ea2feb9d5c..197dadc1aca6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HybridAksPluginType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/HybridAksPluginType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,17 +13,17 @@ */ public final class HybridAksPluginType extends ExpandableStringEnum { /** - * Static value DPDK for HybridAksPluginType. + * The DPDK plugin type. */ public static final HybridAksPluginType DPDK = fromString("DPDK"); /** - * Static value SRIOV for HybridAksPluginType. + * The SRIOV plugin type. */ public static final HybridAksPluginType SRIOV = fromString("SRIOV"); /** - * Static value OSDevice for HybridAksPluginType. + * The OSDevice plugin type. */ public static final HybridAksPluginType OSDEVICE = fromString("OSDevice"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/IdentitySelector.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/IdentitySelector.java index c13bb1d4f4c4..04ce854eae31 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/IdentitySelector.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/IdentitySelector.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -74,14 +74,6 @@ public IdentitySelector withUserAssignedIdentityResourceId(String userAssignedId return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ImageRepositoryCredentials.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ImageRepositoryCredentials.java index 7e0c5b4e171b..2e0b5c6dc1b7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ImageRepositoryCredentials.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ImageRepositoryCredentials.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -98,31 +97,6 @@ public ImageRepositoryCredentials withUsername(String username) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (password() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property password in model ImageRepositoryCredentials")); - } - if (registryUrl() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property registryUrl in model ImageRepositoryCredentials")); - } - if (username() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property username in model ImageRepositoryCredentials")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageRepositoryCredentials.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/InitialAgentPoolConfiguration.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/InitialAgentPoolConfiguration.java index da3b1f9878cc..01e9b84ee5e9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/InitialAgentPoolConfiguration.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/InitialAgentPoolConfiguration.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -58,11 +57,6 @@ public final class InitialAgentPoolConfiguration implements JsonSerializable e.validate()); - } - if (mode() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property mode in model InitialAgentPoolConfiguration")); - } - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property name in model InitialAgentPoolConfiguration")); - } - if (taints() != null) { - taints().forEach(e -> e.validate()); - } - if (upgradeSettings() != null) { - upgradeSettings().validate(); - } - if (vmSkuName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property vmSkuName in model InitialAgentPoolConfiguration")); - } + * @return the name value. + */ + public String name() { + return this.name; } - private static final ClientLogger LOGGER = new ClientLogger(InitialAgentPoolConfiguration.class); + /** + * Set the name property: The name that will be used for the agent pool resource representing this agent pool. + * + * @param name the name value to set. + * @return the InitialAgentPoolConfiguration object itself. + */ + public InitialAgentPoolConfiguration withName(String name) { + this.name = name; + return this; + } /** * {@inheritDoc} @@ -367,8 +323,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeLongField("count", this.count); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - jsonWriter.writeStringField("name", this.name); jsonWriter.writeStringField("vmSkuName", this.vmSkuName); + jsonWriter.writeStringField("name", this.name); jsonWriter.writeJsonField("administratorConfiguration", this.administratorConfiguration); jsonWriter.writeJsonField("agentOptions", this.agentOptions); jsonWriter.writeJsonField("attachedNetworkConfiguration", this.attachedNetworkConfiguration); @@ -401,10 +357,10 @@ public static InitialAgentPoolConfiguration fromJson(JsonReader jsonReader) thro deserializedInitialAgentPoolConfiguration.count = reader.getLong(); } else if ("mode".equals(fieldName)) { deserializedInitialAgentPoolConfiguration.mode = AgentPoolMode.fromString(reader.getString()); - } else if ("name".equals(fieldName)) { - deserializedInitialAgentPoolConfiguration.name = reader.getString(); } else if ("vmSkuName".equals(fieldName)) { deserializedInitialAgentPoolConfiguration.vmSkuName = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedInitialAgentPoolConfiguration.name = reader.getString(); } else if ("administratorConfiguration".equals(fieldName)) { deserializedInitialAgentPoolConfiguration.administratorConfiguration = AdministratorConfiguration.fromJson(reader); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/IpAddressPool.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/IpAddressPool.java index 93b5dff147c7..3d59b171895e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/IpAddressPool.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/IpAddressPool.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -133,24 +132,6 @@ public IpAddressPool withOnlyUseHostIps(BfdEnabled onlyUseHostIps) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (addresses() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property addresses in model IpAddressPool")); - } - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model IpAddressPool")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IpAddressPool.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/IpAllocationType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/IpAllocationType.java index d3f4ede6d789..b7a1c19995f9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/IpAllocationType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/IpAllocationType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,17 +12,17 @@ */ public final class IpAllocationType extends ExpandableStringEnum { /** - * Static value IPV4 for IpAllocationType. + * The IPV4 address allocation type. */ public static final IpAllocationType IPV4 = fromString("IPV4"); /** - * Static value IPV6 for IpAllocationType. + * The IPV6 address allocation type. */ public static final IpAllocationType IPV6 = fromString("IPV6"); /** - * Static value DualStack for IpAllocationType. + * The DualStack address allocation type. */ public static final IpAllocationType DUAL_STACK = fromString("DualStack"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KeySetUser.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KeySetUser.java index 5e0dfdf092bf..ec5229f9ebba 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KeySetUser.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KeySetUser.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -128,26 +127,6 @@ public KeySetUser withUserPrincipalName(String userPrincipalName) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (azureUsername() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property azureUsername in model KeySetUser")); - } - if (sshPublicKey() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property sshPublicKey in model KeySetUser")); - } else { - sshPublicKey().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(KeySetUser.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KeySetUserStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KeySetUserStatus.java index 1e3aede8d3c8..734beed7861f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KeySetUserStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KeySetUserStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -34,7 +34,7 @@ public final class KeySetUserStatus implements JsonSerializable tags(); /** - * Gets the etag property: Resource ETag. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ String etag(); /** - * Gets the extendedLocation property: The extended location of the cluster associated with the resource. + * Gets the extendedLocation property: The extended location of the resource. This property is required when + * creating the resource. * * @return the extendedLocation value. */ @@ -86,6 +90,47 @@ public interface KubernetesCluster { */ AdministratorConfiguration administratorConfiguration(); + /** + * Gets the controlPlaneNodeConfiguration property: The defining characteristics of the control plane for this + * Kubernetes Cluster. + * + * @return the controlPlaneNodeConfiguration value. + */ + ControlPlaneNodeConfiguration controlPlaneNodeConfiguration(); + + /** + * Gets the initialAgentPoolConfigurations property: The agent pools that are created with this Kubernetes cluster + * for running critical system services and workloads. This data in this field is only used during creation, and the + * field will be empty following the creation of the Kubernetes Cluster. After creation, the management of agent + * pools is done using the agentPools sub-resource. + * + * @return the initialAgentPoolConfigurations value. + */ + List initialAgentPoolConfigurations(); + + /** + * Gets the kubernetesVersion property: The Kubernetes version for this cluster. + * + * @return the kubernetesVersion value. + */ + String kubernetesVersion(); + + /** + * Gets the managedResourceGroupConfiguration property: The configuration of the managed resource group associated + * with the resource. + * + * @return the managedResourceGroupConfiguration value. + */ + ManagedResourceGroupConfiguration managedResourceGroupConfiguration(); + + /** + * Gets the networkConfiguration property: The configuration of the Kubernetes cluster networking, including the + * attachment of networks that span the cluster. + * + * @return the networkConfiguration value. + */ + NetworkConfiguration networkConfiguration(); + /** * Gets the attachedNetworkIds property: The full list of network resource IDs that are attached to this cluster, * including those attached only to specific agent pools. @@ -123,14 +168,6 @@ public interface KubernetesCluster { */ String controlPlaneKubernetesVersion(); - /** - * Gets the controlPlaneNodeConfiguration property: The defining characteristics of the control plane for this - * Kubernetes Cluster. - * - * @return the controlPlaneNodeConfiguration value. - */ - ControlPlaneNodeConfiguration controlPlaneNodeConfiguration(); - /** * Gets the detailedStatus property: The current status of the Kubernetes cluster. * @@ -152,39 +189,6 @@ public interface KubernetesCluster { */ List featureStatuses(); - /** - * Gets the initialAgentPoolConfigurations property: The agent pools that are created with this Kubernetes cluster - * for running critical system services and workloads. This data in this field is only used during creation, and the - * field will be empty following the creation of the Kubernetes Cluster. After creation, the management of agent - * pools is done using the agentPools sub-resource. - * - * @return the initialAgentPoolConfigurations value. - */ - List initialAgentPoolConfigurations(); - - /** - * Gets the kubernetesVersion property: The Kubernetes version for this cluster. - * - * @return the kubernetesVersion value. - */ - String kubernetesVersion(); - - /** - * Gets the managedResourceGroupConfiguration property: The configuration of the managed resource group associated - * with the resource. - * - * @return the managedResourceGroupConfiguration value. - */ - ManagedResourceGroupConfiguration managedResourceGroupConfiguration(); - - /** - * Gets the networkConfiguration property: The configuration of the Kubernetes cluster networking, including the - * attachment of networks that span the cluster. - * - * @return the networkConfiguration value. - */ - NetworkConfiguration networkConfiguration(); - /** * Gets the nodes property: The details of the nodes in this cluster. * @@ -285,10 +289,11 @@ interface WithResourceGroup { */ interface WithExtendedLocation { /** - * Specifies the extendedLocation property: The extended location of the cluster associated with the - * resource.. + * Specifies the extendedLocation property: The extended location of the resource. This property is required + * when creating the resource.. * - * @param extendedLocation The extended location of the cluster associated with the resource. + * @param extendedLocation The extended location of the resource. This property is required when creating + * the resource. * @return the next definition stage. */ WithControlPlaneNodeConfiguration withExtendedLocation(ExtendedLocation extendedLocation); @@ -508,9 +513,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: The Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags.. * - * @param tags The Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); @@ -606,21 +611,17 @@ interface WithIfNoneMatch { KubernetesCluster refresh(Context context); /** - * Restart a targeted node. - * * Restart a targeted node of a Kubernetes cluster. * * @param kubernetesClusterRestartNodeParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult restartNode(KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters); /** - * Restart a targeted node. - * * Restart a targeted node of a Kubernetes cluster. * * @param kubernetesClusterRestartNodeParameters The request body. @@ -628,7 +629,7 @@ interface WithIfNoneMatch { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult restartNode(KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters, Context context); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterDetailedStatus.java index 3314cb63dde9..4e90551a510c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,17 +12,17 @@ */ public final class KubernetesClusterDetailedStatus extends ExpandableStringEnum { /** - * Static value Available for KubernetesClusterDetailedStatus. + * The Available status. */ public static final KubernetesClusterDetailedStatus AVAILABLE = fromString("Available"); /** - * Static value Error for KubernetesClusterDetailedStatus. + * The Error status. */ public static final KubernetesClusterDetailedStatus ERROR = fromString("Error"); /** - * Static value Provisioning for KubernetesClusterDetailedStatus. + * The Provisioning status. */ public static final KubernetesClusterDetailedStatus PROVISIONING = fromString("Provisioning"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeature.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeature.java index d91fcd852f79..588c7454b348 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeature.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeature.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -51,7 +51,10 @@ public interface KubernetesClusterFeature { Map tags(); /** - * Gets the etag property: Resource ETag. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ @@ -64,6 +67,13 @@ public interface KubernetesClusterFeature { */ SystemData systemData(); + /** + * Gets the options property: The configured options for the feature. + * + * @return the options value. + */ + List options(); + /** * Gets the availabilityLifecycle property: The lifecycle indicator of the feature. * @@ -85,20 +95,6 @@ public interface KubernetesClusterFeature { */ String detailedStatusMessage(); - /** - * Gets the options property: The configured options for the feature. - * - * @return the options value. - */ - List options(); - - /** - * Gets the provisioningState property: The provisioning state of the Kubernetes cluster feature. - * - * @return the provisioningState value. - */ - KubernetesClusterFeatureProvisioningState provisioningState(); - /** * Gets the required property: The indicator of if the feature is required or optional. Optional features may be * deleted by the user, while required features are managed with the kubernetes cluster lifecycle. @@ -114,6 +110,13 @@ public interface KubernetesClusterFeature { */ String version(); + /** + * Gets the provisioningState property: The provisioning state of the Kubernetes cluster feature. + * + * @return the provisioningState value. + */ + KubernetesClusterFeatureProvisioningState provisioningState(); + /** * Gets the region of the resource. * @@ -311,9 +314,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: The Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags.. * - * @param tags The Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureAvailabilityLifecycle.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureAvailabilityLifecycle.java index 3af42a5ff0d1..542fe890a1f1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureAvailabilityLifecycle.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureAvailabilityLifecycle.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,12 +13,12 @@ public final class KubernetesClusterFeatureAvailabilityLifecycle extends ExpandableStringEnum { /** - * Static value Preview for KubernetesClusterFeatureAvailabilityLifecycle. + * Preview availability. */ public static final KubernetesClusterFeatureAvailabilityLifecycle PREVIEW = fromString("Preview"); /** - * Static value GenerallyAvailable for KubernetesClusterFeatureAvailabilityLifecycle. + * Generally available. */ public static final KubernetesClusterFeatureAvailabilityLifecycle GENERALLY_AVAILABLE = fromString("GenerallyAvailable"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureDetailedStatus.java index 5a3127576a6b..bf65d8ffe775 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,17 +13,17 @@ public final class KubernetesClusterFeatureDetailedStatus extends ExpandableStringEnum { /** - * Static value Error for KubernetesClusterFeatureDetailedStatus. + * The Error status. */ public static final KubernetesClusterFeatureDetailedStatus ERROR = fromString("Error"); /** - * Static value Provisioning for KubernetesClusterFeatureDetailedStatus. + * The Provisioning status. */ public static final KubernetesClusterFeatureDetailedStatus PROVISIONING = fromString("Provisioning"); /** - * Static value Installed for KubernetesClusterFeatureDetailedStatus. + * The Installed status. */ public static final KubernetesClusterFeatureDetailedStatus INSTALLED = fromString("Installed"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeaturePatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeaturePatchParameters.java index a65a7312ce4a..974aab6c43a0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeaturePatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeaturePatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -26,7 +26,7 @@ public final class KubernetesClusterFeaturePatchParameters private KubernetesClusterFeaturePatchProperties innerProperties; /* - * The Azure resource tags that will replace the existing ones. + * Resource tags. */ private Map tags; @@ -46,7 +46,7 @@ private KubernetesClusterFeaturePatchProperties innerProperties() { } /** - * Get the tags property: The Azure resource tags that will replace the existing ones. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -55,7 +55,7 @@ public Map tags() { } /** - * Set the tags property: The Azure resource tags that will replace the existing ones. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the KubernetesClusterFeaturePatchParameters object itself. @@ -88,17 +88,6 @@ public KubernetesClusterFeaturePatchParameters withOptions(List { /** - * Static value Accepted for KubernetesClusterFeatureProvisioningState. + * The Accepted status. */ public static final KubernetesClusterFeatureProvisioningState ACCEPTED = fromString("Accepted"); /** - * Static value Canceled for KubernetesClusterFeatureProvisioningState. + * The Canceled status. */ public static final KubernetesClusterFeatureProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Deleting for KubernetesClusterFeatureProvisioningState. + * The Deleting status. */ public static final KubernetesClusterFeatureProvisioningState DELETING = fromString("Deleting"); /** - * Static value Failed for KubernetesClusterFeatureProvisioningState. + * The Failed status. */ public static final KubernetesClusterFeatureProvisioningState FAILED = fromString("Failed"); /** - * Static value Succeeded for KubernetesClusterFeatureProvisioningState. + * The Succeeded status. */ public static final KubernetesClusterFeatureProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Updating for KubernetesClusterFeatureProvisioningState. + * The Updating status. */ public static final KubernetesClusterFeatureProvisioningState UPDATING = fromString("Updating"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureRequired.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureRequired.java index 52af99c5d56d..58c7d71adaf4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureRequired.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureRequired.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,12 +13,12 @@ */ public final class KubernetesClusterFeatureRequired extends ExpandableStringEnum { /** - * Static value True for KubernetesClusterFeatureRequired. + * A required feature. */ public static final KubernetesClusterFeatureRequired TRUE = fromString("True"); /** - * Static value False for KubernetesClusterFeatureRequired. + * An optional feature. */ public static final KubernetesClusterFeatureRequired FALSE = fromString("False"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatures.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatures.java index 9a5c274cc956..78c72beb1dc2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatures.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatures.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,110 +13,94 @@ */ public interface KubernetesClusterFeatures { /** - * List features for the Kubernetes cluster. - * - * Get a list of features for the provided Kubernetes cluster. + * Get properties of the provided the Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param featureName The name of the feature. + * @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 features for the provided Kubernetes cluster as paginated response with {@link PagedIterable}. + * @return properties of the provided the Kubernetes cluster feature along with {@link Response}. */ - PagedIterable listByKubernetesCluster(String resourceGroupName, - String kubernetesClusterName); + Response getWithResponse(String resourceGroupName, String kubernetesClusterName, + String featureName, Context context); /** - * List features for the Kubernetes cluster. - * - * Get a list of features for the provided Kubernetes cluster. + * Get properties of the provided the Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param featureName The name of the feature. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 features for the provided Kubernetes cluster as paginated response with {@link PagedIterable}. + * @return properties of the provided the Kubernetes cluster feature. */ - PagedIterable listByKubernetesCluster(String resourceGroupName, - String kubernetesClusterName, Integer top, String skipToken, Context context); + KubernetesClusterFeature get(String resourceGroupName, String kubernetesClusterName, String featureName); /** - * Retrieve the Kubernetes cluster feature. - * - * Get properties of the provided the Kubernetes cluster feature. + * Delete the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. * @param featureName The name of the feature. - * @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 properties of the provided the Kubernetes cluster feature along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String kubernetesClusterName, - String featureName, Context context); + void delete(String resourceGroupName, String kubernetesClusterName, String featureName); /** - * Retrieve the Kubernetes cluster feature. - * - * Get properties of the provided the Kubernetes cluster feature. + * Delete the provided Kubernetes cluster feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. * @param featureName The name of the feature. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 properties of the provided the Kubernetes cluster feature. */ - KubernetesClusterFeature get(String resourceGroupName, String kubernetesClusterName, String featureName); + void delete(String resourceGroupName, String kubernetesClusterName, String featureName, String ifMatch, + String ifNoneMatch, Context context); /** - * Delete the Kubernetes cluster feature. - * - * Delete the provided Kubernetes cluster feature. + * Get a list of features for the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param featureName The name of the feature. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a list of features for the provided Kubernetes cluster as paginated response with {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String kubernetesClusterName, String featureName); + PagedIterable listByKubernetesCluster(String resourceGroupName, + String kubernetesClusterName); /** - * Delete the Kubernetes cluster feature. - * - * Delete the provided Kubernetes cluster feature. + * Get a list of features for the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param featureName The name of the feature. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of features for the provided Kubernetes cluster as paginated response with {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String kubernetesClusterName, String featureName, - String ifMatch, String ifNoneMatch, Context context); + PagedIterable listByKubernetesCluster(String resourceGroupName, + String kubernetesClusterName, Integer top, String skipToken, Context context); /** - * Retrieve the Kubernetes cluster feature. - * * Get properties of the provided the Kubernetes cluster feature. * * @param id the resource ID. @@ -128,8 +112,6 @@ OperationStatusResult delete(String resourceGroupName, String kubernetesClusterN KubernetesClusterFeature getById(String id); /** - * Retrieve the Kubernetes cluster feature. - * * Get properties of the provided the Kubernetes cluster feature. * * @param id the resource ID. @@ -142,21 +124,16 @@ OperationStatusResult delete(String resourceGroupName, String kubernetesClusterN Response getByIdWithResponse(String id, Context context); /** - * Delete the Kubernetes cluster feature. - * * Delete the provided Kubernetes cluster feature. * * @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 current status of an async operation. */ - OperationStatusResult deleteById(String id); + void deleteById(String id); /** - * Delete the Kubernetes cluster feature. - * * Delete the provided Kubernetes cluster feature. * * @param id the resource ID. @@ -168,9 +145,8 @@ OperationStatusResult delete(String resourceGroupName, String kubernetesClusterN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); + void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); /** * Begins definition for a new KubernetesClusterFeature resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterNode.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterNode.java index e3c5ab4ae9e8..ace64b321da3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterNode.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterNode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -112,7 +112,7 @@ public final class KubernetesClusterNode implements JsonSerializable e.validate()); - } - if (networkAttachments() != null) { - networkAttachments().forEach(e -> e.validate()); - } - if (taints() != null) { - taints().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterNodeDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterNodeDetailedStatus.java index bfbd979ae038..9069ec834500 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterNodeDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterNodeDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,42 +13,42 @@ public final class KubernetesClusterNodeDetailedStatus extends ExpandableStringEnum { /** - * Static value Available for KubernetesClusterNodeDetailedStatus. + * The Available status. */ public static final KubernetesClusterNodeDetailedStatus AVAILABLE = fromString("Available"); /** - * Static value Error for KubernetesClusterNodeDetailedStatus. + * The Error status. */ public static final KubernetesClusterNodeDetailedStatus ERROR = fromString("Error"); /** - * Static value Provisioning for KubernetesClusterNodeDetailedStatus. + * The Provisioning status. */ public static final KubernetesClusterNodeDetailedStatus PROVISIONING = fromString("Provisioning"); /** - * Static value Running for KubernetesClusterNodeDetailedStatus. + * The Running status. */ public static final KubernetesClusterNodeDetailedStatus RUNNING = fromString("Running"); /** - * Static value Scheduling for KubernetesClusterNodeDetailedStatus. + * The Scheduling status. */ public static final KubernetesClusterNodeDetailedStatus SCHEDULING = fromString("Scheduling"); /** - * Static value Stopped for KubernetesClusterNodeDetailedStatus. + * The Stopped status. */ public static final KubernetesClusterNodeDetailedStatus STOPPED = fromString("Stopped"); /** - * Static value Terminating for KubernetesClusterNodeDetailedStatus. + * The Terminating status. */ public static final KubernetesClusterNodeDetailedStatus TERMINATING = fromString("Terminating"); /** - * Static value Unknown for KubernetesClusterNodeDetailedStatus. + * The Unknown status. */ public static final KubernetesClusterNodeDetailedStatus UNKNOWN = fromString("Unknown"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterPatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterPatchParameters.java index d94697c9ce24..8592d95eabd4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterPatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterPatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -24,7 +24,7 @@ public final class KubernetesClusterPatchParameters implements JsonSerializable< private KubernetesClusterPatchProperties innerProperties; /* - * The Azure resource tags that will replace the existing ones. + * Resource tags. */ private Map tags; @@ -44,7 +44,7 @@ private KubernetesClusterPatchProperties innerProperties() { } /** - * Get the tags property: The Azure resource tags that will replace the existing ones. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -53,7 +53,7 @@ public Map tags() { } /** - * Set the tags property: The Azure resource tags that will replace the existing ones. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the KubernetesClusterPatchParameters object itself. @@ -136,17 +136,6 @@ public KubernetesClusterPatchParameters withKubernetesVersion(String kubernetesV return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterProvisioningState.java index 8171eda59820..faf596e89ce0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterProvisioningState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,42 +12,42 @@ */ public final class KubernetesClusterProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for KubernetesClusterProvisioningState. + * The Succeeded status. */ public static final KubernetesClusterProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for KubernetesClusterProvisioningState. + * The Failed status. */ public static final KubernetesClusterProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for KubernetesClusterProvisioningState. + * The Canceled status. */ public static final KubernetesClusterProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Accepted for KubernetesClusterProvisioningState. + * The Accepted status. */ public static final KubernetesClusterProvisioningState ACCEPTED = fromString("Accepted"); /** - * Static value InProgress for KubernetesClusterProvisioningState. + * The InProgress status. */ public static final KubernetesClusterProvisioningState IN_PROGRESS = fromString("InProgress"); /** - * Static value Created for KubernetesClusterProvisioningState. + * The Created status. */ public static final KubernetesClusterProvisioningState CREATED = fromString("Created"); /** - * Static value Updating for KubernetesClusterProvisioningState. + * The Updating status. */ public static final KubernetesClusterProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for KubernetesClusterProvisioningState. + * The Deleting status. */ public static final KubernetesClusterProvisioningState DELETING = fromString("Deleting"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterRestartNodeParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterRestartNodeParameters.java index 8eecd4d1de83..a621db9b09ed 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterRestartNodeParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterRestartNodeParameters.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -50,21 +49,6 @@ public KubernetesClusterRestartNodeParameters withNodeName(String nodeName) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (nodeName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property nodeName in model KubernetesClusterRestartNodeParameters")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(KubernetesClusterRestartNodeParameters.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusters.java index d4a506f9feff..ad1e0c9dcef2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,134 +13,114 @@ */ public interface KubernetesClusters { /** - * List Kubernetes clusters in the subscription. - * - * Get a list of Kubernetes clusters in the provided subscription. + * Get properties of the provided the Kubernetes cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @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 Kubernetes clusters in the provided subscription as paginated response with - * {@link PagedIterable}. + * @return properties of the provided the Kubernetes cluster along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String kubernetesClusterName, + Context context); /** - * List Kubernetes clusters in the subscription. - * - * Get a list of Kubernetes clusters in the provided subscription. + * Get properties of the provided the Kubernetes cluster. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Kubernetes clusters in the provided subscription as paginated response with - * {@link PagedIterable}. + * @return properties of the provided the Kubernetes cluster. */ - PagedIterable list(Integer top, String skipToken, Context context); + KubernetesCluster getByResourceGroup(String resourceGroupName, String kubernetesClusterName); /** - * List Kubernetes clusters in the resource group. - * - * Get a list of Kubernetes clusters in the provided resource group. + * Delete the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesClusterName The name of the Kubernetes cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Kubernetes clusters in the provided resource group as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void deleteByResourceGroup(String resourceGroupName, String kubernetesClusterName); /** - * List Kubernetes clusters in the resource group. - * - * Get a list of Kubernetes clusters in the provided resource group. + * Delete the provided Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 Kubernetes clusters in the provided resource group as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + void delete(String resourceGroupName, String kubernetesClusterName, String ifMatch, String ifNoneMatch, Context context); /** - * Retrieve the Kubernetes cluster. - * - * Get properties of the provided the Kubernetes cluster. + * Get a list of Kubernetes clusters in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @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 properties of the provided the Kubernetes cluster along with {@link Response}. + * @return a list of Kubernetes clusters in the provided resource group as paginated response with + * {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String kubernetesClusterName, - Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Retrieve the Kubernetes cluster. - * - * Get properties of the provided the Kubernetes cluster. + * Get a list of Kubernetes clusters in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 properties of the provided the Kubernetes cluster. + * @return a list of Kubernetes clusters in the provided resource group as paginated response with + * {@link PagedIterable}. */ - KubernetesCluster getByResourceGroup(String resourceGroupName, String kubernetesClusterName); + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); /** - * Delete the Kubernetes cluster. - * - * Delete the provided Kubernetes cluster. + * Get a list of Kubernetes clusters in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a list of Kubernetes clusters in the provided subscription as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult deleteByResourceGroup(String resourceGroupName, String kubernetesClusterName); + PagedIterable list(); /** - * Delete the Kubernetes cluster. - * - * Delete the provided Kubernetes cluster. + * Get a list of Kubernetes clusters in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of Kubernetes clusters in the provided subscription as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String kubernetesClusterName, String ifMatch, - String ifNoneMatch, Context context); + PagedIterable list(Integer top, String skipToken, Context context); /** - * Restart a targeted node. - * * Restart a targeted node of a Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -149,14 +129,12 @@ OperationStatusResult delete(String resourceGroupName, String kubernetesClusterN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult restartNode(String resourceGroupName, String kubernetesClusterName, KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters); /** - * Restart a targeted node. - * * Restart a targeted node of a Kubernetes cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -166,14 +144,12 @@ OperationStatusResult restartNode(String resourceGroupName, String kubernetesClu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult restartNode(String resourceGroupName, String kubernetesClusterName, KubernetesClusterRestartNodeParameters kubernetesClusterRestartNodeParameters, Context context); /** - * Retrieve the Kubernetes cluster. - * * Get properties of the provided the Kubernetes cluster. * * @param id the resource ID. @@ -185,8 +161,6 @@ OperationStatusResult restartNode(String resourceGroupName, String kubernetesClu KubernetesCluster getById(String id); /** - * Retrieve the Kubernetes cluster. - * * Get properties of the provided the Kubernetes cluster. * * @param id the resource ID. @@ -199,21 +173,16 @@ OperationStatusResult restartNode(String resourceGroupName, String kubernetesClu Response getByIdWithResponse(String id, Context context); /** - * Delete the Kubernetes cluster. - * * Delete the provided Kubernetes cluster. * * @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 current status of an async operation. */ - OperationStatusResult deleteById(String id); + void deleteById(String id); /** - * Delete the Kubernetes cluster. - * * Delete the provided Kubernetes cluster. * * @param id the resource ID. @@ -225,9 +194,8 @@ OperationStatusResult restartNode(String resourceGroupName, String kubernetesClu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); + void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); /** * Begins definition for a new KubernetesCluster resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesLabel.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesLabel.java index a0d565da321a..2acbc778f0b5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesLabel.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesLabel.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -73,24 +72,6 @@ public KubernetesLabel withValue(String value) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (key() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property key in model KubernetesLabel")); - } - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model KubernetesLabel")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(KubernetesLabel.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesNodePowerState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesNodePowerState.java index 710086ce4e5f..fc6e5230ade1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesNodePowerState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesNodePowerState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,17 +12,17 @@ */ public final class KubernetesNodePowerState extends ExpandableStringEnum { /** - * Static value On for KubernetesNodePowerState. + * The node is powered on. */ public static final KubernetesNodePowerState ON = fromString("On"); /** - * Static value Off for KubernetesNodePowerState. + * The node is powered off. */ public static final KubernetesNodePowerState OFF = fromString("Off"); /** - * Static value Unknown for KubernetesNodePowerState. + * The node is in an unknown power state. */ public static final KubernetesNodePowerState UNKNOWN = fromString("Unknown"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesNodeRole.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesNodeRole.java index 5ad2d9e5ba69..1c5f59ca33bd 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesNodeRole.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesNodeRole.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class KubernetesNodeRole extends ExpandableStringEnum { /** - * Static value ControlPlane for KubernetesNodeRole. + * Control plane role. */ public static final KubernetesNodeRole CONTROL_PLANE = fromString("ControlPlane"); /** - * Static value Worker for KubernetesNodeRole. + * Worker role. */ public static final KubernetesNodeRole WORKER = fromString("Worker"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesPluginType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesPluginType.java index 38aeb893d5b8..bc3ee21b5af9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesPluginType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesPluginType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,27 +12,27 @@ */ public final class KubernetesPluginType extends ExpandableStringEnum { /** - * Static value DPDK for KubernetesPluginType. + * DPDK plugin type. */ public static final KubernetesPluginType DPDK = fromString("DPDK"); /** - * Static value SRIOV for KubernetesPluginType. + * SRIOV plugin type. */ public static final KubernetesPluginType SRIOV = fromString("SRIOV"); /** - * Static value OSDevice for KubernetesPluginType. + * OSDevice plugin type. */ public static final KubernetesPluginType OSDEVICE = fromString("OSDevice"); /** - * Static value MACVLAN for KubernetesPluginType. + * MACVLAN plugin type. */ public static final KubernetesPluginType MACVLAN = fromString("MACVLAN"); /** - * Static value IPVLAN for KubernetesPluginType. + * IPVLAN plugin type. */ public static final KubernetesPluginType IPVLAN = fromString("IPVLAN"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersion.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersion.java new file mode 100644 index 000000000000..9ad144091e0c --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersion.java @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.networkcloud.fluent.models.KubernetesVersionInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of KubernetesVersion. + */ +public interface KubernetesVersion { + /** + * 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 etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the extendedLocation property: The extended location of the resource. This property is required when + * creating 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 values property: The list of available Kubernetes versions. + * + * @return the values value. + */ + List values(); + + /** + * Gets the provisioningState property: The provisioning state of the Kubernetes version resource. + * + * @return the provisioningState value. + */ + KubernetesVersionProvisioningState provisioningState(); + + /** + * 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.networkcloud.fluent.models.KubernetesVersionInner object. + * + * @return the inner object. + */ + KubernetesVersionInner innerModel(); + + /** + * The entirety of the KubernetesVersion definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithExtendedLocation, DefinitionStages.WithCreate { + } + + /** + * The KubernetesVersion definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the KubernetesVersion definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the KubernetesVersion 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 KubernetesVersion 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. + */ + WithExtendedLocation withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the KubernetesVersion definition allowing to specify extendedLocation. + */ + interface WithExtendedLocation { + /** + * Specifies the extendedLocation property: The extended location of the resource. This property is required + * when creating the resource.. + * + * @param extendedLocation The extended location of the resource. This property is required when creating + * the resource. + * @return the next definition stage. + */ + WithCreate withExtendedLocation(ExtendedLocation extendedLocation); + } + + /** + * The stage of the KubernetesVersion 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.WithIfMatch, DefinitionStages.WithIfNoneMatch { + /** + * Executes the create request. + * + * @return the created resource. + */ + KubernetesVersion create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + KubernetesVersion create(Context context); + } + + /** + * The stage of the KubernetesVersion 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 KubernetesVersion definition allowing to specify ifMatch. + */ + interface WithIfMatch { + /** + * Specifies the ifMatch property: The ETag of the transformation. Omit this value to always overwrite the + * current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent + * changes.. + * + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. + * Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @return the next definition stage. + */ + WithCreate withIfMatch(String ifMatch); + } + + /** + * The stage of the KubernetesVersion definition allowing to specify ifNoneMatch. + */ + interface WithIfNoneMatch { + /** + * Specifies the ifNoneMatch property: Set to '*' to allow a new record set to be created, but to prevent + * updating an existing resource. Other values will result in error from server as they are not supported.. + * + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an + * existing resource. Other values will result in error from server as they are not supported. + * @return the next definition stage. + */ + WithCreate withIfNoneMatch(String ifNoneMatch); + } + } + + /** + * Begins update for the KubernetesVersion resource. + * + * @return the stage of resource update. + */ + KubernetesVersion.Update update(); + + /** + * The template for KubernetesVersion update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIfMatch, UpdateStages.WithIfNoneMatch { + /** + * Executes the update request. + * + * @return the updated resource. + */ + KubernetesVersion apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + KubernetesVersion apply(Context context); + } + + /** + * The KubernetesVersion update stages. + */ + interface UpdateStages { + /** + * The stage of the KubernetesVersion 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); + } + + /** + * The stage of the KubernetesVersion update allowing to specify ifMatch. + */ + interface WithIfMatch { + /** + * Specifies the ifMatch property: The ETag of the transformation. Omit this value to always overwrite the + * current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent + * changes.. + * + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. + * Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @return the next definition stage. + */ + Update withIfMatch(String ifMatch); + } + + /** + * The stage of the KubernetesVersion update allowing to specify ifNoneMatch. + */ + interface WithIfNoneMatch { + /** + * Specifies the ifNoneMatch property: Set to '*' to allow a new record set to be created, but to prevent + * updating an existing resource. Other values will result in error from server as they are not supported.. + * + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an + * existing resource. Other values will result in error from server as they are not supported. + * @return the next definition stage. + */ + Update withIfNoneMatch(String ifNoneMatch); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + KubernetesVersion refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + KubernetesVersion refresh(Context context); +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersionPatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersionPatchParameters.java new file mode 100644 index 000000000000..e649e53b97a3 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersionPatchParameters.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.networkcloud.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; + +/** + * KubernetesVersionPatchParameters represents the body of the request to patch Kubernetes version tags. + */ +@Fluent +public final class KubernetesVersionPatchParameters implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /** + * Creates an instance of KubernetesVersionPatchParameters class. + */ + public KubernetesVersionPatchParameters() { + } + + /** + * 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 KubernetesVersionPatchParameters object itself. + */ + public KubernetesVersionPatchParameters 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 KubernetesVersionPatchParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KubernetesVersionPatchParameters 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 KubernetesVersionPatchParameters. + */ + public static KubernetesVersionPatchParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KubernetesVersionPatchParameters deserializedKubernetesVersionPatchParameters + = new KubernetesVersionPatchParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedKubernetesVersionPatchParameters.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedKubernetesVersionPatchParameters; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersionProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersionProvisioningState.java new file mode 100644 index 000000000000..e8292424e46e --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersionProvisioningState.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.networkcloud.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The provisioning state of the Kubernetes version resource. + */ +public final class KubernetesVersionProvisioningState extends ExpandableStringEnum { + /** + * The Accepted status. + */ + public static final KubernetesVersionProvisioningState ACCEPTED = fromString("Accepted"); + + /** + * The Canceled status. + */ + public static final KubernetesVersionProvisioningState CANCELED = fromString("Canceled"); + + /** + * The Failed status. + */ + public static final KubernetesVersionProvisioningState FAILED = fromString("Failed"); + + /** + * The Succeeded status. + */ + public static final KubernetesVersionProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Creates a new instance of KubernetesVersionProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KubernetesVersionProvisioningState() { + } + + /** + * Creates or finds a KubernetesVersionProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding KubernetesVersionProvisioningState. + */ + public static KubernetesVersionProvisioningState fromString(String name) { + return fromString(name, KubernetesVersionProvisioningState.class); + } + + /** + * Gets known KubernetesVersionProvisioningState values. + * + * @return known KubernetesVersionProvisioningState values. + */ + public static Collection values() { + return values(KubernetesVersionProvisioningState.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersionValue.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersionValue.java new file mode 100644 index 000000000000..30d87e7a9ea3 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersionValue.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.networkcloud.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; + +/** + * KubernetesVersionValue describes a specific Kubernetes version that can be deployed. + */ +@Immutable +public final class KubernetesVersionValue implements JsonSerializable { + /* + * Additional description for the Kubernetes version. + */ + private String description; + + /* + * The Kubernetes version identifier. + */ + private String version; + + /** + * Creates an instance of KubernetesVersionValue class. + */ + private KubernetesVersionValue() { + } + + /** + * Get the description property: Additional description for the Kubernetes version. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the version property: The Kubernetes version identifier. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KubernetesVersionValue from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KubernetesVersionValue 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 KubernetesVersionValue. + */ + public static KubernetesVersionValue fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KubernetesVersionValue deserializedKubernetesVersionValue = new KubernetesVersionValue(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedKubernetesVersionValue.description = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedKubernetesVersionValue.version = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedKubernetesVersionValue; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersions.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersions.java new file mode 100644 index 000000000000..982b8a677b8a --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersions.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.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 KubernetesVersions. + */ +public interface KubernetesVersions { + /** + * Retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @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 kubernetesVersion represents the available Kubernetes versions for a cluster along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String kubernetesVersionName, + Context context); + + /** + * Retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return kubernetesVersion represents the available Kubernetes versions for a cluster. + */ + KubernetesVersion getByResourceGroup(String resourceGroupName, String kubernetesVersionName); + + /** + * Delete the specified Kubernetes version resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 kubernetesVersionName); + + /** + * Delete the specified Kubernetes version resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kubernetesVersionName The name of the Kubernetes version resource. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 kubernetesVersionName, String ifMatch, String ifNoneMatch, + Context context); + + /** + * Get a list of Kubernetes version resources in the provided resource group. + * + * @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 a list of Kubernetes version resources in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of Kubernetes version resources in the provided resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 Kubernetes version resources in the provided resource group as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); + + /** + * Get a list of Kubernetes version resources in the provided subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Kubernetes version resources in the provided subscription as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Get a list of Kubernetes version resources in the provided subscription. + * + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 Kubernetes version resources in the provided subscription as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(Integer top, String skipToken, Context context); + + /** + * Retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. + * + * @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 kubernetesVersion represents the available Kubernetes versions for a cluster along with {@link Response}. + */ + KubernetesVersion getById(String id); + + /** + * Retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. + * + * @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 kubernetesVersion represents the available Kubernetes versions for a cluster along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the specified Kubernetes version resource. + * + * @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); + + /** + * Delete the specified Kubernetes version resource. + * + * @param id the resource ID. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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, String ifMatch, String ifNoneMatch, Context context); + + /** + * Begins definition for a new KubernetesVersion resource. + * + * @param name resource name. + * @return the first stage of the new KubernetesVersion definition. + */ + KubernetesVersion.DefinitionStages.Blank define(String name); +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2Network.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2Network.java index 53392de4cfad..76a7c19f7c8d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2Network.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2Network.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -51,14 +51,18 @@ public interface L2Network { Map tags(); /** - * Gets the etag property: Resource ETag. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ String etag(); /** - * Gets the extendedLocation property: The extended location of the cluster associated with the resource. + * Gets the extendedLocation property: The extended location of the resource. This property is required when + * creating the resource. * * @return the extendedLocation value. */ @@ -71,6 +75,29 @@ public interface L2Network { */ SystemData systemData(); + /** + * Gets the hybridAksPluginType property: Field Deprecated. The field was previously optional, now it will have no + * defined behavior and will be ignored. The network plugin type for Hybrid AKS. + * + * @return the hybridAksPluginType value. + */ + HybridAksPluginType hybridAksPluginType(); + + /** + * Gets the interfaceName property: The default interface name for this L2 network in the virtual machine. This name + * can be overridden by the name supplied in the network attachment configuration of that virtual machine. + * + * @return the interfaceName value. + */ + String interfaceName(); + + /** + * Gets the l2IsolationDomainId property: The resource ID of the Network Fabric l2IsolationDomain. + * + * @return the l2IsolationDomainId value. + */ + String l2IsolationDomainId(); + /** * Gets the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources * that have attached this network. @@ -109,27 +136,13 @@ public interface L2Network { List hybridAksClustersAssociatedIds(); /** - * Gets the hybridAksPluginType property: Field Deprecated. The field was previously optional, now it will have no - * defined behavior and will be ignored. The network plugin type for Hybrid AKS. - * - * @return the hybridAksPluginType value. - */ - HybridAksPluginType hybridAksPluginType(); - - /** - * Gets the interfaceName property: The default interface name for this L2 network in the virtual machine. This name - * can be overridden by the name supplied in the network attachment configuration of that virtual machine. - * - * @return the interfaceName value. - */ - String interfaceName(); - - /** - * Gets the l2IsolationDomainId property: The resource ID of the Network Fabric l2IsolationDomain. + * Gets the virtualMachinesAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list of + * virtual machine resource ID(s), excluding any Hybrid AKS virtual machines, that are currently using this L2 + * network. * - * @return the l2IsolationDomainId value. + * @return the virtualMachinesAssociatedIds value. */ - String l2IsolationDomainId(); + List virtualMachinesAssociatedIds(); /** * Gets the provisioningState property: The provisioning state of the L2 network. @@ -138,15 +151,6 @@ public interface L2Network { */ L2NetworkProvisioningState provisioningState(); - /** - * Gets the virtualMachinesAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list of - * virtual machine resource ID(s), excluding any Hybrid AKS virtual machines, that are currently using this L2 - * network. - * - * @return the virtualMachinesAssociatedIds value. - */ - List virtualMachinesAssociatedIds(); - /** * Gets the region of the resource. * @@ -232,10 +236,11 @@ interface WithResourceGroup { */ interface WithExtendedLocation { /** - * Specifies the extendedLocation property: The extended location of the cluster associated with the - * resource.. + * Specifies the extendedLocation property: The extended location of the resource. This property is required + * when creating the resource.. * - * @param extendedLocation The extended location of the cluster associated with the resource. + * @param extendedLocation The extended location of the resource. This property is required when creating + * the resource. * @return the next definition stage. */ WithL2IsolationDomainId withExtendedLocation(ExtendedLocation extendedLocation); @@ -388,9 +393,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: The Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags.. * - * @param tags The Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkAttachmentConfiguration.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkAttachmentConfiguration.java index 810db7d21be7..a3b2e61ccf65 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkAttachmentConfiguration.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkAttachmentConfiguration.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -73,21 +72,6 @@ public L2NetworkAttachmentConfiguration withPluginType(KubernetesPluginType plug return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (networkId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkId in model L2NetworkAttachmentConfiguration")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(L2NetworkAttachmentConfiguration.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkDetailedStatus.java index f675aa648809..442edc8686b5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,17 +12,17 @@ */ public final class L2NetworkDetailedStatus extends ExpandableStringEnum { /** - * Static value Error for L2NetworkDetailedStatus. + * The Error status. */ public static final L2NetworkDetailedStatus ERROR = fromString("Error"); /** - * Static value Available for L2NetworkDetailedStatus. + * The Available status. */ public static final L2NetworkDetailedStatus AVAILABLE = fromString("Available"); /** - * Static value Provisioning for L2NetworkDetailedStatus. + * The Provisioning status. */ public static final L2NetworkDetailedStatus PROVISIONING = fromString("Provisioning"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkPatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkPatchParameters.java index 6acea6f27bb5..5694de04a347 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkPatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkPatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -18,7 +18,7 @@ @Fluent public final class L2NetworkPatchParameters implements JsonSerializable { /* - * The Azure resource tags that will replace the existing ones. + * Resource tags. */ private Map tags; @@ -29,7 +29,7 @@ public L2NetworkPatchParameters() { } /** - * Get the tags property: The Azure resource tags that will replace the existing ones. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -38,7 +38,7 @@ public Map tags() { } /** - * Set the tags property: The Azure resource tags that will replace the existing ones. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the L2NetworkPatchParameters object itself. @@ -48,14 +48,6 @@ public L2NetworkPatchParameters withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkProvisioningState.java index 32bc25a571f3..020c2daab8a1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkProvisioningState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,27 +12,27 @@ */ public final class L2NetworkProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for L2NetworkProvisioningState. + * The Succeeded status. */ public static final L2NetworkProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for L2NetworkProvisioningState. + * The Failed status. */ public static final L2NetworkProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for L2NetworkProvisioningState. + * The Canceled status. */ public static final L2NetworkProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Provisioning for L2NetworkProvisioningState. + * The Provisioning status. */ public static final L2NetworkProvisioningState PROVISIONING = fromString("Provisioning"); /** - * Static value Accepted for L2NetworkProvisioningState. + * The Accepted status. */ public static final L2NetworkProvisioningState ACCEPTED = fromString("Accepted"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2Networks.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2Networks.java index 87de9b9615eb..12f436cbd928 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2Networks.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2Networks.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,133 +13,112 @@ */ public interface L2Networks { /** - * List layer 2 (L2) networks in the subscription. - * - * Get a list of layer 2 (L2) networks in the provided subscription. + * Get properties of the provided layer 2 (L2) network. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2NetworkName The name of the L2 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 a list of layer 2 (L2) networks in the provided subscription as paginated response with - * {@link PagedIterable}. + * @return properties of the provided layer 2 (L2) network along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String l2NetworkName, Context context); /** - * List layer 2 (L2) networks in the subscription. - * - * Get a list of layer 2 (L2) networks in the provided subscription. + * Get properties of the provided layer 2 (L2) network. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2NetworkName The name of the L2 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 a list of layer 2 (L2) networks in the provided subscription as paginated response with - * {@link PagedIterable}. + * @return properties of the provided layer 2 (L2) network. */ - PagedIterable list(Integer top, String skipToken, Context context); + L2Network getByResourceGroup(String resourceGroupName, String l2NetworkName); /** - * List layer 2 (L2) networks in the resource group. - * - * Get a list of layer 2 (L2) networks in the provided resource group. + * Delete the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2NetworkName The name of the L2 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 a list of layer 2 (L2) networks in the provided resource group as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void deleteByResourceGroup(String resourceGroupName, String l2NetworkName); /** - * List layer 2 (L2) networks in the resource group. - * - * Get a list of layer 2 (L2) networks in the provided resource group. + * Delete the provided layer 2 (L2) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param l2NetworkName The name of the L2 network. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 layer 2 (L2) networks in the provided resource group as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context); + void delete(String resourceGroupName, String l2NetworkName, String ifMatch, String ifNoneMatch, Context context); /** - * Retrieve the layer 2 (L2) network. - * - * Get properties of the provided layer 2 (L2) network. + * Get a list of layer 2 (L2) networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 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 properties of the provided layer 2 (L2) network along with {@link Response}. + * @return a list of layer 2 (L2) networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String l2NetworkName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Retrieve the layer 2 (L2) network. - * - * Get properties of the provided layer 2 (L2) network. + * Get a list of layer 2 (L2) networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 properties of the provided layer 2 (L2) network. + * @return a list of layer 2 (L2) networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - L2Network getByResourceGroup(String resourceGroupName, String l2NetworkName); + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); /** - * Delete the layer 2 (L2) network. - * - * Delete the provided layer 2 (L2) network. + * Get a list of layer 2 (L2) networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 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 current status of an async operation. + * @return a list of layer 2 (L2) networks in the provided subscription as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult deleteByResourceGroup(String resourceGroupName, String l2NetworkName); + PagedIterable list(); /** - * Delete the layer 2 (L2) network. - * - * Delete the provided layer 2 (L2) network. + * Get a list of layer 2 (L2) networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of layer 2 (L2) networks in the provided subscription as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String l2NetworkName, String ifMatch, String ifNoneMatch, - Context context); + PagedIterable list(Integer top, String skipToken, Context context); /** - * Retrieve the layer 2 (L2) network. - * * Get properties of the provided layer 2 (L2) network. * * @param id the resource ID. @@ -151,8 +130,6 @@ OperationStatusResult delete(String resourceGroupName, String l2NetworkName, Str L2Network getById(String id); /** - * Retrieve the layer 2 (L2) network. - * * Get properties of the provided layer 2 (L2) network. * * @param id the resource ID. @@ -165,21 +142,16 @@ OperationStatusResult delete(String resourceGroupName, String l2NetworkName, Str Response getByIdWithResponse(String id, Context context); /** - * Delete the layer 2 (L2) network. - * * Delete the provided layer 2 (L2) 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 current status of an async operation. */ - OperationStatusResult deleteById(String id); + void deleteById(String id); /** - * Delete the layer 2 (L2) network. - * * Delete the provided layer 2 (L2) network. * * @param id the resource ID. @@ -191,9 +163,8 @@ OperationStatusResult delete(String resourceGroupName, String l2NetworkName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); + void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); /** * Begins definition for a new L2Network resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2ServiceLoadBalancerConfiguration.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2ServiceLoadBalancerConfiguration.java index 4bc8ca740260..6eb8240bf391 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2ServiceLoadBalancerConfiguration.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L2ServiceLoadBalancerConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -50,17 +50,6 @@ public L2ServiceLoadBalancerConfiguration withIpAddressPools(List return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ipAddressPools() != null) { - ipAddressPools().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3Network.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3Network.java index be121b151ab4..b61415f20aae 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3Network.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3Network.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -51,14 +51,18 @@ public interface L3Network { Map tags(); /** - * Gets the etag property: Resource ETag. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ String etag(); /** - * Gets the extendedLocation property: The extended location of the cluster associated with the resource. + * Gets the extendedLocation property: The extended location of the resource. This property is required when + * creating the resource. * * @return the extendedLocation value. */ @@ -71,43 +75,6 @@ public interface L3Network { */ SystemData systemData(); - /** - * Gets the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources - * that have attached this network. - * - * @return the associatedResourceIds value. - */ - List associatedResourceIds(); - - /** - * Gets the clusterId property: The resource ID of the Network Cloud cluster this L3 network is associated with. - * - * @return the clusterId value. - */ - String clusterId(); - - /** - * Gets the detailedStatus property: The more detailed status of the L3 network. - * - * @return the detailedStatus value. - */ - L3NetworkDetailedStatus detailedStatus(); - - /** - * Gets the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - String detailedStatusMessage(); - - /** - * Gets the hybridAksClustersAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list - * of Hybrid AKS cluster resource IDs that are associated with this L3 network. - * - * @return the hybridAksClustersAssociatedIds value. - */ - List hybridAksClustersAssociatedIds(); - /** * Gets the hybridAksIpamEnabled property: Field Deprecated. The field was previously optional, now it will have no * defined behavior and will be ignored. The indicator of whether or not to disable IPAM allocation on the network @@ -164,11 +131,48 @@ public interface L3Network { String l3IsolationDomainId(); /** - * Gets the provisioningState property: The provisioning state of the L3 network. + * Gets the vlan property: The VLAN from the l3IsolationDomain that is used for this network. * - * @return the provisioningState value. + * @return the vlan value. */ - L3NetworkProvisioningState provisioningState(); + long vlan(); + + /** + * Gets the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources + * that have attached this network. + * + * @return the associatedResourceIds value. + */ + List associatedResourceIds(); + + /** + * Gets the clusterId property: The resource ID of the Network Cloud cluster this L3 network is associated with. + * + * @return the clusterId value. + */ + String clusterId(); + + /** + * Gets the detailedStatus property: The more detailed status of the L3 network. + * + * @return the detailedStatus value. + */ + L3NetworkDetailedStatus detailedStatus(); + + /** + * Gets the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + String detailedStatusMessage(); + + /** + * Gets the hybridAksClustersAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list + * of Hybrid AKS cluster resource IDs that are associated with this L3 network. + * + * @return the hybridAksClustersAssociatedIds value. + */ + List hybridAksClustersAssociatedIds(); /** * Gets the virtualMachinesAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list of @@ -180,11 +184,11 @@ public interface L3Network { List virtualMachinesAssociatedIds(); /** - * Gets the vlan property: The VLAN from the l3IsolationDomain that is used for this network. + * Gets the provisioningState property: The provisioning state of the L3 network. * - * @return the vlan value. + * @return the provisioningState value. */ - long vlan(); + L3NetworkProvisioningState provisioningState(); /** * Gets the region of the resource. @@ -271,10 +275,11 @@ interface WithResourceGroup { */ interface WithExtendedLocation { /** - * Specifies the extendedLocation property: The extended location of the cluster associated with the - * resource.. + * Specifies the extendedLocation property: The extended location of the resource. This property is required + * when creating the resource.. * - * @param extendedLocation The extended location of the cluster associated with the resource. + * @param extendedLocation The extended location of the resource. This property is required when creating + * the resource. * @return the next definition stage. */ WithL3IsolationDomainId withExtendedLocation(ExtendedLocation extendedLocation); @@ -503,9 +508,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: The Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags.. * - * @param tags The Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkAttachmentConfiguration.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkAttachmentConfiguration.java index c2c19212cd5e..11d92d71627e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkAttachmentConfiguration.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkAttachmentConfiguration.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -101,21 +100,6 @@ public L3NetworkAttachmentConfiguration withPluginType(KubernetesPluginType plug return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (networkId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkId in model L3NetworkAttachmentConfiguration")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(L3NetworkAttachmentConfiguration.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkConfigurationIpamEnabled.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkConfigurationIpamEnabled.java index 46b6f8689fb1..e952ad9941f0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkConfigurationIpamEnabled.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkConfigurationIpamEnabled.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,12 +13,12 @@ */ public final class L3NetworkConfigurationIpamEnabled extends ExpandableStringEnum { /** - * Static value True for L3NetworkConfigurationIpamEnabled. + * IP address management enabled. */ public static final L3NetworkConfigurationIpamEnabled TRUE = fromString("True"); /** - * Static value False for L3NetworkConfigurationIpamEnabled. + * IP address management disabled. */ public static final L3NetworkConfigurationIpamEnabled FALSE = fromString("False"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkDetailedStatus.java index 2983333335cb..5e6f66afcfdb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,17 +12,17 @@ */ public final class L3NetworkDetailedStatus extends ExpandableStringEnum { /** - * Static value Error for L3NetworkDetailedStatus. + * The Error status. */ public static final L3NetworkDetailedStatus ERROR = fromString("Error"); /** - * Static value Available for L3NetworkDetailedStatus. + * The Available status. */ public static final L3NetworkDetailedStatus AVAILABLE = fromString("Available"); /** - * Static value Provisioning for L3NetworkDetailedStatus. + * The Provisioning status. */ public static final L3NetworkDetailedStatus PROVISIONING = fromString("Provisioning"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkPatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkPatchParameters.java index ad935cfff488..9c2e7889915d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkPatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkPatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -18,7 +18,7 @@ @Fluent public final class L3NetworkPatchParameters implements JsonSerializable { /* - * The Azure resource tags that will replace the existing ones. + * Resource tags. */ private Map tags; @@ -29,7 +29,7 @@ public L3NetworkPatchParameters() { } /** - * Get the tags property: The Azure resource tags that will replace the existing ones. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -38,7 +38,7 @@ public Map tags() { } /** - * Set the tags property: The Azure resource tags that will replace the existing ones. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the L3NetworkPatchParameters object itself. @@ -48,14 +48,6 @@ public L3NetworkPatchParameters withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkProvisioningState.java index a2a9f1a005d2..f3a16e428dbc 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkProvisioningState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,27 +12,27 @@ */ public final class L3NetworkProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for L3NetworkProvisioningState. + * The Succeeded status. */ public static final L3NetworkProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for L3NetworkProvisioningState. + * The Failed status. */ public static final L3NetworkProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for L3NetworkProvisioningState. + * The Canceled status. */ public static final L3NetworkProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Provisioning for L3NetworkProvisioningState. + * The Provisioning status. */ public static final L3NetworkProvisioningState PROVISIONING = fromString("Provisioning"); /** - * Static value Accepted for L3NetworkProvisioningState. + * The Accepted status. */ public static final L3NetworkProvisioningState ACCEPTED = fromString("Accepted"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3Networks.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3Networks.java index c603c475da80..472d7b67eb73 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3Networks.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/L3Networks.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,133 +13,112 @@ */ public interface L3Networks { /** - * List layer 3 (L3) networks in the subscription. - * - * Get a list of layer 3 (L3) networks in the provided subscription. + * Get properties of the provided layer 3 (L3) network. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3NetworkName The name of the L3 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 a list of layer 3 (L3) networks in the provided subscription as paginated response with - * {@link PagedIterable}. + * @return properties of the provided layer 3 (L3) network along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String l3NetworkName, Context context); /** - * List layer 3 (L3) networks in the subscription. - * - * Get a list of layer 3 (L3) networks in the provided subscription. + * Get properties of the provided layer 3 (L3) network. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3NetworkName The name of the L3 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 a list of layer 3 (L3) networks in the provided subscription as paginated response with - * {@link PagedIterable}. + * @return properties of the provided layer 3 (L3) network. */ - PagedIterable list(Integer top, String skipToken, Context context); + L3Network getByResourceGroup(String resourceGroupName, String l3NetworkName); /** - * List layer 3 (L3) networks in the resource group. - * - * Get a list of layer 3 (L3) networks in the provided resource group. + * Delete the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3NetworkName The name of the L3 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 a list of layer 3 (L3) networks in the provided resource group as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void deleteByResourceGroup(String resourceGroupName, String l3NetworkName); /** - * List layer 3 (L3) networks in the resource group. - * - * Get a list of layer 3 (L3) networks in the provided resource group. + * Delete the provided layer 3 (L3) network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param l3NetworkName The name of the L3 network. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 layer 3 (L3) networks in the provided resource group as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, - Context context); + void delete(String resourceGroupName, String l3NetworkName, String ifMatch, String ifNoneMatch, Context context); /** - * Retrieve the layer 3 (L3) network. - * - * Get properties of the provided layer 3 (L3) network. + * Get a list of layer 3 (L3) networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 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 properties of the provided layer 3 (L3) network along with {@link Response}. + * @return a list of layer 3 (L3) networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String l3NetworkName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Retrieve the layer 3 (L3) network. - * - * Get properties of the provided layer 3 (L3) network. + * Get a list of layer 3 (L3) networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 properties of the provided layer 3 (L3) network. + * @return a list of layer 3 (L3) networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - L3Network getByResourceGroup(String resourceGroupName, String l3NetworkName); + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); /** - * Delete the layer 3 (L3) network. - * - * Delete the provided layer 3 (L3) network. + * Get a list of layer 3 (L3) networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 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 current status of an async operation. + * @return a list of layer 3 (L3) networks in the provided subscription as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult deleteByResourceGroup(String resourceGroupName, String l3NetworkName); + PagedIterable list(); /** - * Delete the layer 3 (L3) network. - * - * Delete the provided layer 3 (L3) network. + * Get a list of layer 3 (L3) networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of layer 3 (L3) networks in the provided subscription as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String l3NetworkName, String ifMatch, String ifNoneMatch, - Context context); + PagedIterable list(Integer top, String skipToken, Context context); /** - * Retrieve the layer 3 (L3) network. - * * Get properties of the provided layer 3 (L3) network. * * @param id the resource ID. @@ -151,8 +130,6 @@ OperationStatusResult delete(String resourceGroupName, String l3NetworkName, Str L3Network getById(String id); /** - * Retrieve the layer 3 (L3) network. - * * Get properties of the provided layer 3 (L3) network. * * @param id the resource ID. @@ -165,21 +142,16 @@ OperationStatusResult delete(String resourceGroupName, String l3NetworkName, Str Response getByIdWithResponse(String id, Context context); /** - * Delete the layer 3 (L3) network. - * * Delete the provided layer 3 (L3) 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 current status of an async operation. */ - OperationStatusResult deleteById(String id); + void deleteById(String id); /** - * Delete the layer 3 (L3) network. - * * Delete the provided layer 3 (L3) network. * * @param id the resource ID. @@ -191,9 +163,8 @@ OperationStatusResult delete(String resourceGroupName, String l3NetworkName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); + void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); /** * Begins definition for a new L3Network resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/LldpNeighbor.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/LldpNeighbor.java index fa9234335306..308282a0fba0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/LldpNeighbor.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/LldpNeighbor.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -40,7 +40,7 @@ public final class LldpNeighbor implements JsonSerializable { /** * Creates an instance of LldpNeighbor class. */ - public LldpNeighbor() { + private LldpNeighbor() { } /** @@ -79,14 +79,6 @@ public String systemName() { return this.systemName; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/MachineDisk.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/MachineDisk.java index a4a2cfac81c4..785ae55e1003 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/MachineDisk.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/MachineDisk.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Disk represents the properties of the disk. + * MachineDisk represents the properties of the disk. */ @Immutable public final class MachineDisk implements JsonSerializable { @@ -34,7 +34,7 @@ public final class MachineDisk implements JsonSerializable { /** * Creates an instance of MachineDisk class. */ - public MachineDisk() { + private MachineDisk() { } /** @@ -64,14 +64,6 @@ public DiskType type() { return this.type; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/MachineSkuDiskConnectionType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/MachineSkuDiskConnectionType.java index 3b99b4548c36..34e4a0fc572f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/MachineSkuDiskConnectionType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/MachineSkuDiskConnectionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,22 +12,22 @@ */ public final class MachineSkuDiskConnectionType extends ExpandableStringEnum { /** - * Static value PCIE for MachineSkuDiskConnectionType. + * PCIE connection type. */ public static final MachineSkuDiskConnectionType PCIE = fromString("PCIE"); /** - * Static value SATA for MachineSkuDiskConnectionType. + * SATA connection type. */ public static final MachineSkuDiskConnectionType SATA = fromString("SATA"); /** - * Static value RAID for MachineSkuDiskConnectionType. + * RAID connection type. */ public static final MachineSkuDiskConnectionType RAID = fromString("RAID"); /** - * Static value SAS for MachineSkuDiskConnectionType. + * SAS connection type. */ public static final MachineSkuDiskConnectionType SAS = fromString("SAS"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/MachineSkuSlot.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/MachineSkuSlot.java index 0fa357d6c36e..1ef2d731b0ca 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/MachineSkuSlot.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/MachineSkuSlot.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -31,7 +31,7 @@ public final class MachineSkuSlot implements JsonSerializable { /** * Creates an instance of MachineSkuSlot class. */ - public MachineSkuSlot() { + private MachineSkuSlot() { } /** @@ -151,17 +151,6 @@ public String vendor() { return this.innerProperties() == null ? null : this.innerProperties().vendor(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedResourceGroupConfiguration.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedResourceGroupConfiguration.java index daff2b545a69..c1768f5a4ade 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedResourceGroupConfiguration.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedResourceGroupConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -76,14 +76,6 @@ public ManagedResourceGroupConfiguration withName(String name) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedServiceIdentity.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedServiceIdentity.java index fd486044d517..f74aaaf08886 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedServiceIdentity.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedServiceIdentity.java @@ -1,18 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.util.Map; -import java.util.UUID; /** * Managed service identity (system assigned and/or user assigned identities). @@ -23,24 +21,21 @@ public final class ManagedServiceIdentity implements JsonSerializable userAssignedIdentities; @@ -56,7 +51,7 @@ public ManagedServiceIdentity() { * * @return the principalId value. */ - public UUID principalId() { + public String principalId() { return this.principalId; } @@ -66,13 +61,12 @@ public UUID principalId() { * * @return the tenantId value. */ - public UUID tenantId() { + public String tenantId() { return this.tenantId; } /** - * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * Get the type property: The type of managed identity assigned to this resource. * * @return the type value. */ @@ -81,8 +75,7 @@ public ManagedServiceIdentityType type() { } /** - * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * Set the type property: The type of managed identity assigned to this resource. * * @param type the type value to set. * @return the ManagedServiceIdentity object itself. @@ -93,10 +86,7 @@ public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { } /** - * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * Get the userAssignedIdentities property: The identities assigned to this resource by the user. * * @return the userAssignedIdentities value. */ @@ -105,10 +95,7 @@ public Map userAssignedIdentities() { } /** - * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * Set the userAssignedIdentities property: The identities assigned to this resource by the user. * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the ManagedServiceIdentity object itself. @@ -118,27 +105,6 @@ public ManagedServiceIdentity withUserAssignedIdentities(Map { - if (e != null) { - e.validate(); - } - }); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class); - /** * {@inheritDoc} */ @@ -170,11 +136,9 @@ public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOEx if ("type".equals(fieldName)) { deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); } else if ("principalId".equals(fieldName)) { - deserializedManagedServiceIdentity.principalId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedManagedServiceIdentity.principalId = reader.getString(); } else if ("tenantId".equals(fieldName)) { - deserializedManagedServiceIdentity.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedManagedServiceIdentity.tenantId = reader.getString(); } else if ("userAssignedIdentities".equals(fieldName)) { Map userAssignedIdentities = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedServiceIdentitySelectorType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedServiceIdentitySelectorType.java index 19bdd386552d..068f273144a7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedServiceIdentitySelectorType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedServiceIdentitySelectorType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,13 +12,13 @@ */ public final class ManagedServiceIdentitySelectorType extends ExpandableStringEnum { /** - * Static value SystemAssignedIdentity for ManagedServiceIdentitySelectorType. + * System assigned identity selection. */ public static final ManagedServiceIdentitySelectorType SYSTEM_ASSIGNED_IDENTITY = fromString("SystemAssignedIdentity"); /** - * Static value UserAssignedIdentity for ManagedServiceIdentitySelectorType. + * User assigned identity selection. */ public static final ManagedServiceIdentitySelectorType USER_ASSIGNED_IDENTITY = fromString("UserAssignedIdentity"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedServiceIdentityType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedServiceIdentityType.java index 0af751383fb4..831e29aa98b9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedServiceIdentityType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedServiceIdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,22 +12,22 @@ */ public final class ManagedServiceIdentityType extends ExpandableStringEnum { /** - * Static value None for ManagedServiceIdentityType. + * No managed identity. */ public static final ManagedServiceIdentityType NONE = fromString("None"); /** - * Static value SystemAssigned for ManagedServiceIdentityType. + * System assigned managed identity. */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); /** - * Static value UserAssigned for ManagedServiceIdentityType. + * User assigned managed identity. */ public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); /** - * Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. + * System and user assigned managed identity. */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = fromString("SystemAssigned,UserAssigned"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/MetricsConfigurations.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/MetricsConfigurations.java index 479575a0683b..a445be05c392 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/MetricsConfigurations.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/MetricsConfigurations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,111 +13,95 @@ */ public interface MetricsConfigurations { /** - * List metrics configurations of the cluster. - * - * Get a list of metrics configurations for the provided cluster. + * Get metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. + * @param metricsConfigurationName The name of the metrics configuration for the cluster. + * @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 metrics configurations for the provided cluster as paginated response with - * {@link PagedIterable}. + * @return metrics configuration of the provided cluster along with {@link Response}. */ - PagedIterable listByCluster(String resourceGroupName, String clusterName); + Response getWithResponse(String resourceGroupName, String clusterName, + String metricsConfigurationName, Context context); /** - * List metrics configurations of the cluster. - * - * Get a list of metrics configurations for the provided cluster. + * Get metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param metricsConfigurationName The name of the metrics configuration for the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 metrics configurations for the provided cluster as paginated response with - * {@link PagedIterable}. + * @return metrics configuration of the provided cluster. */ - PagedIterable listByCluster(String resourceGroupName, String clusterName, Integer top, - String skipToken, Context context); + ClusterMetricsConfiguration get(String resourceGroupName, String clusterName, String metricsConfigurationName); /** - * Retrieve the metrics configuration of the cluster. - * - * Get metrics configuration of the provided cluster. + * Delete the metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param metricsConfigurationName The name of the metrics configuration for the cluster. - * @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 metrics configuration of the provided cluster along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String clusterName, - String metricsConfigurationName, Context context); + void delete(String resourceGroupName, String clusterName, String metricsConfigurationName); /** - * Retrieve the metrics configuration of the cluster. - * - * Get metrics configuration of the provided cluster. + * Delete the metrics configuration of the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. * @param metricsConfigurationName The name of the metrics configuration for the cluster. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. + * @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 metrics configuration of the provided cluster. */ - ClusterMetricsConfiguration get(String resourceGroupName, String clusterName, String metricsConfigurationName); + void delete(String resourceGroupName, String clusterName, String metricsConfigurationName, String ifMatch, + String ifNoneMatch, Context context); /** - * Delete the metrics configuration of the cluster. - * - * Delete the metrics configuration of the provided cluster. + * Get a list of metrics configurations for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param metricsConfigurationName The name of the metrics configuration for the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a list of metrics configurations for the provided cluster as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String clusterName, String metricsConfigurationName); + PagedIterable listByCluster(String resourceGroupName, String clusterName); /** - * Delete the metrics configuration of the cluster. - * - * Delete the metrics configuration of the provided cluster. + * Get a list of metrics configurations for the provided cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster. - * @param metricsConfigurationName The name of the metrics configuration for the cluster. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of metrics configurations for the provided cluster as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String clusterName, String metricsConfigurationName, - String ifMatch, String ifNoneMatch, Context context); + PagedIterable listByCluster(String resourceGroupName, String clusterName, Integer top, + String skipToken, Context context); /** - * Retrieve the metrics configuration of the cluster. - * * Get metrics configuration of the provided cluster. * * @param id the resource ID. @@ -129,8 +113,6 @@ OperationStatusResult delete(String resourceGroupName, String clusterName, Strin ClusterMetricsConfiguration getById(String id); /** - * Retrieve the metrics configuration of the cluster. - * * Get metrics configuration of the provided cluster. * * @param id the resource ID. @@ -143,21 +125,16 @@ OperationStatusResult delete(String resourceGroupName, String clusterName, Strin Response getByIdWithResponse(String id, Context context); /** - * Delete the metrics configuration of the cluster. - * * Delete the metrics configuration of the provided cluster. * * @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 current status of an async operation. */ - OperationStatusResult deleteById(String id); + void deleteById(String id); /** - * Delete the metrics configuration of the cluster. - * * Delete the metrics configuration of the provided cluster. * * @param id the resource ID. @@ -169,9 +146,8 @@ OperationStatusResult delete(String resourceGroupName, String clusterName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); + void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); /** * Begins definition for a new ClusterMetricsConfiguration resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkAttachment.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkAttachment.java index ba5cd757d3d7..17d875b60de4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkAttachment.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkAttachment.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -228,26 +227,6 @@ public NetworkAttachment withNetworkAttachmentName(String networkAttachmentName) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (attachedNetworkId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property attachedNetworkId in model NetworkAttachment")); - } - if (ipAllocationMethod() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property ipAllocationMethod in model NetworkAttachment")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkAttachment.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkConfiguration.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkConfiguration.java index d13e0443f66f..4445f88f4840 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkConfiguration.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkConfiguration.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -251,35 +250,6 @@ public NetworkConfiguration withServiceCidrs(List serviceCidrs) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (attachedNetworkConfiguration() != null) { - attachedNetworkConfiguration().validate(); - } - if (bgpServiceLoadBalancerConfiguration() != null) { - bgpServiceLoadBalancerConfiguration().validate(); - } - if (cloudServicesNetworkId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property cloudServicesNetworkId in model NetworkConfiguration")); - } - if (cniNetworkId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property cniNetworkId in model NetworkConfiguration")); - } - if (l2ServiceLoadBalancerConfiguration() != null) { - l2ServiceLoadBalancerConfiguration().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkConfiguration.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkInterface.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkInterface.java index 228606234d53..7a47f60e3707 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkInterface.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkInterface.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -54,7 +54,7 @@ public final class NetworkInterface implements JsonSerializable { /** * Creates an instance of Nic class. */ - public Nic() { + private Nic() { } /** @@ -64,17 +64,6 @@ public String name() { return this.name; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (lldpNeighbor() != null) { - lldpNeighbor().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NodePoolAdministratorConfigurationPatch.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NodePoolAdministratorConfigurationPatch.java index 2f1d5d223058..0bbeb27ad07e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NodePoolAdministratorConfigurationPatch.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/NodePoolAdministratorConfigurationPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -51,17 +51,6 @@ public NodePoolAdministratorConfigurationPatch withSshPublicKeys(List e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Operation.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Operation.java index ea71ec7e377e..c52037853e83 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Operation.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Operation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -20,7 +20,7 @@ public interface Operation { /** * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. + * operations and "false" for Azure Resource Manager/control-plane operations. * * @return the isDataAction value. */ @@ -42,8 +42,8 @@ public interface Operation { Origin origin(); /** - * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. + * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. * * @return the actionType value. */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OperationDisplay.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OperationDisplay.java index c7493a7208d1..4258cee17d2b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OperationDisplay.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OperationDisplay.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Localized display information for this particular operation. + * Localized display information for an operation. */ @Immutable public final class OperationDisplay implements JsonSerializable { @@ -42,7 +42,7 @@ public final class OperationDisplay implements JsonSerializable { + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * The operations list. + */ + private List operations; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The additional properties of the operation status result. + */ + private OperationStatusResultProperties innerProperties; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * Operation status. + */ + private String status; + /** - * Gets the endTime property: The end time of the operation. + * Creates an instance of OperationStatusResult class. + */ + private OperationStatusResult() { + } + + /** + * Get the endTime property: The end time of the operation. * * @return the endTime value. */ - OffsetDateTime endTime(); + public OffsetDateTime endTime() { + return this.endTime; + } /** - * Gets the error property: If present, details of the operation error. + * Get the error property: If present, details of the operation error. * * @return the error value. */ - ManagementError error(); + public ManagementError error() { + return this.error; + } /** - * Gets the id property: Fully qualified ID for the async operation. + * Get the id property: Fully qualified ID for the async operation. * * @return the id value. */ - String id(); + public String id() { + return this.id; + } /** - * Gets the name property: Name of the async operation. + * Get the name property: Name of the async operation. * * @return the name value. */ - String name(); + public String name() { + return this.name; + } /** - * Gets the operations property: The operations list. + * Get the operations property: The operations list. * * @return the operations value. */ - List operations(); + public List operations() { + return this.operations; + } /** - * Gets the percentComplete property: Percent of the operation that is complete. + * Get the percentComplete property: Percent of the operation that is complete. * * @return the percentComplete value. */ - Float percentComplete(); + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the innerProperties property: The additional properties of the operation status result. + * + * @return the innerProperties value. + */ + private OperationStatusResultProperties innerProperties() { + return this.innerProperties; + } /** - * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was * started. * * @return the resourceId value. */ - String resourceId(); + public String resourceId() { + return this.resourceId; + } /** - * Gets the startTime property: The start time of the operation. + * Get the startTime property: The start time of the operation. * * @return the startTime value. */ - OffsetDateTime startTime(); + public OffsetDateTime startTime() { + return this.startTime; + } /** - * Gets the status property: Operation status. + * Get the status property: Operation status. * * @return the status value. */ - String status(); + public String status() { + return this.status; + } /** - * Gets the exitCode property: For actions that run commands or scripts, the exit code of the script execution. + * Get the exitCode property: For actions that run commands or scripts, the exit code of the script execution. * * @return the exitCode value. */ - String exitCode(); + public String exitCode() { + return this.innerProperties() == null ? null : this.innerProperties().exitCode(); + } /** - * Gets the outputHead property: For actions that run commands or scripts, the leading bytes of the output of the + * Get the outputHead property: For actions that run commands or scripts, the leading bytes of the output of the * script execution. * * @return the outputHead value. */ - String outputHead(); + public String outputHead() { + return this.innerProperties() == null ? null : this.innerProperties().outputHead(); + } /** - * Gets the resultRef property: For actions that run commands or scripts, a reference to the location of the result. + * Get the resultRef property: For actions that run commands or scripts, a reference to the location of the result. * * @return the resultRef value. */ - String resultRef(); + public String resultRef() { + return this.innerProperties() == null ? null : this.innerProperties().resultRef(); + } /** - * Gets the resultUrl property: For actions that run commands or scripts, the URL where the full output of the - * script output can be retrieved. + * Get the resultUrl property: For actions that run commands or scripts, the URL where the full output of the script + * output can be retrieved. * * @return the resultUrl value. */ - String resultUrl(); + public String resultUrl() { + return this.innerProperties() == null ? null : this.innerProperties().resultUrl(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } /** - * Gets the inner com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultInner object. + * Reads an instance of OperationStatusResult from the JsonReader. * - * @return the inner object. + * @param jsonReader The JsonReader being read. + * @return An instance of OperationStatusResult 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 OperationStatusResult. */ - OperationStatusResultInner innerModel(); + public static OperationStatusResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationStatusResult deserializedOperationStatusResult = new OperationStatusResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedOperationStatusResult.status = reader.getString(); + } else if ("endTime".equals(fieldName)) { + deserializedOperationStatusResult.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("error".equals(fieldName)) { + deserializedOperationStatusResult.error = ManagementError.fromJson(reader); + } else if ("id".equals(fieldName)) { + deserializedOperationStatusResult.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedOperationStatusResult.name = reader.getString(); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResult.fromJson(reader1)); + deserializedOperationStatusResult.operations = operations; + } else if ("percentComplete".equals(fieldName)) { + deserializedOperationStatusResult.percentComplete = reader.getNullable(JsonReader::getDouble); + } else if ("properties".equals(fieldName)) { + deserializedOperationStatusResult.innerProperties + = OperationStatusResultProperties.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedOperationStatusResult.resourceId = reader.getString(); + } else if ("startTime".equals(fieldName)) { + deserializedOperationStatusResult.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationStatusResult; + }); + } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Operations.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Operations.java index 74ee3123f93a..6580404a97b4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Operations.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Operations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,26 +12,24 @@ */ public interface Operations { /** - * List resource provider operations. - * - * Get a list of all available resource provider operations. It contains a URL link to get the next set of results. + * 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 all available resource provider operations as paginated response with {@link PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); /** - * List resource provider operations. - * - * Get a list of all available resource provider operations. It contains a URL link to get the next set of results. + * 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 all available resource provider operations as paginated response with {@link PagedIterable}. + * @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/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Origin.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Origin.java index 42e86dd4d3f7..54443d300e3d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Origin.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Origin.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,17 +13,17 @@ */ public final class Origin extends ExpandableStringEnum { /** - * Static value user for Origin. + * Indicates the operation is initiated by a user. */ public static final Origin USER = fromString("user"); /** - * Static value system for Origin. + * Indicates the operation is initiated by a system. */ public static final Origin SYSTEM = fromString("system"); /** - * Static value user,system for Origin. + * Indicates the operation is initiated by a user or system. */ public static final Origin USER_SYSTEM = fromString("user,system"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OsDisk.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OsDisk.java index fa2060db1e56..76565f3a3f04 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OsDisk.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OsDisk.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -99,14 +99,6 @@ public OsDisk withDiskSizeGB(long diskSizeGB) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OsDiskCreateOption.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OsDiskCreateOption.java index e63cc87d1eef..76de3edb89dc 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OsDiskCreateOption.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OsDiskCreateOption.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class OsDiskCreateOption extends ExpandableStringEnum { /** - * Static value Ephemeral for OsDiskCreateOption. + * The Os Disk will be created on ephemeral storage. */ public static final OsDiskCreateOption EPHEMERAL = fromString("Ephemeral"); /** - * Static value Persistent for OsDiskCreateOption. + * The Os Disk is on persistent storage. */ public static final OsDiskCreateOption PERSISTENT = fromString("Persistent"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OsDiskDeleteOption.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OsDiskDeleteOption.java index abb8fcca80f2..afce261a075e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OsDiskDeleteOption.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/OsDiskDeleteOption.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,7 +12,7 @@ */ public final class OsDiskDeleteOption extends ExpandableStringEnum { /** - * Static value Delete for OsDiskDeleteOption. + * The Os Disk will be deleted when the virtual machine is deleted. */ public static final OsDiskDeleteOption DELETE = fromString("Delete"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Rack.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Rack.java index 3e8da497b7e6..1f6e8a46345c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Rack.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Rack.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -50,14 +50,18 @@ public interface Rack { Map tags(); /** - * Gets the etag property: Resource ETag. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ String etag(); /** - * Gets the extendedLocation property: The extended location of the cluster associated with the resource. + * Gets the extendedLocation property: The extended location of the resource. This property is required when + * creating the resource. * * @return the extendedLocation value. */ @@ -78,6 +82,29 @@ public interface Rack { */ String availabilityZone(); + /** + * Gets the rackLocation property: The free-form description of the rack location. (e.g. "DTN Datacenter, Floor 3, + * Isle 9, Rack 2B"). + * + * @return the rackLocation value. + */ + String rackLocation(); + + /** + * Gets the rackSerialNumber property: The unique identifier for the rack within Network Cloud cluster. An alternate + * unique alphanumeric value other than a serial number may be provided if desired. + * + * @return the rackSerialNumber value. + */ + String rackSerialNumber(); + + /** + * Gets the rackSkuId property: The SKU for the rack. + * + * @return the rackSkuId value. + */ + String rackSkuId(); + /** * Gets the clusterId property: The resource ID of the cluster the rack is created for. This value is set when the * rack is created by the cluster. @@ -107,29 +134,6 @@ public interface Rack { */ RackProvisioningState provisioningState(); - /** - * Gets the rackLocation property: The free-form description of the rack location. (e.g. “DTN Datacenter, Floor 3, - * Isle 9, Rack 2B”). - * - * @return the rackLocation value. - */ - String rackLocation(); - - /** - * Gets the rackSerialNumber property: The unique identifier for the rack within Network Cloud cluster. An alternate - * unique alphanumeric value other than a serial number may be provided if desired. - * - * @return the rackSerialNumber value. - */ - String rackSerialNumber(); - - /** - * Gets the rackSkuId property: The SKU for the rack. - * - * @return the rackSkuId value. - */ - String rackSkuId(); - /** * Gets the region of the resource. * @@ -216,10 +220,11 @@ interface WithResourceGroup { */ interface WithExtendedLocation { /** - * Specifies the extendedLocation property: The extended location of the cluster associated with the - * resource.. + * Specifies the extendedLocation property: The extended location of the resource. This property is required + * when creating the resource.. * - * @param extendedLocation The extended location of the cluster associated with the resource. + * @param extendedLocation The extended location of the resource. This property is required when creating + * the resource. * @return the next definition stage. */ WithAvailabilityZone withExtendedLocation(ExtendedLocation extendedLocation); @@ -245,11 +250,11 @@ interface WithAvailabilityZone { */ interface WithRackLocation { /** - * Specifies the rackLocation property: The free-form description of the rack location. (e.g. “DTN - * Datacenter, Floor 3, Isle 9, Rack 2B”). + * Specifies the rackLocation property: The free-form description of the rack location. (e.g. "DTN + * Datacenter, Floor 3, Isle 9, Rack 2B"). * - * @param rackLocation The free-form description of the rack location. (e.g. “DTN Datacenter, Floor 3, Isle - * 9, Rack 2B”). + * @param rackLocation The free-form description of the rack location. (e.g. "DTN Datacenter, Floor 3, Isle + * 9, Rack 2B"). * @return the next definition stage. */ WithRackSerialNumber withRackLocation(String rackLocation); @@ -387,9 +392,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: The Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags.. * - * @param tags The Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); @@ -400,11 +405,11 @@ interface WithTags { */ interface WithRackLocation { /** - * Specifies the rackLocation property: The free-form description of the rack location. (e.g. “DTN - * Datacenter, Floor 3, Isle 9, Rack 2B”). + * Specifies the rackLocation property: The free-form description of the rack location. (e.g. "DTN + * Datacenter, Floor 3, Isle 9, Rack 2B"). * - * @param rackLocation The free-form description of the rack location. (e.g. “DTN Datacenter, Floor 3, Isle - * 9, Rack 2B”). + * @param rackLocation The free-form description of the rack location. (e.g. "DTN Datacenter, Floor 3, Isle + * 9, Rack 2B"). * @return the next definition stage. */ Update withRackLocation(String rackLocation); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackDefinition.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackDefinition.java index 2fbdeb929c82..721688a79343 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackDefinition.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackDefinition.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -208,35 +207,6 @@ public RackDefinition withStorageApplianceConfigurationData( return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (bareMetalMachineConfigurationData() != null) { - bareMetalMachineConfigurationData().forEach(e -> e.validate()); - } - if (networkRackId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property networkRackId in model RackDefinition")); - } - if (rackSerialNumber() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property rackSerialNumber in model RackDefinition")); - } - if (rackSkuId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property rackSkuId in model RackDefinition")); - } - if (storageApplianceConfigurationData() != null) { - storageApplianceConfigurationData().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RackDefinition.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackDetailedStatus.java index cb53809ba1cb..6d1777e9e209 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,17 +12,17 @@ */ public final class RackDetailedStatus extends ExpandableStringEnum { /** - * Static value Error for RackDetailedStatus. + * The Error status. */ public static final RackDetailedStatus ERROR = fromString("Error"); /** - * Static value Available for RackDetailedStatus. + * The Available status. */ public static final RackDetailedStatus AVAILABLE = fromString("Available"); /** - * Static value Provisioning for RackDetailedStatus. + * The Provisioning status. */ public static final RackDetailedStatus PROVISIONING = fromString("Provisioning"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackPatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackPatchParameters.java index 4c76488bd4b2..dd135bc0b744 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackPatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackPatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -24,7 +24,7 @@ public final class RackPatchParameters implements JsonSerializable tags; @@ -44,7 +44,7 @@ private RacksPatchProperties innerProperties() { } /** - * Get the tags property: The Azure resource tags that will replace the existing ones. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -53,7 +53,7 @@ public Map tags() { } /** - * Set the tags property: The Azure resource tags that will replace the existing ones. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the RackPatchParameters object itself. @@ -64,8 +64,8 @@ public RackPatchParameters withTags(Map tags) { } /** - * Get the rackLocation property: The free-form description of the rack location. (e.g. “DTN Datacenter, Floor 3, - * Isle 9, Rack 2B”). + * Get the rackLocation property: The free-form description of the rack location. (e.g. "DTN Datacenter, Floor 3, + * Isle 9, Rack 2B"). * * @return the rackLocation value. */ @@ -74,8 +74,8 @@ public String rackLocation() { } /** - * Set the rackLocation property: The free-form description of the rack location. (e.g. “DTN Datacenter, Floor 3, - * Isle 9, Rack 2B”). + * Set the rackLocation property: The free-form description of the rack location. (e.g. "DTN Datacenter, Floor 3, + * Isle 9, Rack 2B"). * * @param rackLocation the rackLocation value to set. * @return the RackPatchParameters object itself. @@ -111,17 +111,6 @@ public RackPatchParameters withRackSerialNumber(String rackSerialNumber) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackProvisioningState.java index 79eca3e7266b..5444ed01f612 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackProvisioningState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,27 +12,27 @@ */ public final class RackProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for RackProvisioningState. + * The Succeeded status. */ public static final RackProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for RackProvisioningState. + * The Failed status. */ public static final RackProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for RackProvisioningState. + * The Canceled status. */ public static final RackProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Provisioning for RackProvisioningState. + * The Provisioning status. */ public static final RackProvisioningState PROVISIONING = fromString("Provisioning"); /** - * Static value Accepted for RackProvisioningState. + * The Accepted status. */ public static final RackProvisioningState ACCEPTED = fromString("Accepted"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSku.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSku.java index 2416b2766e06..52c9902dc0b3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSku.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -56,6 +56,13 @@ public interface RackSku { */ List controllerMachines(); + /** + * Gets the deploymentType property: The deployment type supported by the rack SKU. + * + * @return the deploymentType value. + */ + DeploymentType deploymentType(); + /** * Gets the description property: The free-form text describing the rack. * diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSkuProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSkuProvisioningState.java index 4ccffee8fda3..e54f51e2da86 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSkuProvisioningState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSkuProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,17 +12,17 @@ */ public final class RackSkuProvisioningState extends ExpandableStringEnum { /** - * Static value Canceled for RackSkuProvisioningState. + * The Canceled status. */ public static final RackSkuProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for RackSkuProvisioningState. + * The Failed status. */ public static final RackSkuProvisioningState FAILED = fromString("Failed"); /** - * Static value Succeeded for RackSkuProvisioningState. + * The Succeeded status. */ public static final RackSkuProvisioningState SUCCEEDED = fromString("Succeeded"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSkuType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSkuType.java index 8704a88d2135..1317e4ec7103 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSkuType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSkuType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,17 +12,17 @@ */ public final class RackSkuType extends ExpandableStringEnum { /** - * Static value Aggregator for RackSkuType. + * Aggregator Rack. */ public static final RackSkuType AGGREGATOR = fromString("Aggregator"); /** - * Static value Compute for RackSkuType. + * Compute Rack. */ public static final RackSkuType COMPUTE = fromString("Compute"); /** - * Static value Single for RackSkuType. + * Combination of Aggregator Rack and Compute Rack for a single rack cluster. */ public static final RackSkuType SINGLE = fromString("Single"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSkus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSkus.java index 4b71b3d587f6..7192eb5b3082 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSkus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RackSkus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,53 +13,45 @@ */ public interface RackSkus { /** - * List rack SKUs in the subscription. - * - * Get a list of rack SKUs in the provided subscription. + * Get the properties of the provided rack SKU. * + * @param rackSkuName The name of the rack SKU. + * @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 rack SKUs in the provided subscription as paginated response with {@link PagedIterable}. + * @return the properties of the provided rack SKU along with {@link Response}. */ - PagedIterable list(); + Response getWithResponse(String rackSkuName, Context context); /** - * List rack SKUs in the subscription. - * - * Get a list of rack SKUs in the provided subscription. + * Get the properties of the provided rack SKU. * - * @param context The context to associate with this operation. + * @param rackSkuName The name of the rack SKU. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 rack SKUs in the provided subscription as paginated response with {@link PagedIterable}. + * @return the properties of the provided rack SKU. */ - PagedIterable list(Context context); + RackSku get(String rackSkuName); /** - * Retrieve the rack SKU. - * - * Get the properties of the provided rack SKU. + * Get a list of rack SKUs in the provided subscription. * - * @param rackSkuName The name of the rack SKU. - * @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 properties of the provided rack SKU along with {@link Response}. + * @return a list of rack SKUs in the provided subscription as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String rackSkuName, Context context); + PagedIterable list(); /** - * Retrieve the rack SKU. - * - * Get the properties of the provided rack SKU. + * Get a list of rack SKUs in the provided subscription. * - * @param rackSkuName The name of the rack SKU. + * @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 properties of the provided rack SKU. + * @return a list of rack SKUs in the provided subscription as paginated response with {@link PagedIterable}. */ - RackSku get(String rackSkuName); + PagedIterable list(Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Racks.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Racks.java index 1242e0ccf7ad..ea0a2b98b5c3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Racks.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Racks.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,130 +13,109 @@ */ public interface Racks { /** - * List racks in the subscription. - * - * Get a list of racks in the provided subscription. + * Get properties of the provided rack. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rackName The name of the rack. + * @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 racks in the provided subscription as paginated response with {@link PagedIterable}. + * @return properties of the provided rack along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String rackName, Context context); /** - * List racks in the subscription. - * - * Get a list of racks in the provided subscription. + * Get properties of the provided rack. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rackName The name of the rack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 racks in the provided subscription as paginated response with {@link PagedIterable}. + * @return properties of the provided rack. */ - PagedIterable list(Integer top, String skipToken, Context context); + Rack getByResourceGroup(String resourceGroupName, String rackName); /** - * List racks in the resource group. - * - * Get a list of racks in the provided resource group. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rackName The name of the rack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 racks in the provided resource group as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void deleteByResourceGroup(String resourceGroupName, String rackName); /** - * List racks in the resource group. - * - * Get a list of racks in the provided resource group. + * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is + * managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param rackName The name of the rack. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 racks in the provided resource group as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, Context context); + void delete(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch, Context context); /** - * Retrieve the rack. - * - * Get properties of the provided rack. + * Get a list of racks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @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 properties of the provided rack along with {@link Response}. + * @return a list of racks in the provided resource group as paginated response with {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String rackName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Retrieve the rack. - * - * Get properties of the provided rack. + * Get a list of racks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 properties of the provided rack. + * @return a list of racks in the provided resource group as paginated response with {@link PagedIterable}. */ - Rack getByResourceGroup(String resourceGroupName, String rackName); + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, Context context); /** - * Delete the rack. - * - * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is - * managed by the system. + * Get a list of racks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a list of racks in the provided subscription as paginated response with {@link PagedIterable}. */ - OperationStatusResult deleteByResourceGroup(String resourceGroupName, String rackName); + PagedIterable list(); /** - * Delete the rack. - * - * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is - * managed by the system. + * Get a list of racks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of racks in the provided subscription as paginated response with {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String rackName, String ifMatch, String ifNoneMatch, - Context context); + PagedIterable list(Integer top, String skipToken, Context context); /** - * Retrieve the rack. - * * Get properties of the provided rack. * * @param id the resource ID. @@ -148,8 +127,6 @@ OperationStatusResult delete(String resourceGroupName, String rackName, String i Rack getById(String id); /** - * Retrieve the rack. - * * Get properties of the provided rack. * * @param id the resource ID. @@ -162,8 +139,6 @@ OperationStatusResult delete(String resourceGroupName, String rackName, String i Response getByIdWithResponse(String id, Context context); /** - * Delete the rack. - * * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is * managed by the system. * @@ -171,13 +146,10 @@ OperationStatusResult delete(String resourceGroupName, String rackName, String i * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteById(String id); + void deleteById(String id); /** - * Delete the rack. - * * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is * managed by the system. * @@ -190,9 +162,8 @@ OperationStatusResult delete(String resourceGroupName, String rackName, String i * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); + void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); /** * Begins definition for a new Rack resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RelayPrivateEndpointConnectionState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RelayPrivateEndpointConnectionState.java new file mode 100644 index 000000000000..1ba786b6ac6d --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RelayPrivateEndpointConnectionState.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.networkcloud.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The state to set for the private endpoint connection. + */ +public final class RelayPrivateEndpointConnectionState + extends ExpandableStringEnum { + /** + * The private endpoint connection is approved. + */ + public static final RelayPrivateEndpointConnectionState APPROVED = fromString("Approved"); + + /** + * The private endpoint connection is rejected. + */ + public static final RelayPrivateEndpointConnectionState REJECTED = fromString("Rejected"); + + /** + * Creates a new instance of RelayPrivateEndpointConnectionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RelayPrivateEndpointConnectionState() { + } + + /** + * Creates or finds a RelayPrivateEndpointConnectionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding RelayPrivateEndpointConnectionState. + */ + public static RelayPrivateEndpointConnectionState fromString(String name) { + return fromString(name, RelayPrivateEndpointConnectionState.class); + } + + /** + * Gets known RelayPrivateEndpointConnectionState values. + * + * @return known RelayPrivateEndpointConnectionState values. + */ + public static Collection values() { + return values(RelayPrivateEndpointConnectionState.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RelayType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RelayType.java index 1e54056a6b9e..0ee0688a436b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RelayType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RelayType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,12 +13,12 @@ */ public final class RelayType extends ExpandableStringEnum { /** - * Static value Platform for RelayType. + * Utilize the platform-dedicated relay for Arc services. */ public static final RelayType PLATFORM = fromString("Platform"); /** - * Static value Public for RelayType. + * Utilize the standard public relay for Arc services. */ public static final RelayType PUBLIC = fromString("Public"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RemoteVendorManagementFeature.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RemoteVendorManagementFeature.java index 7b1adf817027..e8950f45b96b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RemoteVendorManagementFeature.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RemoteVendorManagementFeature.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class RemoteVendorManagementFeature extends ExpandableStringEnum { /** - * Static value Supported for RemoteVendorManagementFeature. + * Remote vendor management is supported. */ public static final RemoteVendorManagementFeature SUPPORTED = fromString("Supported"); /** - * Static value Unsupported for RemoteVendorManagementFeature. + * Remote vendor management is unsupported. */ public static final RemoteVendorManagementFeature UNSUPPORTED = fromString("Unsupported"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RemoteVendorManagementStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RemoteVendorManagementStatus.java index b51aeee40853..c2b623e156aa 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RemoteVendorManagementStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RemoteVendorManagementStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,17 +13,17 @@ */ public final class RemoteVendorManagementStatus extends ExpandableStringEnum { /** - * Static value Enabled for RemoteVendorManagementStatus. + * Remote vendor management is enabled. */ public static final RemoteVendorManagementStatus ENABLED = fromString("Enabled"); /** - * Static value Disabled for RemoteVendorManagementStatus. + * Remote vendor management is disabled. */ public static final RemoteVendorManagementStatus DISABLED = fromString("Disabled"); /** - * Static value Unsupported for RemoteVendorManagementStatus. + * Remote vendor management is unsupported. */ public static final RemoteVendorManagementStatus UNSUPPORTED = fromString("Unsupported"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionAgentHealthStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionAgentHealthStatus.java new file mode 100644 index 000000000000..a1e32d51cf91 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionAgentHealthStatus.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.networkcloud.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The runtime protection agent health status. + */ +public final class RuntimeProtectionAgentHealthStatus extends ExpandableStringEnum { + /** + * The runtime protection agent is healthy. + */ + public static final RuntimeProtectionAgentHealthStatus HEALTHY = fromString("Healthy"); + + /** + * The runtime protection agent has health issues. + */ + public static final RuntimeProtectionAgentHealthStatus UNHEALTHY = fromString("Unhealthy"); + + /** + * Creates a new instance of RuntimeProtectionAgentHealthStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RuntimeProtectionAgentHealthStatus() { + } + + /** + * Creates or finds a RuntimeProtectionAgentHealthStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding RuntimeProtectionAgentHealthStatus. + */ + public static RuntimeProtectionAgentHealthStatus fromString(String name) { + return fromString(name, RuntimeProtectionAgentHealthStatus.class); + } + + /** + * Gets known RuntimeProtectionAgentHealthStatus values. + * + * @return known RuntimeProtectionAgentHealthStatus values. + */ + public static Collection values() { + return values(RuntimeProtectionAgentHealthStatus.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionAgentLicenseStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionAgentLicenseStatus.java new file mode 100644 index 000000000000..edc5e0ce5026 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionAgentLicenseStatus.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.networkcloud.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The runtime protection agent license status. + */ +public final class RuntimeProtectionAgentLicenseStatus + extends ExpandableStringEnum { + /** + * The runtime protection agent license is valid. + */ + public static final RuntimeProtectionAgentLicenseStatus LICENSED = fromString("Licensed"); + + /** + * The runtime protection agent license is not valid. + */ + public static final RuntimeProtectionAgentLicenseStatus UNLICENSED = fromString("Unlicensed"); + + /** + * Creates a new instance of RuntimeProtectionAgentLicenseStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RuntimeProtectionAgentLicenseStatus() { + } + + /** + * Creates or finds a RuntimeProtectionAgentLicenseStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding RuntimeProtectionAgentLicenseStatus. + */ + public static RuntimeProtectionAgentLicenseStatus fromString(String name) { + return fromString(name, RuntimeProtectionAgentLicenseStatus.class); + } + + /** + * Gets known RuntimeProtectionAgentLicenseStatus values. + * + * @return known RuntimeProtectionAgentLicenseStatus values. + */ + public static Collection values() { + return values(RuntimeProtectionAgentLicenseStatus.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionConfiguration.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionConfiguration.java index 3eb20762df59..6bb64ca098a1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionConfiguration.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -16,6 +16,11 @@ */ @Fluent public final class RuntimeProtectionConfiguration implements JsonSerializable { + /* + * The definition update mode for runtime protection. + */ + private RuntimeProtectionDefinitionUpdateMode definitionUpdateMode; + /* * The mode of operation for runtime protection. */ @@ -27,6 +32,27 @@ public final class RuntimeProtectionConfiguration implements JsonSerializable { + /** + * Update definitions automatically through the connected runtime protection agent. + */ + public static final RuntimeProtectionDefinitionUpdateMode AUTOMATIC = fromString("Automatic"); + + /** + * Do not update definitions. + */ + public static final RuntimeProtectionDefinitionUpdateMode NONE = fromString("None"); + + /** + * Creates a new instance of RuntimeProtectionDefinitionUpdateMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RuntimeProtectionDefinitionUpdateMode() { + } + + /** + * Creates or finds a RuntimeProtectionDefinitionUpdateMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding RuntimeProtectionDefinitionUpdateMode. + */ + public static RuntimeProtectionDefinitionUpdateMode fromString(String name) { + return fromString(name, RuntimeProtectionDefinitionUpdateMode.class); + } + + /** + * Gets known RuntimeProtectionDefinitionUpdateMode values. + * + * @return known RuntimeProtectionDefinitionUpdateMode values. + */ + public static Collection values() { + return values(RuntimeProtectionDefinitionUpdateMode.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionEnforcementLevel.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionEnforcementLevel.java index de9255168bc4..5336418c4585 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionEnforcementLevel.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionEnforcementLevel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,27 +12,27 @@ */ public final class RuntimeProtectionEnforcementLevel extends ExpandableStringEnum { /** - * Static value Audit for RuntimeProtectionEnforcementLevel. + * Real-time scans detect but do not remediate detected issues. */ public static final RuntimeProtectionEnforcementLevel AUDIT = fromString("Audit"); /** - * Static value Disabled for RuntimeProtectionEnforcementLevel. + * Real-time scans are disabled and can not be triggered. */ public static final RuntimeProtectionEnforcementLevel DISABLED = fromString("Disabled"); /** - * Static value OnDemand for RuntimeProtectionEnforcementLevel. + * Real-time scans are disabled but can be triggered to remediate detected issues. */ public static final RuntimeProtectionEnforcementLevel ON_DEMAND = fromString("OnDemand"); /** - * Static value Passive for RuntimeProtectionEnforcementLevel. + * Real-time scans are disabled but can be triggered to detect issues without remediation. */ public static final RuntimeProtectionEnforcementLevel PASSIVE = fromString("Passive"); /** - * Static value RealTime for RuntimeProtectionEnforcementLevel. + * Real-time scans detect and remediate detected issues. */ public static final RuntimeProtectionEnforcementLevel REAL_TIME = fromString("RealTime"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionStatus.java index 4f1605855849..c3be10759d2b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,33 @@ import com.azure.json.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.List; /** * RuntimeProtectionStatus represents the runtime protection status of the bare metal machine. */ @Immutable public final class RuntimeProtectionStatus implements JsonSerializable { + /* + * The runtime protection agent health status. + */ + private RuntimeProtectionAgentHealthStatus agentHealthStatus; + + /* + * The runtime protection agent health status issues, if present. + */ + private List agentHealthStatusIssues; + + /* + * The runtime protection agent license status. + */ + private RuntimeProtectionAgentLicenseStatus agentLicenseStatus; + + /* + * The definition update mode for runtime protection. + */ + private RuntimeProtectionDefinitionUpdateMode definitionUpdateMode; + /* * The timestamp when the malware definitions were last updated. */ @@ -28,6 +49,11 @@ public final class RuntimeProtectionStatus implements JsonSerializable agentHealthStatusIssues() { + return this.agentHealthStatusIssues; + } + + /** + * Get the agentLicenseStatus property: The runtime protection agent license status. + * + * @return the agentLicenseStatus value. + */ + public RuntimeProtectionAgentLicenseStatus agentLicenseStatus() { + return this.agentLicenseStatus; + } + + /** + * Get the definitionUpdateMode property: The definition update mode for runtime protection. + * + * @return the definitionUpdateMode value. + */ + public RuntimeProtectionDefinitionUpdateMode definitionUpdateMode() { + return this.definitionUpdateMode; } /** @@ -67,6 +129,16 @@ public String definitionsVersion() { return this.definitionsVersion; } + /** + * Get the enforcementLevel property: The enforcement level set for the runtime protection on the bare metal + * machine. + * + * @return the enforcementLevel value. + */ + public RuntimeProtectionEnforcementLevel enforcementLevel() { + return this.enforcementLevel; + } + /** * Get the scanCompletedTime property: The timestamp of the most recently completed scan, or empty if there has * never been a scan. @@ -97,14 +169,6 @@ public OffsetDateTime scanStartedTime() { return this.scanStartedTime; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -129,11 +193,26 @@ public static RuntimeProtectionStatus fromJson(JsonReader jsonReader) throws IOE String fieldName = reader.getFieldName(); reader.nextToken(); - if ("definitionsLastUpdated".equals(fieldName)) { + if ("agentHealthStatus".equals(fieldName)) { + deserializedRuntimeProtectionStatus.agentHealthStatus + = RuntimeProtectionAgentHealthStatus.fromString(reader.getString()); + } else if ("agentHealthStatusIssues".equals(fieldName)) { + List agentHealthStatusIssues = reader.readArray(reader1 -> reader1.getString()); + deserializedRuntimeProtectionStatus.agentHealthStatusIssues = agentHealthStatusIssues; + } else if ("agentLicenseStatus".equals(fieldName)) { + deserializedRuntimeProtectionStatus.agentLicenseStatus + = RuntimeProtectionAgentLicenseStatus.fromString(reader.getString()); + } else if ("definitionUpdateMode".equals(fieldName)) { + deserializedRuntimeProtectionStatus.definitionUpdateMode + = RuntimeProtectionDefinitionUpdateMode.fromString(reader.getString()); + } else if ("definitionsLastUpdated".equals(fieldName)) { deserializedRuntimeProtectionStatus.definitionsLastUpdated = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("definitionsVersion".equals(fieldName)) { deserializedRuntimeProtectionStatus.definitionsVersion = reader.getString(); + } else if ("enforcementLevel".equals(fieldName)) { + deserializedRuntimeProtectionStatus.enforcementLevel + = RuntimeProtectionEnforcementLevel.fromString(reader.getString()); } else if ("scanCompletedTime".equals(fieldName)) { deserializedRuntimeProtectionStatus.scanCompletedTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/SecretArchiveReference.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/SecretArchiveReference.java index 56a5b928a8bc..83834b15e3f6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/SecretArchiveReference.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/SecretArchiveReference.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -39,7 +39,7 @@ public final class SecretArchiveReference implements JsonSerializable { + /** + * Inbound traffic toward the on-premsises cluster. + */ + public static final SecurityRuleDirection INBOUND = fromString("Inbound"); + + /** + * Outbound traffic from the on-premises cluster. + */ + public static final SecurityRuleDirection OUTBOUND = fromString("Outbound"); + + /** + * Creates a new instance of SecurityRuleDirection value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SecurityRuleDirection() { + } + + /** + * Creates or finds a SecurityRuleDirection from its string representation. + * + * @param name a name to look for. + * @return the corresponding SecurityRuleDirection. + */ + public static SecurityRuleDirection fromString(String name) { + return fromString(name, SecurityRuleDirection.class); + } + + /** + * Gets known SecurityRuleDirection values. + * + * @return known SecurityRuleDirection values. + */ + public static Collection values() { + return values(SecurityRuleDirection.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ServiceLoadBalancerBgpPeer.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ServiceLoadBalancerBgpPeer.java index 002b0e51d290..a4f08f126f1d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ServiceLoadBalancerBgpPeer.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ServiceLoadBalancerBgpPeer.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -283,26 +282,6 @@ public ServiceLoadBalancerBgpPeer withPeerPort(Long peerPort) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property name in model ServiceLoadBalancerBgpPeer")); - } - if (peerAddress() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property peerAddress in model ServiceLoadBalancerBgpPeer")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ServiceLoadBalancerBgpPeer.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ServicePrincipalInformation.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ServicePrincipalInformation.java index 0dcd6fc87a47..9f8fb24fe0e3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ServicePrincipalInformation.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ServicePrincipalInformation.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -126,36 +125,6 @@ public ServicePrincipalInformation withTenantId(String tenantId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (applicationId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property applicationId in model ServicePrincipalInformation")); - } - if (password() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property password in model ServicePrincipalInformation")); - } - if (principalId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property principalId in model ServicePrincipalInformation")); - } - if (tenantId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property tenantId in model ServicePrincipalInformation")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ServicePrincipalInformation.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/SkipShutdown.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/SkipShutdown.java index 961df4fc1d0b..cd4c0ea09d52 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/SkipShutdown.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/SkipShutdown.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class SkipShutdown extends ExpandableStringEnum { /** - * Static value True for SkipShutdown. + * Skip the graceful OS shutdown and power off the virtual machine immediately. */ public static final SkipShutdown TRUE = fromString("True"); /** - * Static value False for SkipShutdown. + * Do not skip the graceful OS shutdown. */ public static final SkipShutdown FALSE = fromString("False"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/SshPublicKey.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/SshPublicKey.java index 76471e05b5fd..20657148e2e2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/SshPublicKey.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/SshPublicKey.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -48,20 +47,6 @@ public SshPublicKey withKeyData(String keyData) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property keyData in model SshPublicKey")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SshPublicKey.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StepState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StepState.java index 93895b7d80a2..07d8a11808be 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StepState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StepState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -45,7 +45,7 @@ public final class StepState implements JsonSerializable { /** * Creates an instance of StepState class. */ - public StepState() { + private StepState() { } /** @@ -96,14 +96,6 @@ public String stepName() { return this.stepName; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StepStateStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StepStateStatus.java index 7c75152701f8..b52398eb1336 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StepStateStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StepStateStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,22 +12,22 @@ */ public final class StepStateStatus extends ExpandableStringEnum { /** - * Static value Completed for StepStateStatus. + * The completed status. */ public static final StepStateStatus COMPLETED = fromString("Completed"); /** - * Static value InProgress for StepStateStatus. + * The in-progress status. */ public static final StepStateStatus IN_PROGRESS = fromString("InProgress"); /** - * Static value Failed for StepStateStatus. + * The failed status. */ public static final StepStateStatus FAILED = fromString("Failed"); /** - * Static value NotStarted for StepStateStatus. + * The not started status. */ public static final StepStateStatus NOT_STARTED = fromString("NotStarted"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageAppliance.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageAppliance.java index bac03db1e866..608338e85fd4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageAppliance.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageAppliance.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -51,14 +51,18 @@ public interface StorageAppliance { Map tags(); /** - * Gets the etag property: Resource ETag. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ String etag(); /** - * Gets the extendedLocation property: The extended location of the cluster associated with the resource. + * Gets the extendedLocation property: The extended location of the resource. This property is required when + * creating the resource. * * @return the extendedLocation value. */ @@ -79,6 +83,34 @@ public interface StorageAppliance { */ AdministrativeCredentials administratorCredentials(); + /** + * Gets the rackId property: The resource ID of the rack where this storage appliance resides. + * + * @return the rackId value. + */ + String rackId(); + + /** + * Gets the rackSlot property: The slot the storage appliance is in the rack based on the BOM configuration. + * + * @return the rackSlot value. + */ + long rackSlot(); + + /** + * Gets the serialNumber property: The serial number for the storage appliance. + * + * @return the serialNumber value. + */ + String serialNumber(); + + /** + * Gets the storageApplianceSkuId property: The SKU for the storage appliance. + * + * @return the storageApplianceSkuId value. + */ + String storageApplianceSkuId(); + /** * Gets the caCertificate property: The CA certificate information issued by the platform for connecting to TLS * interfaces for the storage appliance. Callers add this certificate to their trusted CA store to allow secure @@ -123,6 +155,13 @@ public interface StorageAppliance { */ String detailedStatusMessage(); + /** + * Gets the expansionShelves property: The list of expansion shelves connected to the storage appliance. + * + * @return the expansionShelves value. + */ + List expansionShelves(); + /** * Gets the managementIpv4Address property: The endpoint for the management interface of the storage appliance. * @@ -145,25 +184,11 @@ public interface StorageAppliance { String model(); /** - * Gets the provisioningState property: The provisioning state of the storage appliance. - * - * @return the provisioningState value. - */ - StorageApplianceProvisioningState provisioningState(); - - /** - * Gets the rackId property: The resource ID of the rack where this storage appliance resides. + * Gets the monitoringConfigurationStatus property: The monitoring configuration status of the storage appliance. * - * @return the rackId value. + * @return the monitoringConfigurationStatus value. */ - String rackId(); - - /** - * Gets the rackSlot property: The slot the storage appliance is in the rack based on the BOM configuration. - * - * @return the rackSlot value. - */ - long rackSlot(); + StorageApplianceMonitoringConfigurationStatus monitoringConfigurationStatus(); /** * Gets the remoteVendorManagementFeature property: The indicator of whether the storage appliance supports remote @@ -189,25 +214,18 @@ public interface StorageAppliance { List secretRotationStatus(); /** - * Gets the serialNumber property: The serial number for the storage appliance. - * - * @return the serialNumber value. - */ - String serialNumber(); - - /** - * Gets the storageApplianceSkuId property: The SKU for the storage appliance. + * Gets the version property: The version of the storage appliance. * - * @return the storageApplianceSkuId value. + * @return the version value. */ - String storageApplianceSkuId(); + String version(); /** - * Gets the version property: The version of the storage appliance. + * Gets the provisioningState property: The provisioning state of the storage appliance. * - * @return the version value. + * @return the provisioningState value. */ - String version(); + StorageApplianceProvisioningState provisioningState(); /** * Gets the region of the resource. @@ -295,10 +313,11 @@ interface WithResourceGroup { */ interface WithExtendedLocation { /** - * Specifies the extendedLocation property: The extended location of the cluster associated with the - * resource.. + * Specifies the extendedLocation property: The extended location of the resource. This property is required + * when creating the resource.. * - * @param extendedLocation The extended location of the cluster associated with the resource. + * @param extendedLocation The extended location of the resource. This property is required when creating + * the resource. * @return the next definition stage. */ WithAdministratorCredentials withExtendedLocation(ExtendedLocation extendedLocation); @@ -476,9 +495,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: The Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags.. * - * @param tags The Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); @@ -545,43 +564,35 @@ interface WithIfNoneMatch { StorageAppliance refresh(Context context); /** - * Turn off remote vendor management for a storage appliance, if supported. - * * Disable remote vendor management of the provided storage appliance. * * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult disableRemoteVendorManagement(); /** - * Turn off remote vendor management for a storage appliance, if supported. - * * Disable remote vendor management of the provided storage appliance. * * @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. + * @return the response. */ OperationStatusResult disableRemoteVendorManagement(Context context); /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult enableRemoteVendorManagement(); /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param storageApplianceEnableRemoteVendorManagementParameters The request body. @@ -589,29 +600,25 @@ interface WithIfNoneMatch { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult enableRemoteVendorManagement( StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters, Context context); /** - * Run read-only commands against a storage appliance. - * * Run one or more read-only commands on the provided storage appliance. * * @param storageApplianceRunReadCommandsParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runReadCommands(StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters); /** - * Run read-only commands against a storage appliance. - * * Run one or more read-only commands on the provided storage appliance. * * @param storageApplianceRunReadCommandsParameters The request body. @@ -619,7 +626,7 @@ OperationStatusResult enableRemoteVendorManagement( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runReadCommands( StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters, Context context); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceCommandSpecification.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceCommandSpecification.java index 32c36fd3717a..3b08de0f0378 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceCommandSpecification.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceCommandSpecification.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -75,21 +74,6 @@ public StorageApplianceCommandSpecification withCommand(String command) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (command() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property command in model StorageApplianceCommandSpecification")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(StorageApplianceCommandSpecification.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceConfigurationData.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceConfigurationData.java index 17c81727a203..fbc934799e1e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceConfigurationData.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceConfigurationData.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -131,28 +130,6 @@ public StorageApplianceConfigurationData withStorageApplianceName(String storage return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (adminCredentials() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property adminCredentials in model StorageApplianceConfigurationData")); - } else { - adminCredentials().validate(); - } - if (serialNumber() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property serialNumber in model StorageApplianceConfigurationData")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(StorageApplianceConfigurationData.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceDetailedStatus.java index d5652ae77f81..41613b383fed 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,22 +12,22 @@ */ public final class StorageApplianceDetailedStatus extends ExpandableStringEnum { /** - * Static value Available for StorageApplianceDetailedStatus. + * The Available status. */ public static final StorageApplianceDetailedStatus AVAILABLE = fromString("Available"); /** - * Static value Degraded for StorageApplianceDetailedStatus. + * The Degraded status. */ public static final StorageApplianceDetailedStatus DEGRADED = fromString("Degraded"); /** - * Static value Error for StorageApplianceDetailedStatus. + * The Error status. */ public static final StorageApplianceDetailedStatus ERROR = fromString("Error"); /** - * Static value Provisioning for StorageApplianceDetailedStatus. + * The Provisioning status. */ public static final StorageApplianceDetailedStatus PROVISIONING = fromString("Provisioning"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceEnableRemoteVendorManagementParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceEnableRemoteVendorManagementParameters.java index 8ed0ea3352e6..f96da73ac8f4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceEnableRemoteVendorManagementParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceEnableRemoteVendorManagementParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -56,14 +56,6 @@ public StorageApplianceEnableRemoteVendorManagementParameters withSupportEndpoin return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceExpansionShelf.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceExpansionShelf.java new file mode 100644 index 000000000000..a7cce6c8a08e --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceExpansionShelf.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.networkcloud.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; + +/** + * StorageApplianceExpansionShelf represents an expansion shelf connected to a storage appliance. + */ +@Immutable +public final class StorageApplianceExpansionShelf implements JsonSerializable { + /* + * The model of the expansion shelf. + */ + private String model; + + /* + * The version of the expansion shelf. + */ + private String version; + + /** + * Creates an instance of StorageApplianceExpansionShelf class. + */ + private StorageApplianceExpansionShelf() { + } + + /** + * Get the model property: The model of the expansion shelf. + * + * @return the model value. + */ + public String model() { + return this.model; + } + + /** + * Get the version property: The version of the expansion shelf. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("model", this.model); + jsonWriter.writeStringField("version", this.version); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StorageApplianceExpansionShelf from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StorageApplianceExpansionShelf 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 StorageApplianceExpansionShelf. + */ + public static StorageApplianceExpansionShelf fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StorageApplianceExpansionShelf deserializedStorageApplianceExpansionShelf + = new StorageApplianceExpansionShelf(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("model".equals(fieldName)) { + deserializedStorageApplianceExpansionShelf.model = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedStorageApplianceExpansionShelf.version = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedStorageApplianceExpansionShelf; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceMetricsConfigurationStatusLogLevel.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceMetricsConfigurationStatusLogLevel.java new file mode 100644 index 000000000000..e5dd7bd96bac --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceMetricsConfigurationStatusLogLevel.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.networkcloud.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The log level for the monitoring configuration status of the storage appliance. + */ +public final class StorageApplianceMetricsConfigurationStatusLogLevel + extends ExpandableStringEnum { + /** + * Logs are emitted at the default log level. + */ + public static final StorageApplianceMetricsConfigurationStatusLogLevel DEFAULT = fromString("Default"); + + /** + * Logs are emitted at the Nexus log level. + */ + public static final StorageApplianceMetricsConfigurationStatusLogLevel NEXUS = fromString("Nexus"); + + /** + * Creates a new instance of StorageApplianceMetricsConfigurationStatusLogLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StorageApplianceMetricsConfigurationStatusLogLevel() { + } + + /** + * Creates or finds a StorageApplianceMetricsConfigurationStatusLogLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding StorageApplianceMetricsConfigurationStatusLogLevel. + */ + public static StorageApplianceMetricsConfigurationStatusLogLevel fromString(String name) { + return fromString(name, StorageApplianceMetricsConfigurationStatusLogLevel.class); + } + + /** + * Gets known StorageApplianceMetricsConfigurationStatusLogLevel values. + * + * @return known StorageApplianceMetricsConfigurationStatusLogLevel values. + */ + public static Collection values() { + return values(StorageApplianceMetricsConfigurationStatusLogLevel.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceMetricsConfigurationStatusMetricsLevel.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceMetricsConfigurationStatusMetricsLevel.java new file mode 100644 index 000000000000..0976eb3da745 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceMetricsConfigurationStatusMetricsLevel.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.networkcloud.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The metrics level for the monitoring configuration status of the storage appliance. + */ +public final class StorageApplianceMetricsConfigurationStatusMetricsLevel + extends ExpandableStringEnum { + /** + * Metrics are emitted at the default metrics level. + */ + public static final StorageApplianceMetricsConfigurationStatusMetricsLevel DEFAULT = fromString("Default"); + + /** + * Metrics are emitted at the Nexus metrics level. + */ + public static final StorageApplianceMetricsConfigurationStatusMetricsLevel NEXUS = fromString("Nexus"); + + /** + * Creates a new instance of StorageApplianceMetricsConfigurationStatusMetricsLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StorageApplianceMetricsConfigurationStatusMetricsLevel() { + } + + /** + * Creates or finds a StorageApplianceMetricsConfigurationStatusMetricsLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding StorageApplianceMetricsConfigurationStatusMetricsLevel. + */ + public static StorageApplianceMetricsConfigurationStatusMetricsLevel fromString(String name) { + return fromString(name, StorageApplianceMetricsConfigurationStatusMetricsLevel.class); + } + + /** + * Gets known StorageApplianceMetricsConfigurationStatusMetricsLevel values. + * + * @return known StorageApplianceMetricsConfigurationStatusMetricsLevel values. + */ + public static Collection values() { + return values(StorageApplianceMetricsConfigurationStatusMetricsLevel.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceMonitoringConfigurationStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceMonitoringConfigurationStatus.java new file mode 100644 index 000000000000..9875090632f6 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceMonitoringConfigurationStatus.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.networkcloud.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 monitoring configuration status of the storage appliance. + */ +@Immutable +public final class StorageApplianceMonitoringConfigurationStatus + implements JsonSerializable { + /* + * The log level for the monitoring configuration status of the storage appliance. + */ + private StorageApplianceMetricsConfigurationStatusLogLevel logLevel; + + /* + * The metrics level for the monitoring configuration status of the storage appliance. + */ + private StorageApplianceMetricsConfigurationStatusMetricsLevel metricsLevel; + + /** + * Creates an instance of StorageApplianceMonitoringConfigurationStatus class. + */ + private StorageApplianceMonitoringConfigurationStatus() { + } + + /** + * Get the logLevel property: The log level for the monitoring configuration status of the storage appliance. + * + * @return the logLevel value. + */ + public StorageApplianceMetricsConfigurationStatusLogLevel logLevel() { + return this.logLevel; + } + + /** + * Get the metricsLevel property: The metrics level for the monitoring configuration status of the storage + * appliance. + * + * @return the metricsLevel value. + */ + public StorageApplianceMetricsConfigurationStatusMetricsLevel metricsLevel() { + return this.metricsLevel; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("logLevel", this.logLevel == null ? null : this.logLevel.toString()); + jsonWriter.writeStringField("metricsLevel", this.metricsLevel == null ? null : this.metricsLevel.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StorageApplianceMonitoringConfigurationStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StorageApplianceMonitoringConfigurationStatus 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 StorageApplianceMonitoringConfigurationStatus. + */ + public static StorageApplianceMonitoringConfigurationStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StorageApplianceMonitoringConfigurationStatus deserializedStorageApplianceMonitoringConfigurationStatus + = new StorageApplianceMonitoringConfigurationStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("logLevel".equals(fieldName)) { + deserializedStorageApplianceMonitoringConfigurationStatus.logLevel + = StorageApplianceMetricsConfigurationStatusLogLevel.fromString(reader.getString()); + } else if ("metricsLevel".equals(fieldName)) { + deserializedStorageApplianceMonitoringConfigurationStatus.metricsLevel + = StorageApplianceMetricsConfigurationStatusMetricsLevel.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedStorageApplianceMonitoringConfigurationStatus; + }); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageAppliancePatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageAppliancePatchParameters.java index a50fac8138f7..e46ac449ba33 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageAppliancePatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageAppliancePatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -24,7 +24,7 @@ public final class StorageAppliancePatchParameters implements JsonSerializable tags; @@ -44,7 +44,7 @@ private StorageAppliancePatchProperties innerProperties() { } /** - * Get the tags property: The Azure resource tags that will replace the existing ones. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -53,7 +53,7 @@ public Map tags() { } /** - * Set the tags property: The Azure resource tags that will replace the existing ones. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the StorageAppliancePatchParameters object itself. @@ -86,17 +86,6 @@ public StorageAppliancePatchParameters withSerialNumber(String serialNumber) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceProvisioningState.java index 4c71dd11ac5b..45fdc8f962d2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceProvisioningState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,27 +12,27 @@ */ public final class StorageApplianceProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for StorageApplianceProvisioningState. + * The Succeeded status. */ public static final StorageApplianceProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for StorageApplianceProvisioningState. + * The Failed status. */ public static final StorageApplianceProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for StorageApplianceProvisioningState. + * The Canceled status. */ public static final StorageApplianceProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Provisioning for StorageApplianceProvisioningState. + * The Provisioning status. */ public static final StorageApplianceProvisioningState PROVISIONING = fromString("Provisioning"); /** - * Static value Accepted for StorageApplianceProvisioningState. + * The Accepted status. */ public static final StorageApplianceProvisioningState ACCEPTED = fromString("Accepted"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceRunReadCommandsParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceRunReadCommandsParameters.java index f28a88636de9..c45b36e89f51 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceRunReadCommandsParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceRunReadCommandsParameters.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -78,23 +77,6 @@ public StorageApplianceRunReadCommandsParameters withLimitTimeSeconds(long limit return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (commands() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property commands in model StorageApplianceRunReadCommandsParameters")); - } else { - commands().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(StorageApplianceRunReadCommandsParameters.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceSkuSlot.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceSkuSlot.java index bc81fd950821..e54b5acad09d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceSkuSlot.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceSkuSlot.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -30,7 +30,7 @@ public final class StorageApplianceSkuSlot implements JsonSerializable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String storageApplianceName, + Context context); /** - * List storage appliances in the subscription. - * - * Get a list of storage appliances in the provided subscription. + * Get properties of the provided storage appliance. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageApplianceName The name of the storage appliance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 storage appliances in the provided subscription as paginated response with - * {@link PagedIterable}. + * @return properties of the provided storage appliance. */ - PagedIterable list(Integer top, String skipToken, Context context); + StorageAppliance getByResourceGroup(String resourceGroupName, String storageApplianceName); /** - * List storage appliances in the resource group. - * - * Get a list of storage appliances in the provided resource group. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageApplianceName The name of the storage appliance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 storage appliances in the provided resource group as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void deleteByResourceGroup(String resourceGroupName, String storageApplianceName); /** - * List storage appliances in the resource group. - * - * Get a list of storage appliances in the provided resource group. + * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this + * resource is managed by the system. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param storageApplianceName The name of the storage appliance. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 storage appliances in the provided resource group as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + void delete(String resourceGroupName, String storageApplianceName, String ifMatch, String ifNoneMatch, Context context); /** - * Retrieve the storage appliance. - * - * Get properties of the provided storage appliance. + * Get a list of storage appliances in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @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 properties of the provided storage appliance along with {@link Response}. + * @return a list of storage appliances in the provided resource group as paginated response with + * {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String storageApplianceName, - Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Retrieve the storage appliance. - * - * Get properties of the provided storage appliance. + * Get a list of storage appliances in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 properties of the provided storage appliance. + * @return a list of storage appliances in the provided resource group as paginated response with + * {@link PagedIterable}. */ - StorageAppliance getByResourceGroup(String resourceGroupName, String storageApplianceName); + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); /** - * Delete the storage appliance. - * - * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this - * resource is managed by the system. + * Get a list of storage appliances in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a list of storage appliances in the provided subscription as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult deleteByResourceGroup(String resourceGroupName, String storageApplianceName); + PagedIterable list(); /** - * Delete the storage appliance. - * - * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this - * resource is managed by the system. + * Get a list of storage appliances in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of storage appliances in the provided subscription as paginated response with + * {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String storageApplianceName, String ifMatch, - String ifNoneMatch, Context context); + PagedIterable list(Integer top, String skipToken, Context context); /** - * Turn off remote vendor management for a storage appliance, if supported. - * * Disable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -150,13 +130,11 @@ OperationStatusResult delete(String resourceGroupName, String storageApplianceNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult disableRemoteVendorManagement(String resourceGroupName, String storageApplianceName); /** - * Turn off remote vendor management for a storage appliance, if supported. - * * Disable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -165,14 +143,12 @@ OperationStatusResult delete(String resourceGroupName, String storageApplianceNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult disableRemoteVendorManagement(String resourceGroupName, String storageApplianceName, Context context); /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -180,13 +156,11 @@ OperationStatusResult disableRemoteVendorManagement(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult enableRemoteVendorManagement(String resourceGroupName, String storageApplianceName); /** - * Turn on remote vendor management for a storage appliance, if supported. - * * Enable remote vendor management of the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -196,15 +170,13 @@ OperationStatusResult disableRemoteVendorManagement(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult enableRemoteVendorManagement(String resourceGroupName, String storageApplianceName, StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters, Context context); /** - * Run read-only commands against a storage appliance. - * * Run one or more read-only commands on the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -213,14 +185,12 @@ OperationStatusResult enableRemoteVendorManagement(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runReadCommands(String resourceGroupName, String storageApplianceName, StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters); /** - * Run read-only commands against a storage appliance. - * * Run one or more read-only commands on the provided storage appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -230,14 +200,12 @@ OperationStatusResult runReadCommands(String resourceGroupName, String storageAp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult runReadCommands(String resourceGroupName, String storageApplianceName, StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters, Context context); /** - * Retrieve the storage appliance. - * * Get properties of the provided storage appliance. * * @param id the resource ID. @@ -249,8 +217,6 @@ OperationStatusResult runReadCommands(String resourceGroupName, String storageAp StorageAppliance getById(String id); /** - * Retrieve the storage appliance. - * * Get properties of the provided storage appliance. * * @param id the resource ID. @@ -263,8 +229,6 @@ OperationStatusResult runReadCommands(String resourceGroupName, String storageAp Response getByIdWithResponse(String id, Context context); /** - * Delete the storage appliance. - * * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this * resource is managed by the system. * @@ -272,13 +236,10 @@ OperationStatusResult runReadCommands(String resourceGroupName, String storageAp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteById(String id); + void deleteById(String id); /** - * Delete the storage appliance. - * * Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this * resource is managed by the system. * @@ -291,9 +252,8 @@ OperationStatusResult runReadCommands(String resourceGroupName, String storageAp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); + void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); /** * Begins definition for a new StorageAppliance resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageProfile.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageProfile.java index a7bcf914a458..008fbc0ab786 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageProfile.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StorageProfile.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -76,22 +75,6 @@ public StorageProfile withVolumeAttachments(List volumeAttachments) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (osDisk() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property osDisk in model StorageProfile")); - } else { - osDisk().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(StorageProfile.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StringKeyValuePair.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StringKeyValuePair.java index ff0b5c91a938..456f91760c2d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StringKeyValuePair.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/StringKeyValuePair.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -73,24 +72,6 @@ public StringKeyValuePair withValue(String value) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (key() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property key in model StringKeyValuePair")); - } - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model StringKeyValuePair")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(StringKeyValuePair.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TransportProtocol.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TransportProtocol.java new file mode 100644 index 000000000000..e04fd96d2e1c --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TransportProtocol.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.networkcloud.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The protocol advertised by the access bridge endpoints. + */ +public final class TransportProtocol extends ExpandableStringEnum { + /** + * The TCP transport protocol. + */ + public static final TransportProtocol TCP = fromString("TCP"); + + /** + * The UDP transport protocol. + */ + public static final TransportProtocol UDP = fromString("UDP"); + + /** + * Creates a new instance of TransportProtocol value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TransportProtocol() { + } + + /** + * Creates or finds a TransportProtocol from its string representation. + * + * @param name a name to look for. + * @return the corresponding TransportProtocol. + */ + public static TransportProtocol fromString(String name) { + return fromString(name, TransportProtocol.class); + } + + /** + * Gets known TransportProtocol values. + * + * @return known TransportProtocol values. + */ + public static Collection values() { + return values(TransportProtocol.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetwork.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetwork.java index 1da2cc221a06..78927a915600 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetwork.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetwork.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -51,14 +51,18 @@ public interface TrunkedNetwork { Map tags(); /** - * Gets the etag property: Resource ETag. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ String etag(); /** - * Gets the extendedLocation property: The extended location of the cluster associated with the resource. + * Gets the extendedLocation property: The extended location of the resource. This property is required when + * creating the resource. * * @return the extendedLocation value. */ @@ -71,6 +75,37 @@ public interface TrunkedNetwork { */ SystemData systemData(); + /** + * Gets the hybridAksPluginType property: Field Deprecated. The field was previously optional, now it will have no + * defined behavior and will be ignored. The network plugin type for Hybrid AKS. + * + * @return the hybridAksPluginType value. + */ + HybridAksPluginType hybridAksPluginType(); + + /** + * Gets the interfaceName property: The default interface name for this trunked network in the virtual machine. This + * name can be overridden by the name supplied in the network attachment configuration of that virtual machine. + * + * @return the interfaceName value. + */ + String interfaceName(); + + /** + * Gets the isolationDomainIds property: The list of resource IDs representing the Network Fabric isolation domains. + * It can be any combination of l2IsolationDomain and l3IsolationDomain resources. + * + * @return the isolationDomainIds value. + */ + List isolationDomainIds(); + + /** + * Gets the vlans property: The list of vlans that are selected from the isolation domains for trunking. + * + * @return the vlans value. + */ + List vlans(); + /** * Gets the associatedResourceIds property: The list of resource IDs for the other Microsoft.NetworkCloud resources * that have attached this network. @@ -109,37 +144,6 @@ public interface TrunkedNetwork { */ List hybridAksClustersAssociatedIds(); - /** - * Gets the hybridAksPluginType property: Field Deprecated. The field was previously optional, now it will have no - * defined behavior and will be ignored. The network plugin type for Hybrid AKS. - * - * @return the hybridAksPluginType value. - */ - HybridAksPluginType hybridAksPluginType(); - - /** - * Gets the interfaceName property: The default interface name for this trunked network in the virtual machine. This - * name can be overridden by the name supplied in the network attachment configuration of that virtual machine. - * - * @return the interfaceName value. - */ - String interfaceName(); - - /** - * Gets the isolationDomainIds property: The list of resource IDs representing the Network Fabric isolation domains. - * It can be any combination of l2IsolationDomain and l3IsolationDomain resources. - * - * @return the isolationDomainIds value. - */ - List isolationDomainIds(); - - /** - * Gets the provisioningState property: The provisioning state of the trunked network. - * - * @return the provisioningState value. - */ - TrunkedNetworkProvisioningState provisioningState(); - /** * Gets the virtualMachinesAssociatedIds property: Field Deprecated. These fields will be empty/omitted. The list of * virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this trunked @@ -150,11 +154,11 @@ public interface TrunkedNetwork { List virtualMachinesAssociatedIds(); /** - * Gets the vlans property: The list of vlans that are selected from the isolation domains for trunking. + * Gets the provisioningState property: The provisioning state of the trunked network. * - * @return the vlans value. + * @return the provisioningState value. */ - List vlans(); + TrunkedNetworkProvisioningState provisioningState(); /** * Gets the region of the resource. @@ -241,10 +245,11 @@ interface WithResourceGroup { */ interface WithExtendedLocation { /** - * Specifies the extendedLocation property: The extended location of the cluster associated with the - * resource.. + * Specifies the extendedLocation property: The extended location of the resource. This property is required + * when creating the resource.. * - * @param extendedLocation The extended location of the cluster associated with the resource. + * @param extendedLocation The extended location of the resource. This property is required when creating + * the resource. * @return the next definition stage. */ WithIsolationDomainIds withExtendedLocation(ExtendedLocation extendedLocation); @@ -414,9 +419,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: The Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags.. * - * @param tags The Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkAttachmentConfiguration.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkAttachmentConfiguration.java index ea903a6134a5..0cf4d6299d87 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkAttachmentConfiguration.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkAttachmentConfiguration.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -74,21 +73,6 @@ public TrunkedNetworkAttachmentConfiguration withPluginType(KubernetesPluginType return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (networkId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkId in model TrunkedNetworkAttachmentConfiguration")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TrunkedNetworkAttachmentConfiguration.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkDetailedStatus.java index 85a3117b9885..b22b7c6d3d10 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,17 +12,17 @@ */ public final class TrunkedNetworkDetailedStatus extends ExpandableStringEnum { /** - * Static value Error for TrunkedNetworkDetailedStatus. + * The Error status. */ public static final TrunkedNetworkDetailedStatus ERROR = fromString("Error"); /** - * Static value Available for TrunkedNetworkDetailedStatus. + * The Available status. */ public static final TrunkedNetworkDetailedStatus AVAILABLE = fromString("Available"); /** - * Static value Provisioning for TrunkedNetworkDetailedStatus. + * The Provisioning status. */ public static final TrunkedNetworkDetailedStatus PROVISIONING = fromString("Provisioning"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkPatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkPatchParameters.java index 474a305dd790..2f93864970a8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkPatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkPatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -18,7 +18,7 @@ @Fluent public final class TrunkedNetworkPatchParameters implements JsonSerializable { /* - * The Azure resource tags that will replace the existing ones. + * Resource tags. */ private Map tags; @@ -29,7 +29,7 @@ public TrunkedNetworkPatchParameters() { } /** - * Get the tags property: The Azure resource tags that will replace the existing ones. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -38,7 +38,7 @@ public Map tags() { } /** - * Set the tags property: The Azure resource tags that will replace the existing ones. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the TrunkedNetworkPatchParameters object itself. @@ -48,14 +48,6 @@ public TrunkedNetworkPatchParameters withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkProvisioningState.java index 4fa946ee377f..9081aba4550e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkProvisioningState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,27 +12,27 @@ */ public final class TrunkedNetworkProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for TrunkedNetworkProvisioningState. + * The Succeeded status. */ public static final TrunkedNetworkProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for TrunkedNetworkProvisioningState. + * The Failed status. */ public static final TrunkedNetworkProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for TrunkedNetworkProvisioningState. + * The Canceled status. */ public static final TrunkedNetworkProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Provisioning for TrunkedNetworkProvisioningState. + * The Provisioning status. */ public static final TrunkedNetworkProvisioningState PROVISIONING = fromString("Provisioning"); /** - * Static value Accepted for TrunkedNetworkProvisioningState. + * The Accepted status. */ public static final TrunkedNetworkProvisioningState ACCEPTED = fromString("Accepted"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworks.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworks.java index 0c1a8d26bea5..f4ff2e35ac37 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworks.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworks.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,132 +13,112 @@ */ public interface TrunkedNetworks { /** - * List trunked networks in the subscription. - * - * Get a list of trunked networks in the provided subscription. + * Get properties of the provided trunked network. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param trunkedNetworkName The name of the trunked 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 a list of trunked networks in the provided subscription as paginated response with {@link PagedIterable}. + * @return properties of the provided trunked network along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String trunkedNetworkName, + Context context); /** - * List trunked networks in the subscription. - * - * Get a list of trunked networks in the provided subscription. + * Get properties of the provided trunked network. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param trunkedNetworkName The name of the trunked 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 a list of trunked networks in the provided subscription as paginated response with {@link PagedIterable}. + * @return properties of the provided trunked network. */ - PagedIterable list(Integer top, String skipToken, Context context); + TrunkedNetwork getByResourceGroup(String resourceGroupName, String trunkedNetworkName); /** - * List trunked networks in the resource group. - * - * Get a list of trunked networks in the provided resource group. + * Delete the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param trunkedNetworkName The name of the trunked 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 a list of trunked networks in the provided resource group as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void deleteByResourceGroup(String resourceGroupName, String trunkedNetworkName); /** - * List trunked networks in the resource group. - * - * Get a list of trunked networks in the provided resource group. + * Delete the provided trunked network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param trunkedNetworkName The name of the trunked network. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 trunked networks in the provided resource group as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + void delete(String resourceGroupName, String trunkedNetworkName, String ifMatch, String ifNoneMatch, Context context); /** - * Retrieve the trunked network. - * - * Get properties of the provided trunked network. + * Get a list of trunked networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked 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 properties of the provided trunked network along with {@link Response}. + * @return a list of trunked networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String trunkedNetworkName, - Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Retrieve the trunked network. - * - * Get properties of the provided trunked network. + * Get a list of trunked networks in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 properties of the provided trunked network. + * @return a list of trunked networks in the provided resource group as paginated response with + * {@link PagedIterable}. */ - TrunkedNetwork getByResourceGroup(String resourceGroupName, String trunkedNetworkName); + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); /** - * Delete the trunked network. - * - * Delete the provided trunked network. + * Get a list of trunked networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked 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 current status of an async operation. + * @return a list of trunked networks in the provided subscription as paginated response with {@link PagedIterable}. */ - OperationStatusResult deleteByResourceGroup(String resourceGroupName, String trunkedNetworkName); + PagedIterable list(); /** - * Delete the trunked network. - * - * Delete the provided trunked network. + * Get a list of trunked networks in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of trunked networks in the provided subscription as paginated response with {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String trunkedNetworkName, String ifMatch, - String ifNoneMatch, Context context); + PagedIterable list(Integer top, String skipToken, Context context); /** - * Retrieve the trunked network. - * * Get properties of the provided trunked network. * * @param id the resource ID. @@ -150,8 +130,6 @@ OperationStatusResult delete(String resourceGroupName, String trunkedNetworkName TrunkedNetwork getById(String id); /** - * Retrieve the trunked network. - * * Get properties of the provided trunked network. * * @param id the resource ID. @@ -164,21 +142,16 @@ OperationStatusResult delete(String resourceGroupName, String trunkedNetworkName Response getByIdWithResponse(String id, Context context); /** - * Delete the trunked network. - * * Delete the provided trunked 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 current status of an async operation. */ - OperationStatusResult deleteById(String id); + void deleteById(String id); /** - * Delete the trunked network. - * * Delete the provided trunked network. * * @param id the resource ID. @@ -190,9 +163,8 @@ OperationStatusResult delete(String resourceGroupName, String trunkedNetworkName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); + void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); /** * Begins definition for a new TrunkedNetwork resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/UserAssignedIdentity.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/UserAssignedIdentity.java index e93c47ce1edc..018a28274bc9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/UserAssignedIdentity.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/UserAssignedIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -10,7 +10,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.UUID; /** * User assigned identity properties. @@ -20,12 +19,12 @@ public final class UserAssignedIdentity implements JsonSerializable UUID.fromString(nonNullReader.getString())); + deserializedUserAssignedIdentity.principalId = reader.getString(); } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentity.clientId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedUserAssignedIdentity.clientId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ValidationThreshold.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ValidationThreshold.java index c2b15defb562..39a27a826cca 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ValidationThreshold.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ValidationThreshold.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -98,24 +97,6 @@ public ValidationThreshold withValue(long value) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (grouping() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property grouping in model ValidationThreshold")); - } - if (type() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property type in model ValidationThreshold")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ValidationThreshold.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ValidationThresholdGrouping.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ValidationThresholdGrouping.java index 9a1d9412f112..59916614e3d0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ValidationThresholdGrouping.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ValidationThresholdGrouping.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class ValidationThresholdGrouping extends ExpandableStringEnum { /** - * Static value PerCluster for ValidationThresholdGrouping. + * The threshold is calculated for the whole cluster. */ public static final ValidationThresholdGrouping PER_CLUSTER = fromString("PerCluster"); /** - * Static value PerRack for ValidationThresholdGrouping. + * The threshold is calculated for each rack in the cluster. */ public static final ValidationThresholdGrouping PER_RACK = fromString("PerRack"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ValidationThresholdType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ValidationThresholdType.java index be1c070383b3..71381dcff993 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ValidationThresholdType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/ValidationThresholdType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class ValidationThresholdType extends ExpandableStringEnum { /** - * Static value CountSuccess for ValidationThresholdType. + * The threshold is evaluated based on the count of successful operations. */ public static final ValidationThresholdType COUNT_SUCCESS = fromString("CountSuccess"); /** - * Static value PercentSuccess for ValidationThresholdType. + * The threshold is evaluated based on the percentage of successful operations. */ public static final ValidationThresholdType PERCENT_SUCCESS = fromString("PercentSuccess"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachine.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachine.java index d5399bef8f4d..d57d888598c4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachine.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachine.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -51,21 +51,25 @@ public interface VirtualMachine { Map tags(); /** - * Gets the etag property: Resource ETag. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ String etag(); /** - * Gets the extendedLocation property: The extended location of the cluster associated with the resource. + * Gets the extendedLocation property: The extended location of the resource. This property is required when + * creating the resource. * * @return the extendedLocation value. */ ExtendedLocation extendedLocation(); /** - * Gets the identity property: The identity for the resource. + * Gets the identity property: The managed service identities assigned to this resource. * * @return the identity value. */ @@ -86,20 +90,6 @@ public interface VirtualMachine { */ String adminUsername(); - /** - * Gets the availabilityZone property: The cluster availability zone containing this virtual machine. - * - * @return the availabilityZone value. - */ - String availabilityZone(); - - /** - * Gets the bareMetalMachineId property: The resource ID of the bare metal machine that hosts the virtual machine. - * - * @return the bareMetalMachineId value. - */ - String bareMetalMachineId(); - /** * Gets the bootMethod property: Selects the boot method for the virtual machine. * @@ -115,20 +105,6 @@ public interface VirtualMachine { */ NetworkAttachment cloudServicesNetworkAttachment(); - /** - * Gets the clusterId property: The resource ID of the cluster the virtual machine is created for. - * - * @return the clusterId value. - */ - String clusterId(); - - /** - * Gets the consoleExtendedLocation property: The extended location to use for creation of a VM console resource. - * - * @return the consoleExtendedLocation value. - */ - ExtendedLocation consoleExtendedLocation(); - /** * Gets the cpuCores property: The number of CPU cores in the virtual machine. * @@ -136,20 +112,6 @@ public interface VirtualMachine { */ long cpuCores(); - /** - * Gets the detailedStatus property: The more detailed status of the virtual machine. - * - * @return the detailedStatus value. - */ - VirtualMachineDetailedStatus detailedStatus(); - - /** - * Gets the detailedStatusMessage property: The descriptive message about the current detailed status. - * - * @return the detailedStatusMessage value. - */ - String detailedStatusMessage(); - /** * Gets the isolateEmulatorThread property: Field Deprecated, the value will be ignored if provided. The indicator * of whether one of the specified CPU cores is isolated to run the emulator thread for this virtual machine. @@ -194,20 +156,6 @@ public interface VirtualMachine { */ List placementHints(); - /** - * Gets the powerState property: The power state of the virtual machine. - * - * @return the powerState value. - */ - VirtualMachinePowerState powerState(); - - /** - * Gets the provisioningState property: The provisioning state of the virtual machine. - * - * @return the provisioningState value. - */ - VirtualMachineProvisioningState provisioningState(); - /** * Gets the sshPublicKeys property: The list of ssh public keys. Each key will be added to the virtual machine using * the cloud-init ssh_authorized_keys mechanism for the adminUsername. @@ -270,6 +218,55 @@ public interface VirtualMachine { */ ImageRepositoryCredentials vmImageRepositoryCredentials(); + /** + * Gets the availabilityZone property: The cluster availability zone containing this virtual machine. + * + * @return the availabilityZone value. + */ + String availabilityZone(); + + /** + * Gets the bareMetalMachineId property: The resource ID of the bare metal machine that hosts the virtual machine. + * + * @return the bareMetalMachineId value. + */ + String bareMetalMachineId(); + + /** + * Gets the clusterId property: The resource ID of the cluster the virtual machine is created for. + * + * @return the clusterId value. + */ + String clusterId(); + + /** + * Gets the consoleExtendedLocation property: The extended location to use for creation of a VM console resource. + * + * @return the consoleExtendedLocation value. + */ + ExtendedLocation consoleExtendedLocation(); + + /** + * Gets the detailedStatus property: The more detailed status of the virtual machine. + * + * @return the detailedStatus value. + */ + VirtualMachineDetailedStatus detailedStatus(); + + /** + * Gets the detailedStatusMessage property: The descriptive message about the current detailed status. + * + * @return the detailedStatusMessage value. + */ + String detailedStatusMessage(); + + /** + * Gets the powerState property: The power state of the virtual machine. + * + * @return the powerState value. + */ + VirtualMachinePowerState powerState(); + /** * Gets the volumes property: The resource IDs of volumes that are attached to the virtual machine. * @@ -277,6 +274,13 @@ public interface VirtualMachine { */ List volumes(); + /** + * Gets the provisioningState property: The provisioning state of the virtual machine. + * + * @return the provisioningState value. + */ + VirtualMachineProvisioningState provisioningState(); + /** * Gets the region of the resource. * @@ -364,10 +368,11 @@ interface WithResourceGroup { */ interface WithExtendedLocation { /** - * Specifies the extendedLocation property: The extended location of the cluster associated with the - * resource.. + * Specifies the extendedLocation property: The extended location of the resource. This property is required + * when creating the resource.. * - * @param extendedLocation The extended location of the cluster associated with the resource. + * @param extendedLocation The extended location of the resource. This property is required when creating + * the resource. * @return the next definition stage. */ WithAdminUsername withExtendedLocation(ExtendedLocation extendedLocation); @@ -465,12 +470,12 @@ interface WithVmImage { * resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, - DefinitionStages.WithBootMethod, DefinitionStages.WithConsoleExtendedLocation, - DefinitionStages.WithIsolateEmulatorThread, DefinitionStages.WithNetworkAttachments, - DefinitionStages.WithNetworkData, DefinitionStages.WithNetworkDataContent, - DefinitionStages.WithPlacementHints, DefinitionStages.WithSshPublicKeys, DefinitionStages.WithUserData, - DefinitionStages.WithUserDataContent, DefinitionStages.WithVirtioInterface, - DefinitionStages.WithVmDeviceModel, DefinitionStages.WithVmImageRepositoryCredentials, + DefinitionStages.WithBootMethod, DefinitionStages.WithIsolateEmulatorThread, + DefinitionStages.WithNetworkAttachments, DefinitionStages.WithNetworkData, + DefinitionStages.WithNetworkDataContent, DefinitionStages.WithPlacementHints, + DefinitionStages.WithSshPublicKeys, DefinitionStages.WithUserData, DefinitionStages.WithUserDataContent, + DefinitionStages.WithVirtioInterface, DefinitionStages.WithVmDeviceModel, + DefinitionStages.WithVmImageRepositoryCredentials, DefinitionStages.WithConsoleExtendedLocation, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { /** * Executes the create request. @@ -506,9 +511,9 @@ interface WithTags { */ interface WithIdentity { /** - * Specifies the identity property: The identity for the resource.. + * Specifies the identity property: The managed service identities assigned to this resource.. * - * @param identity The identity for the resource. + * @param identity The managed service identities assigned to this resource. * @return the next definition stage. */ WithCreate withIdentity(ManagedServiceIdentity identity); @@ -527,20 +532,6 @@ interface WithBootMethod { WithCreate withBootMethod(VirtualMachineBootMethod bootMethod); } - /** - * The stage of the VirtualMachine definition allowing to specify consoleExtendedLocation. - */ - interface WithConsoleExtendedLocation { - /** - * Specifies the consoleExtendedLocation property: The extended location to use for creation of a VM console - * resource.. - * - * @param consoleExtendedLocation The extended location to use for creation of a VM console resource. - * @return the next definition stage. - */ - WithCreate withConsoleExtendedLocation(ExtendedLocation consoleExtendedLocation); - } - /** * The stage of the VirtualMachine definition allowing to specify isolateEmulatorThread. */ @@ -697,6 +688,20 @@ interface WithVmImageRepositoryCredentials { WithCreate withVmImageRepositoryCredentials(ImageRepositoryCredentials vmImageRepositoryCredentials); } + /** + * The stage of the VirtualMachine definition allowing to specify consoleExtendedLocation. + */ + interface WithConsoleExtendedLocation { + /** + * Specifies the consoleExtendedLocation property: The extended location to use for creation of a VM console + * resource.. + * + * @param consoleExtendedLocation The extended location to use for creation of a VM console resource. + * @return the next definition stage. + */ + WithCreate withConsoleExtendedLocation(ExtendedLocation consoleExtendedLocation); + } + /** * The stage of the VirtualMachine definition allowing to specify ifMatch. */ @@ -766,9 +771,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: The Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags.. * - * @param tags The Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); @@ -850,19 +855,15 @@ interface WithIfNoneMatch { VirtualMachine refresh(Context context); /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult assignRelay(); /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param virtualMachineAssignRelayParameters The request body. @@ -870,25 +871,21 @@ interface WithIfNoneMatch { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult assignRelay(VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters, Context context); /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult powerOff(); /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param virtualMachinePowerOffParameters The request body. @@ -896,79 +893,67 @@ OperationStatusResult assignRelay(VirtualMachineAssignRelayParameters virtualMac * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult powerOff(VirtualMachinePowerOffParameters virtualMachinePowerOffParameters, Context context); /** - * Reimage the virtual machine. - * * Reimage the provided virtual machine. * * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult reimage(); /** - * Reimage the virtual machine. - * * Reimage the provided virtual machine. * * @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. + * @return the response. */ OperationStatusResult reimage(Context context); /** - * Restart the virtual machine. - * * Restart the provided virtual machine. * * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult restart(); /** - * Restart the virtual machine. - * * Restart the provided virtual machine. * * @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. + * @return the response. */ OperationStatusResult restart(Context context); /** - * Start the virtual machine. - * * Start the provided virtual machine. * * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult start(); /** - * Start the virtual machine. - * * Start the provided virtual machine. * * @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. + * @return the response. */ OperationStatusResult start(Context context); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineAssignRelayParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineAssignRelayParameters.java index 425b4b250c60..e7a579e51461 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineAssignRelayParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineAssignRelayParameters.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -80,21 +79,6 @@ public VirtualMachineAssignRelayParameters withRelayType(RelayType relayType) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (machineId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property machineId in model VirtualMachineAssignRelayParameters")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VirtualMachineAssignRelayParameters.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineBootMethod.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineBootMethod.java index d1d12eaee076..7e46e9a3ca89 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineBootMethod.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineBootMethod.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,14 +12,14 @@ */ public final class VirtualMachineBootMethod extends ExpandableStringEnum { /** - * Static value UEFI for VirtualMachineBootMethod. + * BIOS boot mode. */ - public static final VirtualMachineBootMethod UEFI = fromString("UEFI"); + public static final VirtualMachineBootMethod BIOS = fromString("BIOS"); /** - * Static value BIOS for VirtualMachineBootMethod. + * UEFI boot mode. */ - public static final VirtualMachineBootMethod BIOS = fromString("BIOS"); + public static final VirtualMachineBootMethod UEFI = fromString("UEFI"); /** * Creates a new instance of VirtualMachineBootMethod value. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineDetailedStatus.java index 8da7471a173b..c2dc9daea1c9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,42 +12,42 @@ */ public final class VirtualMachineDetailedStatus extends ExpandableStringEnum { /** - * Static value Available for VirtualMachineDetailedStatus. + * The Available status. */ public static final VirtualMachineDetailedStatus AVAILABLE = fromString("Available"); /** - * Static value Error for VirtualMachineDetailedStatus. + * The Error status. */ public static final VirtualMachineDetailedStatus ERROR = fromString("Error"); /** - * Static value Provisioning for VirtualMachineDetailedStatus. + * The Provisioning status. */ public static final VirtualMachineDetailedStatus PROVISIONING = fromString("Provisioning"); /** - * Static value Running for VirtualMachineDetailedStatus. + * The Running status. */ public static final VirtualMachineDetailedStatus RUNNING = fromString("Running"); /** - * Static value Scheduling for VirtualMachineDetailedStatus. + * The Scheduling status. */ public static final VirtualMachineDetailedStatus SCHEDULING = fromString("Scheduling"); /** - * Static value Stopped for VirtualMachineDetailedStatus. + * The Stopped status. */ public static final VirtualMachineDetailedStatus STOPPED = fromString("Stopped"); /** - * Static value Terminating for VirtualMachineDetailedStatus. + * The Terminating status. */ public static final VirtualMachineDetailedStatus TERMINATING = fromString("Terminating"); /** - * Static value Unknown for VirtualMachineDetailedStatus. + * The Unknown status. */ public static final VirtualMachineDetailedStatus UNKNOWN = fromString("Unknown"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineDeviceModelType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineDeviceModelType.java index 63bde2c2ad60..74a96f35697b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineDeviceModelType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineDeviceModelType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,17 +12,17 @@ */ public final class VirtualMachineDeviceModelType extends ExpandableStringEnum { /** - * Static value T1 for VirtualMachineDeviceModelType. + * The T1 device model. */ public static final VirtualMachineDeviceModelType T1 = fromString("T1"); /** - * Static value T2 for VirtualMachineDeviceModelType. + * The T2 device model. */ public static final VirtualMachineDeviceModelType T2 = fromString("T2"); /** - * Static value T3 for VirtualMachineDeviceModelType. + * The T3 device model. */ public static final VirtualMachineDeviceModelType T3 = fromString("T3"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineIpAllocationMethod.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineIpAllocationMethod.java index 8eba9ca8a35f..a13f617ade82 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineIpAllocationMethod.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineIpAllocationMethod.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,17 +13,17 @@ */ public final class VirtualMachineIpAllocationMethod extends ExpandableStringEnum { /** - * Static value Dynamic for VirtualMachineIpAllocationMethod. + * Dynamic VM IP allocation. */ public static final VirtualMachineIpAllocationMethod DYNAMIC = fromString("Dynamic"); /** - * Static value Static for VirtualMachineIpAllocationMethod. + * Static VM IP allocation. */ public static final VirtualMachineIpAllocationMethod STATIC = fromString("Static"); /** - * Static value Disabled for VirtualMachineIpAllocationMethod. + * No VM IP allocation. */ public static final VirtualMachineIpAllocationMethod DISABLED = fromString("Disabled"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineIsolateEmulatorThread.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineIsolateEmulatorThread.java index 1c9183dbc1c2..31e80ef77c77 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineIsolateEmulatorThread.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineIsolateEmulatorThread.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -14,14 +14,14 @@ public final class VirtualMachineIsolateEmulatorThread extends ExpandableStringEnum { /** - * Static value True for VirtualMachineIsolateEmulatorThread. + * Do not isolate the emulator thread. */ - public static final VirtualMachineIsolateEmulatorThread TRUE = fromString("True"); + public static final VirtualMachineIsolateEmulatorThread FALSE = fromString("False"); /** - * Static value False for VirtualMachineIsolateEmulatorThread. + * Isolate the emulator thread. */ - public static final VirtualMachineIsolateEmulatorThread FALSE = fromString("False"); + public static final VirtualMachineIsolateEmulatorThread TRUE = fromString("True"); /** * Creates a new instance of VirtualMachineIsolateEmulatorThread value. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePatchParameters.java index 52a2c4b362db..fa7dc218f82c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -29,7 +29,7 @@ public final class VirtualMachinePatchParameters implements JsonSerializable tags; @@ -69,7 +69,7 @@ private VirtualMachinePatchProperties innerProperties() { } /** - * Get the tags property: The Azure resource tags that will replace the existing ones. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -78,7 +78,7 @@ public Map tags() { } /** - * Set the tags property: The Azure resource tags that will replace the existing ones. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the VirtualMachinePatchParameters object itself. @@ -114,20 +114,6 @@ public ImageRepositoryCredentials vmImageRepositoryCredentials() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePlacementHint.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePlacementHint.java index 24d3b92d0b52..b53614f99f91 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePlacementHint.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePlacementHint.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -133,36 +132,6 @@ public VirtualMachinePlacementHint withScope(VirtualMachinePlacementHintPodAffin return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (hintType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property hintType in model VirtualMachinePlacementHint")); - } - if (resourceId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property resourceId in model VirtualMachinePlacementHint")); - } - if (schedulingExecution() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property schedulingExecution in model VirtualMachinePlacementHint")); - } - if (scope() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property scope in model VirtualMachinePlacementHint")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VirtualMachinePlacementHint.class); - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePlacementHintPodAffinityScope.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePlacementHintPodAffinityScope.java index a3fc3ba804bc..2065e1f6ae1e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePlacementHintPodAffinityScope.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePlacementHintPodAffinityScope.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -14,14 +14,14 @@ public final class VirtualMachinePlacementHintPodAffinityScope extends ExpandableStringEnum { /** - * Static value Rack for VirtualMachinePlacementHintPodAffinityScope. + * The virtual machine placement hint is scoped to the bare metal machine. */ - public static final VirtualMachinePlacementHintPodAffinityScope RACK = fromString("Rack"); + public static final VirtualMachinePlacementHintPodAffinityScope MACHINE = fromString("Machine"); /** - * Static value Machine for VirtualMachinePlacementHintPodAffinityScope. + * The virtual machine placement hint is scoped to the rack. */ - public static final VirtualMachinePlacementHintPodAffinityScope MACHINE = fromString("Machine"); + public static final VirtualMachinePlacementHintPodAffinityScope RACK = fromString("Rack"); /** * Creates a new instance of VirtualMachinePlacementHintPodAffinityScope value. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePlacementHintType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePlacementHintType.java index 6c50a1ed9f54..3e763685d482 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePlacementHintType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePlacementHintType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class VirtualMachinePlacementHintType extends ExpandableStringEnum { /** - * Static value Affinity for VirtualMachinePlacementHintType. + * The virtual machine has affinity with the referenced resources. */ public static final VirtualMachinePlacementHintType AFFINITY = fromString("Affinity"); /** - * Static value AntiAffinity for VirtualMachinePlacementHintType. + * The virtual machine has anti-affinity with the referenced resources. */ public static final VirtualMachinePlacementHintType ANTI_AFFINITY = fromString("AntiAffinity"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePowerOffParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePowerOffParameters.java index 9eb2294898fc..d33bf389cce0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePowerOffParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePowerOffParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -49,14 +49,6 @@ public VirtualMachinePowerOffParameters withSkipShutdown(SkipShutdown skipShutdo return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePowerState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePowerState.java index dc1d2572c5fd..816e542ebe93 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePowerState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePowerState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,17 +12,17 @@ */ public final class VirtualMachinePowerState extends ExpandableStringEnum { /** - * Static value On for VirtualMachinePowerState. + * The virtual machine is powered off. */ - public static final VirtualMachinePowerState ON = fromString("On"); + public static final VirtualMachinePowerState OFF = fromString("Off"); /** - * Static value Off for VirtualMachinePowerState. + * The virtual machine is powered on. */ - public static final VirtualMachinePowerState OFF = fromString("Off"); + public static final VirtualMachinePowerState ON = fromString("On"); /** - * Static value Unknown for VirtualMachinePowerState. + * The virtual machine power state is unknown. */ public static final VirtualMachinePowerState UNKNOWN = fromString("Unknown"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineProvisioningState.java index 72dd84137944..5ec99158c6c6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineProvisioningState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,29 +12,29 @@ */ public final class VirtualMachineProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for VirtualMachineProvisioningState. + * The Accepted status. */ - public static final VirtualMachineProvisioningState SUCCEEDED = fromString("Succeeded"); + public static final VirtualMachineProvisioningState ACCEPTED = fromString("Accepted"); /** - * Static value Failed for VirtualMachineProvisioningState. + * The Canceled status. */ - public static final VirtualMachineProvisioningState FAILED = fromString("Failed"); + public static final VirtualMachineProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Canceled for VirtualMachineProvisioningState. + * The Failed status. */ - public static final VirtualMachineProvisioningState CANCELED = fromString("Canceled"); + public static final VirtualMachineProvisioningState FAILED = fromString("Failed"); /** - * Static value Provisioning for VirtualMachineProvisioningState. + * The Provisioning status. */ public static final VirtualMachineProvisioningState PROVISIONING = fromString("Provisioning"); /** - * Static value Accepted for VirtualMachineProvisioningState. + * The Succeeded status. */ - public static final VirtualMachineProvisioningState ACCEPTED = fromString("Accepted"); + public static final VirtualMachineProvisioningState SUCCEEDED = fromString("Succeeded"); /** * Creates a new instance of VirtualMachineProvisioningState value. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineSchedulingExecution.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineSchedulingExecution.java index 1c6350331dc5..3f47ca04087d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineSchedulingExecution.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineSchedulingExecution.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class VirtualMachineSchedulingExecution extends ExpandableStringEnum { /** - * Static value Hard for VirtualMachineSchedulingExecution. + * The hint is a requirement during scheduling. */ public static final VirtualMachineSchedulingExecution HARD = fromString("Hard"); /** - * Static value Soft for VirtualMachineSchedulingExecution. + * The hint is applied using a best-effort approach during scheduling. */ public static final VirtualMachineSchedulingExecution SOFT = fromString("Soft"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineVirtioInterfaceType.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineVirtioInterfaceType.java index a3d158f0f09c..f80e96b8a136 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineVirtioInterfaceType.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineVirtioInterfaceType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class VirtualMachineVirtioInterfaceType extends ExpandableStringEnum { /** - * Static value Modern for VirtualMachineVirtioInterfaceType. + * Modern virtio interface. */ public static final VirtualMachineVirtioInterfaceType MODERN = fromString("Modern"); /** - * Static value Transitional for VirtualMachineVirtioInterfaceType. + * Transitional virtio interface. */ public static final VirtualMachineVirtioInterfaceType TRANSITIONAL = fromString("Transitional"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachines.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachines.java index f2c9a5cc5763..5f37018f56c7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachines.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachines.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,132 +13,112 @@ */ public interface VirtualMachines { /** - * List virtual machines in the subscription. - * - * Get a list of virtual machines in the provided subscription. + * Get properties of the provided virtual machine. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. + * @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 virtual machines in the provided subscription as paginated response with {@link PagedIterable}. + * @return properties of the provided virtual machine along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String virtualMachineName, + Context context); /** - * List virtual machines in the subscription. - * - * Get a list of virtual machines in the provided subscription. + * Get properties of the provided virtual machine. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 virtual machines in the provided subscription as paginated response with {@link PagedIterable}. + * @return properties of the provided virtual machine. */ - PagedIterable list(Integer top, String skipToken, Context context); + VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName); /** - * List virtual machines in the resource group. - * - * Get a list of virtual machines in the provided resource group. + * Delete the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 virtual machines in the provided resource group as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void deleteByResourceGroup(String resourceGroupName, String virtualMachineName); /** - * List virtual machines in the resource group. - * - * Get a list of virtual machines in the provided resource group. + * Delete the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param virtualMachineName The name of the virtual machine. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 virtual machines in the provided resource group as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + void delete(String resourceGroupName, String virtualMachineName, String ifMatch, String ifNoneMatch, Context context); /** - * Retrieve the virtual machine. - * - * Get properties of the provided virtual machine. + * Get a list of virtual machines in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @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 properties of the provided virtual machine along with {@link Response}. + * @return a list of virtual machines in the provided resource group as paginated response with + * {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String virtualMachineName, - Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Retrieve the virtual machine. - * - * Get properties of the provided virtual machine. + * Get a list of virtual machines in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 properties of the provided virtual machine. + * @return a list of virtual machines in the provided resource group as paginated response with + * {@link PagedIterable}. */ - VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName); + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, + Context context); /** - * Delete the virtual machine. - * - * Delete the provided virtual machine. + * Get a list of virtual machines in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a list of virtual machines in the provided subscription as paginated response with {@link PagedIterable}. */ - OperationStatusResult deleteByResourceGroup(String resourceGroupName, String virtualMachineName); + PagedIterable list(); /** - * Delete the virtual machine. - * - * Delete the provided virtual machine. + * Get a list of virtual machines in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of virtual machines in the provided subscription as paginated response with {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String virtualMachineName, String ifMatch, - String ifNoneMatch, Context context); + PagedIterable list(Integer top, String skipToken, Context context); /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -146,13 +126,11 @@ OperationStatusResult delete(String resourceGroupName, String virtualMachineName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult assignRelay(String resourceGroupName, String virtualMachineName); /** - * Assigns a relay to the specified Microsoft.HybridCompute machine. - * * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -162,14 +140,12 @@ OperationStatusResult delete(String resourceGroupName, String virtualMachineName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult assignRelay(String resourceGroupName, String virtualMachineName, VirtualMachineAssignRelayParameters virtualMachineAssignRelayParameters, Context context); /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -177,13 +153,11 @@ OperationStatusResult assignRelay(String resourceGroupName, String virtualMachin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult powerOff(String resourceGroupName, String virtualMachineName); /** - * Power off the virtual machine. - * * Power off the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -193,14 +167,12 @@ OperationStatusResult assignRelay(String resourceGroupName, String virtualMachin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult powerOff(String resourceGroupName, String virtualMachineName, VirtualMachinePowerOffParameters virtualMachinePowerOffParameters, Context context); /** - * Reimage the virtual machine. - * * Reimage the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -208,13 +180,11 @@ OperationStatusResult powerOff(String resourceGroupName, String virtualMachineNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult reimage(String resourceGroupName, String virtualMachineName); /** - * Reimage the virtual machine. - * * Reimage the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -223,13 +193,11 @@ OperationStatusResult powerOff(String resourceGroupName, String virtualMachineNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult reimage(String resourceGroupName, String virtualMachineName, Context context); /** - * Restart the virtual machine. - * * Restart the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -237,13 +205,11 @@ OperationStatusResult powerOff(String resourceGroupName, String virtualMachineNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult restart(String resourceGroupName, String virtualMachineName); /** - * Restart the virtual machine. - * * Restart the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -252,13 +218,11 @@ OperationStatusResult powerOff(String resourceGroupName, String virtualMachineNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult restart(String resourceGroupName, String virtualMachineName, Context context); /** - * Start the virtual machine. - * * Start the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -266,13 +230,11 @@ OperationStatusResult powerOff(String resourceGroupName, String virtualMachineNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult start(String resourceGroupName, String virtualMachineName); /** - * Start the virtual machine. - * * Start the provided virtual machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -281,13 +243,11 @@ OperationStatusResult powerOff(String resourceGroupName, String virtualMachineNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ OperationStatusResult start(String resourceGroupName, String virtualMachineName, Context context); /** - * Retrieve the virtual machine. - * * Get properties of the provided virtual machine. * * @param id the resource ID. @@ -299,8 +259,6 @@ OperationStatusResult powerOff(String resourceGroupName, String virtualMachineNa VirtualMachine getById(String id); /** - * Retrieve the virtual machine. - * * Get properties of the provided virtual machine. * * @param id the resource ID. @@ -313,21 +271,16 @@ OperationStatusResult powerOff(String resourceGroupName, String virtualMachineNa Response getByIdWithResponse(String id, Context context); /** - * Delete the virtual machine. - * * Delete the provided virtual machine. * * @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 current status of an async operation. */ - OperationStatusResult deleteById(String id); + void deleteById(String id); /** - * Delete the virtual machine. - * * Delete the provided virtual machine. * * @param id the resource ID. @@ -339,9 +292,8 @@ OperationStatusResult powerOff(String resourceGroupName, String virtualMachineNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); + void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); /** * Begins definition for a new VirtualMachine resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Volume.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Volume.java index 83b8bcf50261..aa2d357dc608 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Volume.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Volume.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -51,14 +51,18 @@ public interface Volume { Map tags(); /** - * Gets the etag property: Resource ETag. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ String etag(); /** - * Gets the extendedLocation property: The extended location of the cluster associated with the resource. + * Gets the extendedLocation property: The extended location of the resource. This property is required when + * creating the resource. * * @return the extendedLocation value. */ @@ -71,6 +75,20 @@ public interface Volume { */ SystemData systemData(); + /** + * Gets the sizeMiB property: The requested storage allocation for the volume in Mebibytes. + * + * @return the sizeMiB value. + */ + long sizeMiB(); + + /** + * Gets the storageApplianceId property: The resource ID of the storage appliance that hosts the volume. + * + * @return the storageApplianceId value. + */ + String storageApplianceId(); + /** * Gets the allocatedSizeMiB property: The allocated size of the volume in Mebibytes. * @@ -78,6 +96,14 @@ public interface Volume { */ Long allocatedSizeMiB(); + /** + * Gets the assignedStorageApplianceId property: The assigned resource ID of the storage appliance that hosts the + * volume. + * + * @return the assignedStorageApplianceId value. + */ + String assignedStorageApplianceId(); + /** * Gets the attachedTo property: The list of resource IDs that attach the volume. It may include virtual machines * and Hybrid AKS clusters. @@ -100,13 +126,6 @@ public interface Volume { */ String detailedStatusMessage(); - /** - * Gets the provisioningState property: The provisioning state of the volume. - * - * @return the provisioningState value. - */ - VolumeProvisioningState provisioningState(); - /** * Gets the serialNumber property: The unique identifier of the volume. * @@ -115,18 +134,11 @@ public interface Volume { String serialNumber(); /** - * Gets the sizeMiB property: The requested storage allocation for the volume in Mebibytes. - * - * @return the sizeMiB value. - */ - long sizeMiB(); - - /** - * Gets the storageApplianceId property: The resource ID of the storage appliance that hosts the volume. + * Gets the provisioningState property: The provisioning state of the volume. * - * @return the storageApplianceId value. + * @return the provisioningState value. */ - String storageApplianceId(); + VolumeProvisioningState provisioningState(); /** * Gets the region of the resource. @@ -213,10 +225,11 @@ interface WithResourceGroup { */ interface WithExtendedLocation { /** - * Specifies the extendedLocation property: The extended location of the cluster associated with the - * resource.. + * Specifies the extendedLocation property: The extended location of the resource. This property is required + * when creating the resource.. * - * @param extendedLocation The extended location of the cluster associated with the resource. + * @param extendedLocation The extended location of the resource. This property is required when creating + * the resource. * @return the next definition stage. */ WithSizeMiB withExtendedLocation(ExtendedLocation extendedLocation); @@ -352,9 +365,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: The Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags.. * - * @param tags The Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VolumeDetailedStatus.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VolumeDetailedStatus.java index f1c1133e4b64..44fc8f6b0e6b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VolumeDetailedStatus.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VolumeDetailedStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,17 +12,17 @@ */ public final class VolumeDetailedStatus extends ExpandableStringEnum { /** - * Static value Error for VolumeDetailedStatus. + * The Active status. */ - public static final VolumeDetailedStatus ERROR = fromString("Error"); + public static final VolumeDetailedStatus ACTIVE = fromString("Active"); /** - * Static value Active for VolumeDetailedStatus. + * The Error status. */ - public static final VolumeDetailedStatus ACTIVE = fromString("Active"); + public static final VolumeDetailedStatus ERROR = fromString("Error"); /** - * Static value Provisioning for VolumeDetailedStatus. + * The Provisioning status. */ public static final VolumeDetailedStatus PROVISIONING = fromString("Provisioning"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VolumePatchParameters.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VolumePatchParameters.java index a550960895e9..7d7763552de8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VolumePatchParameters.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VolumePatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -18,7 +18,7 @@ @Fluent public final class VolumePatchParameters implements JsonSerializable { /* - * The Azure resource tags that will replace the existing ones. + * Resource tags. */ private Map tags; @@ -29,7 +29,7 @@ public VolumePatchParameters() { } /** - * Get the tags property: The Azure resource tags that will replace the existing ones. + * Get the tags property: Resource tags. * * @return the tags value. */ @@ -38,7 +38,7 @@ public Map tags() { } /** - * Set the tags property: The Azure resource tags that will replace the existing ones. + * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the VolumePatchParameters object itself. @@ -48,14 +48,6 @@ public VolumePatchParameters withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VolumeProvisioningState.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VolumeProvisioningState.java index d1ffae684a3c..e26bae263fcd 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VolumeProvisioningState.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VolumeProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,29 +12,29 @@ */ public final class VolumeProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for VolumeProvisioningState. + * The Accepted status. */ - public static final VolumeProvisioningState SUCCEEDED = fromString("Succeeded"); + public static final VolumeProvisioningState ACCEPTED = fromString("Accepted"); /** - * Static value Failed for VolumeProvisioningState. + * The Canceled status. */ - public static final VolumeProvisioningState FAILED = fromString("Failed"); + public static final VolumeProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Canceled for VolumeProvisioningState. + * The Failed status. */ - public static final VolumeProvisioningState CANCELED = fromString("Canceled"); + public static final VolumeProvisioningState FAILED = fromString("Failed"); /** - * Static value Provisioning for VolumeProvisioningState. + * The Provisioning status. */ public static final VolumeProvisioningState PROVISIONING = fromString("Provisioning"); /** - * Static value Accepted for VolumeProvisioningState. + * The Succeeded status. */ - public static final VolumeProvisioningState ACCEPTED = fromString("Accepted"); + public static final VolumeProvisioningState SUCCEEDED = fromString("Succeeded"); /** * Creates a new instance of VolumeProvisioningState value. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Volumes.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Volumes.java index c29ed52594a7..b7671f6b0931 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Volumes.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/Volumes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,128 +13,107 @@ */ public interface Volumes { /** - * List volumes in the subscription. - * - * Get a list of volumes in the provided subscription. + * Get properties of the provided volume. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param volumeName The name of the volume. + * @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 volumes in the provided subscription as paginated response with {@link PagedIterable}. + * @return properties of the provided volume along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String volumeName, Context context); /** - * List volumes in the subscription. - * - * Get a list of volumes in the provided subscription. + * Get properties of the provided volume. * - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param volumeName The name of the volume. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 volumes in the provided subscription as paginated response with {@link PagedIterable}. + * @return properties of the provided volume. */ - PagedIterable list(Integer top, String skipToken, Context context); + Volume getByResourceGroup(String resourceGroupName, String volumeName); /** - * List volumes in the resource group. - * - * Get a list of volumes in the provided resource group. + * Delete the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param volumeName The name of the volume. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 volumes in the provided resource group as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void deleteByResourceGroup(String resourceGroupName, String volumeName); /** - * List volumes in the resource group. - * - * Get a list of volumes in the provided resource group. + * Delete the provided volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of resources to return from the operation. Example: '$top=10'. - * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. - * This is used for paging through large result sets. + * @param volumeName The name of the volume. + * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing + * resource. Other values will result in error from server as they are not supported. * @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 volumes in the provided resource group as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, Context context); + void delete(String resourceGroupName, String volumeName, String ifMatch, String ifNoneMatch, Context context); /** - * Retrieve the volume. - * - * Get properties of the provided volume. + * Get a list of volumes in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @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 properties of the provided volume along with {@link Response}. + * @return a list of volumes in the provided resource group as paginated response with {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String volumeName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Retrieve the volume. - * - * Get properties of the provided volume. + * Get a list of volumes in the provided resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. + * @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 properties of the provided volume. + * @return a list of volumes in the provided resource group as paginated response with {@link PagedIterable}. */ - Volume getByResourceGroup(String resourceGroupName, String volumeName); + PagedIterable listByResourceGroup(String resourceGroupName, Integer top, String skipToken, Context context); /** - * Delete the volume. - * - * Delete the provided volume. + * Get a list of volumes in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return a list of volumes in the provided subscription as paginated response with {@link PagedIterable}. */ - OperationStatusResult deleteByResourceGroup(String resourceGroupName, String volumeName); + PagedIterable list(); /** - * Delete the volume. - * - * Delete the provided volume. + * Get a list of volumes in the provided subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param ifMatch The ETag of the transformation. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new record set to be created, but to prevent updating an existing - * resource. Other values will result in error from server as they are not supported. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param skipToken The opaque token that the server returns to indicate where to continue listing resources from. + * This is used for paging through large result sets. * @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. + * @return a list of volumes in the provided subscription as paginated response with {@link PagedIterable}. */ - OperationStatusResult delete(String resourceGroupName, String volumeName, String ifMatch, String ifNoneMatch, - Context context); + PagedIterable list(Integer top, String skipToken, Context context); /** - * Retrieve the volume. - * * Get properties of the provided volume. * * @param id the resource ID. @@ -146,8 +125,6 @@ OperationStatusResult delete(String resourceGroupName, String volumeName, String Volume getById(String id); /** - * Retrieve the volume. - * * Get properties of the provided volume. * * @param id the resource ID. @@ -160,21 +137,16 @@ OperationStatusResult delete(String resourceGroupName, String volumeName, String Response getByIdWithResponse(String id, Context context); /** - * Delete the volume. - * * Delete the provided volume. * * @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 current status of an async operation. */ - OperationStatusResult deleteById(String id); + void deleteById(String id); /** - * Delete the volume. - * * Delete the provided volume. * * @param id the resource ID. @@ -186,9 +158,8 @@ OperationStatusResult delete(String resourceGroupName, String volumeName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); + void deleteByIdWithResponse(String id, String ifMatch, String ifNoneMatch, Context context); /** * Begins definition for a new Volume resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VulnerabilityScanningSettings.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VulnerabilityScanningSettings.java index 9246b131b463..583f7d9ad439 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VulnerabilityScanningSettings.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VulnerabilityScanningSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -48,14 +48,6 @@ public VulnerabilityScanningSettings withContainerScan(VulnerabilityScanningSett return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VulnerabilityScanningSettingsContainerScan.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VulnerabilityScanningSettingsContainerScan.java index afae3c89c591..bf116a5285b8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VulnerabilityScanningSettingsContainerScan.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VulnerabilityScanningSettingsContainerScan.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -13,12 +13,12 @@ public final class VulnerabilityScanningSettingsContainerScan extends ExpandableStringEnum { /** - * Static value Disabled for VulnerabilityScanningSettingsContainerScan. + * Disable container vulnerability scanning for the cluster. */ public static final VulnerabilityScanningSettingsContainerScan DISABLED = fromString("Disabled"); /** - * Static value Enabled for VulnerabilityScanningSettingsContainerScan. + * Enable container vulnerability scanning for the cluster. */ public static final VulnerabilityScanningSettingsContainerScan ENABLED = fromString("Enabled"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VulnerabilityScanningSettingsPatch.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VulnerabilityScanningSettingsPatch.java index d42319cf9b52..7e7581828b8e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VulnerabilityScanningSettingsPatch.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/VulnerabilityScanningSettingsPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -49,14 +49,6 @@ public VulnerabilityScanningSettingsContainerScan containerScan() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/WorkloadImpact.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/WorkloadImpact.java index a7543635a4dd..7c812f7f6ebc 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/WorkloadImpact.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/WorkloadImpact.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.models; @@ -12,12 +12,12 @@ */ public final class WorkloadImpact extends ExpandableStringEnum { /** - * Static value True for WorkloadImpact. + * The workload will be impacted during the upgrade. */ public static final WorkloadImpact TRUE = fromString("True"); /** - * Static value False for WorkloadImpact. + * The workload will not be impacted during the upgrade. */ public static final WorkloadImpact FALSE = fromString("False"); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/package-info.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/package-info.java index 0ec6bca3ff1e..1691093f8f65 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/package-info.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/models/package-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the data models for NetworkCloud. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/package-info.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/package-info.java index 52ff4bc1001a..140ff9f8e8e7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/package-info.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/package-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the classes for NetworkCloud. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/module-info.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/module-info.java index 93b0a8696655..b9e85a374d1d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/module-info.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.networkcloud { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.networkcloud.fluent.models to com.azure.core; opens com.azure.resourcemanager.networkcloud.models to com.azure.core; + opens com.azure.resourcemanager.networkcloud.implementation.models to com.azure.core; } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/resources/META-INF/azure-resourcemanager-networkcloud_metadata.json b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/resources/META-INF/azure-resourcemanager-networkcloud_metadata.json new file mode 100644 index 000000000000..7b0e2057c9a8 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/resources/META-INF/azure-resourcemanager-networkcloud_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersions":{"Microsoft.NetworkCloud":"2026-05-01-preview"},"crossLanguageDefinitions":{"com.azure.resourcemanager.networkcloud.fluent.AccessBridgesClient":"Microsoft.NetworkCloud.AccessBridges","com.azure.resourcemanager.networkcloud.fluent.AccessBridgesClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.AccessBridges.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.AccessBridgesClient.beginDelete":"Microsoft.NetworkCloud.AccessBridges.delete","com.azure.resourcemanager.networkcloud.fluent.AccessBridgesClient.beginUpdate":"Microsoft.NetworkCloud.AccessBridges.update","com.azure.resourcemanager.networkcloud.fluent.AccessBridgesClient.createOrUpdate":"Microsoft.NetworkCloud.AccessBridges.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.AccessBridgesClient.delete":"Microsoft.NetworkCloud.AccessBridges.delete","com.azure.resourcemanager.networkcloud.fluent.AccessBridgesClient.getByResourceGroup":"Microsoft.NetworkCloud.AccessBridges.get","com.azure.resourcemanager.networkcloud.fluent.AccessBridgesClient.getByResourceGroupWithResponse":"Microsoft.NetworkCloud.AccessBridges.get","com.azure.resourcemanager.networkcloud.fluent.AccessBridgesClient.list":"Microsoft.NetworkCloud.AccessBridges.listBySubscription","com.azure.resourcemanager.networkcloud.fluent.AccessBridgesClient.listByResourceGroup":"Microsoft.NetworkCloud.AccessBridges.listByResourceGroup","com.azure.resourcemanager.networkcloud.fluent.AccessBridgesClient.update":"Microsoft.NetworkCloud.AccessBridges.update","com.azure.resourcemanager.networkcloud.fluent.AgentPoolsClient":"Microsoft.NetworkCloud.AgentPools","com.azure.resourcemanager.networkcloud.fluent.AgentPoolsClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.AgentPools.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.AgentPoolsClient.beginDelete":"Microsoft.NetworkCloud.AgentPools.delete","com.azure.resourcemanager.networkcloud.fluent.AgentPoolsClient.beginUpdate":"Microsoft.NetworkCloud.AgentPools.update","com.azure.resourcemanager.networkcloud.fluent.AgentPoolsClient.createOrUpdate":"Microsoft.NetworkCloud.AgentPools.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.AgentPoolsClient.delete":"Microsoft.NetworkCloud.AgentPools.delete","com.azure.resourcemanager.networkcloud.fluent.AgentPoolsClient.get":"Microsoft.NetworkCloud.AgentPools.get","com.azure.resourcemanager.networkcloud.fluent.AgentPoolsClient.getWithResponse":"Microsoft.NetworkCloud.AgentPools.get","com.azure.resourcemanager.networkcloud.fluent.AgentPoolsClient.listByKubernetesCluster":"Microsoft.NetworkCloud.AgentPools.listByKubernetesCluster","com.azure.resourcemanager.networkcloud.fluent.AgentPoolsClient.update":"Microsoft.NetworkCloud.AgentPools.update","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachineKeySetsClient":"Microsoft.NetworkCloud.BareMetalMachineKeySets","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachineKeySetsClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.BareMetalMachineKeySets.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachineKeySetsClient.beginDelete":"Microsoft.NetworkCloud.BareMetalMachineKeySets.delete","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachineKeySetsClient.beginUpdate":"Microsoft.NetworkCloud.BareMetalMachineKeySets.update","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachineKeySetsClient.createOrUpdate":"Microsoft.NetworkCloud.BareMetalMachineKeySets.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachineKeySetsClient.delete":"Microsoft.NetworkCloud.BareMetalMachineKeySets.delete","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachineKeySetsClient.get":"Microsoft.NetworkCloud.BareMetalMachineKeySets.get","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachineKeySetsClient.getWithResponse":"Microsoft.NetworkCloud.BareMetalMachineKeySets.get","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachineKeySetsClient.listByCluster":"Microsoft.NetworkCloud.BareMetalMachineKeySets.listByCluster","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachineKeySetsClient.update":"Microsoft.NetworkCloud.BareMetalMachineKeySets.update","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient":"Microsoft.NetworkCloud.BareMetalMachines","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.beginCordon":"Microsoft.NetworkCloud.BareMetalMachines.cordon","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.BareMetalMachines.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.beginDelete":"Microsoft.NetworkCloud.BareMetalMachines.delete","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.beginPowerOff":"Microsoft.NetworkCloud.BareMetalMachines.powerOff","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.beginReimage":"Microsoft.NetworkCloud.BareMetalMachines.reimage","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.beginReplace":"Microsoft.NetworkCloud.BareMetalMachines.replace","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.beginRestart":"Microsoft.NetworkCloud.BareMetalMachines.restart","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.beginRunCommand":"Microsoft.NetworkCloud.BareMetalMachines.runCommand","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.beginRunDataExtracts":"Microsoft.NetworkCloud.BareMetalMachines.runDataExtracts","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.beginRunDataExtractsRestricted":"Microsoft.NetworkCloud.BareMetalMachines.runDataExtractsRestricted","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.beginRunReadCommands":"Microsoft.NetworkCloud.BareMetalMachines.runReadCommands","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.beginStart":"Microsoft.NetworkCloud.BareMetalMachines.start","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.beginUncordon":"Microsoft.NetworkCloud.BareMetalMachines.uncordon","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.beginUpdate":"Microsoft.NetworkCloud.BareMetalMachines.update","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.cordon":"Microsoft.NetworkCloud.BareMetalMachines.cordon","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.createOrUpdate":"Microsoft.NetworkCloud.BareMetalMachines.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.delete":"Microsoft.NetworkCloud.BareMetalMachines.delete","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.getByResourceGroup":"Microsoft.NetworkCloud.BareMetalMachines.get","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.getByResourceGroupWithResponse":"Microsoft.NetworkCloud.BareMetalMachines.get","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.list":"Microsoft.NetworkCloud.BareMetalMachines.listBySubscription","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.listByResourceGroup":"Microsoft.NetworkCloud.BareMetalMachines.listByResourceGroup","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.powerOff":"Microsoft.NetworkCloud.BareMetalMachines.powerOff","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.reimage":"Microsoft.NetworkCloud.BareMetalMachines.reimage","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.replace":"Microsoft.NetworkCloud.BareMetalMachines.replace","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.restart":"Microsoft.NetworkCloud.BareMetalMachines.restart","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.runCommand":"Microsoft.NetworkCloud.BareMetalMachines.runCommand","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.runDataExtracts":"Microsoft.NetworkCloud.BareMetalMachines.runDataExtracts","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.runDataExtractsRestricted":"Microsoft.NetworkCloud.BareMetalMachines.runDataExtractsRestricted","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.runReadCommands":"Microsoft.NetworkCloud.BareMetalMachines.runReadCommands","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.start":"Microsoft.NetworkCloud.BareMetalMachines.start","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.uncordon":"Microsoft.NetworkCloud.BareMetalMachines.uncordon","com.azure.resourcemanager.networkcloud.fluent.BareMetalMachinesClient.update":"Microsoft.NetworkCloud.BareMetalMachines.update","com.azure.resourcemanager.networkcloud.fluent.BmcKeySetsClient":"Microsoft.NetworkCloud.BmcKeySets","com.azure.resourcemanager.networkcloud.fluent.BmcKeySetsClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.BmcKeySets.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.BmcKeySetsClient.beginDelete":"Microsoft.NetworkCloud.BmcKeySets.delete","com.azure.resourcemanager.networkcloud.fluent.BmcKeySetsClient.beginUpdate":"Microsoft.NetworkCloud.BmcKeySets.update","com.azure.resourcemanager.networkcloud.fluent.BmcKeySetsClient.createOrUpdate":"Microsoft.NetworkCloud.BmcKeySets.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.BmcKeySetsClient.delete":"Microsoft.NetworkCloud.BmcKeySets.delete","com.azure.resourcemanager.networkcloud.fluent.BmcKeySetsClient.get":"Microsoft.NetworkCloud.BmcKeySets.get","com.azure.resourcemanager.networkcloud.fluent.BmcKeySetsClient.getWithResponse":"Microsoft.NetworkCloud.BmcKeySets.get","com.azure.resourcemanager.networkcloud.fluent.BmcKeySetsClient.listByCluster":"Microsoft.NetworkCloud.BmcKeySets.listByCluster","com.azure.resourcemanager.networkcloud.fluent.BmcKeySetsClient.update":"Microsoft.NetworkCloud.BmcKeySets.update","com.azure.resourcemanager.networkcloud.fluent.CloudServicesNetworksClient":"Microsoft.NetworkCloud.CloudServicesNetworks","com.azure.resourcemanager.networkcloud.fluent.CloudServicesNetworksClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.CloudServicesNetworks.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.CloudServicesNetworksClient.beginDelete":"Microsoft.NetworkCloud.CloudServicesNetworks.delete","com.azure.resourcemanager.networkcloud.fluent.CloudServicesNetworksClient.beginUpdate":"Microsoft.NetworkCloud.CloudServicesNetworks.update","com.azure.resourcemanager.networkcloud.fluent.CloudServicesNetworksClient.createOrUpdate":"Microsoft.NetworkCloud.CloudServicesNetworks.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.CloudServicesNetworksClient.delete":"Microsoft.NetworkCloud.CloudServicesNetworks.delete","com.azure.resourcemanager.networkcloud.fluent.CloudServicesNetworksClient.getByResourceGroup":"Microsoft.NetworkCloud.CloudServicesNetworks.get","com.azure.resourcemanager.networkcloud.fluent.CloudServicesNetworksClient.getByResourceGroupWithResponse":"Microsoft.NetworkCloud.CloudServicesNetworks.get","com.azure.resourcemanager.networkcloud.fluent.CloudServicesNetworksClient.list":"Microsoft.NetworkCloud.CloudServicesNetworks.listBySubscription","com.azure.resourcemanager.networkcloud.fluent.CloudServicesNetworksClient.listByResourceGroup":"Microsoft.NetworkCloud.CloudServicesNetworks.listByResourceGroup","com.azure.resourcemanager.networkcloud.fluent.CloudServicesNetworksClient.update":"Microsoft.NetworkCloud.CloudServicesNetworks.update","com.azure.resourcemanager.networkcloud.fluent.ClusterManagersClient":"Microsoft.NetworkCloud.ClusterManagers","com.azure.resourcemanager.networkcloud.fluent.ClusterManagersClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.ClusterManagers.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.ClusterManagersClient.beginDelete":"Microsoft.NetworkCloud.ClusterManagers.delete","com.azure.resourcemanager.networkcloud.fluent.ClusterManagersClient.beginUpdateRelayPrivateEndpointConnection":"Microsoft.NetworkCloud.ClusterManagers.updateRelayPrivateEndpointConnection","com.azure.resourcemanager.networkcloud.fluent.ClusterManagersClient.createOrUpdate":"Microsoft.NetworkCloud.ClusterManagers.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.ClusterManagersClient.delete":"Microsoft.NetworkCloud.ClusterManagers.delete","com.azure.resourcemanager.networkcloud.fluent.ClusterManagersClient.getByResourceGroup":"Microsoft.NetworkCloud.ClusterManagers.get","com.azure.resourcemanager.networkcloud.fluent.ClusterManagersClient.getByResourceGroupWithResponse":"Microsoft.NetworkCloud.ClusterManagers.get","com.azure.resourcemanager.networkcloud.fluent.ClusterManagersClient.list":"Microsoft.NetworkCloud.ClusterManagers.listBySubscription","com.azure.resourcemanager.networkcloud.fluent.ClusterManagersClient.listByResourceGroup":"Microsoft.NetworkCloud.ClusterManagers.listByResourceGroup","com.azure.resourcemanager.networkcloud.fluent.ClusterManagersClient.update":"Microsoft.NetworkCloud.ClusterManagers.update","com.azure.resourcemanager.networkcloud.fluent.ClusterManagersClient.updateRelayPrivateEndpointConnection":"Microsoft.NetworkCloud.ClusterManagers.updateRelayPrivateEndpointConnection","com.azure.resourcemanager.networkcloud.fluent.ClusterManagersClient.updateWithResponse":"Microsoft.NetworkCloud.ClusterManagers.update","com.azure.resourcemanager.networkcloud.fluent.ClustersClient":"Microsoft.NetworkCloud.Clusters","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.beginContinueUpdateVersion":"Microsoft.NetworkCloud.Clusters.continueUpdateVersion","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.Clusters.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.beginDelete":"Microsoft.NetworkCloud.Clusters.delete","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.beginDeploy":"Microsoft.NetworkCloud.Clusters.deploy","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.beginInspect":"Microsoft.NetworkCloud.Clusters.inspect","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.beginRotateCredential":"Microsoft.NetworkCloud.Clusters.rotateCredential","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.beginScanRuntime":"Microsoft.NetworkCloud.Clusters.scanRuntime","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.beginUpdate":"Microsoft.NetworkCloud.Clusters.update","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.beginUpdateVersion":"Microsoft.NetworkCloud.Clusters.updateVersion","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.continueUpdateVersion":"Microsoft.NetworkCloud.Clusters.continueUpdateVersion","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.createOrUpdate":"Microsoft.NetworkCloud.Clusters.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.delete":"Microsoft.NetworkCloud.Clusters.delete","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.deploy":"Microsoft.NetworkCloud.Clusters.deploy","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.getByResourceGroup":"Microsoft.NetworkCloud.Clusters.get","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.getByResourceGroupWithResponse":"Microsoft.NetworkCloud.Clusters.get","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.inspect":"Microsoft.NetworkCloud.Clusters.inspect","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.list":"Microsoft.NetworkCloud.Clusters.listBySubscription","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.listByResourceGroup":"Microsoft.NetworkCloud.Clusters.listByResourceGroup","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.rotateCredential":"Microsoft.NetworkCloud.Clusters.rotateCredential","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.scanRuntime":"Microsoft.NetworkCloud.Clusters.scanRuntime","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.update":"Microsoft.NetworkCloud.Clusters.update","com.azure.resourcemanager.networkcloud.fluent.ClustersClient.updateVersion":"Microsoft.NetworkCloud.Clusters.updateVersion","com.azure.resourcemanager.networkcloud.fluent.ConsolesClient":"Microsoft.NetworkCloud.Consoles","com.azure.resourcemanager.networkcloud.fluent.ConsolesClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.Consoles.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.ConsolesClient.beginDelete":"Microsoft.NetworkCloud.Consoles.delete","com.azure.resourcemanager.networkcloud.fluent.ConsolesClient.beginUpdate":"Microsoft.NetworkCloud.Consoles.update","com.azure.resourcemanager.networkcloud.fluent.ConsolesClient.createOrUpdate":"Microsoft.NetworkCloud.Consoles.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.ConsolesClient.delete":"Microsoft.NetworkCloud.Consoles.delete","com.azure.resourcemanager.networkcloud.fluent.ConsolesClient.get":"Microsoft.NetworkCloud.Consoles.get","com.azure.resourcemanager.networkcloud.fluent.ConsolesClient.getWithResponse":"Microsoft.NetworkCloud.Consoles.get","com.azure.resourcemanager.networkcloud.fluent.ConsolesClient.listByVirtualMachine":"Microsoft.NetworkCloud.Consoles.listByVirtualMachine","com.azure.resourcemanager.networkcloud.fluent.ConsolesClient.update":"Microsoft.NetworkCloud.Consoles.update","com.azure.resourcemanager.networkcloud.fluent.KubernetesClusterFeaturesClient":"Microsoft.NetworkCloud.KubernetesClusterFeatures","com.azure.resourcemanager.networkcloud.fluent.KubernetesClusterFeaturesClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.KubernetesClusterFeatures.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.KubernetesClusterFeaturesClient.beginDelete":"Microsoft.NetworkCloud.KubernetesClusterFeatures.delete","com.azure.resourcemanager.networkcloud.fluent.KubernetesClusterFeaturesClient.beginUpdate":"Microsoft.NetworkCloud.KubernetesClusterFeatures.update","com.azure.resourcemanager.networkcloud.fluent.KubernetesClusterFeaturesClient.createOrUpdate":"Microsoft.NetworkCloud.KubernetesClusterFeatures.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.KubernetesClusterFeaturesClient.delete":"Microsoft.NetworkCloud.KubernetesClusterFeatures.delete","com.azure.resourcemanager.networkcloud.fluent.KubernetesClusterFeaturesClient.get":"Microsoft.NetworkCloud.KubernetesClusterFeatures.get","com.azure.resourcemanager.networkcloud.fluent.KubernetesClusterFeaturesClient.getWithResponse":"Microsoft.NetworkCloud.KubernetesClusterFeatures.get","com.azure.resourcemanager.networkcloud.fluent.KubernetesClusterFeaturesClient.listByKubernetesCluster":"Microsoft.NetworkCloud.KubernetesClusterFeatures.listByKubernetesCluster","com.azure.resourcemanager.networkcloud.fluent.KubernetesClusterFeaturesClient.update":"Microsoft.NetworkCloud.KubernetesClusterFeatures.update","com.azure.resourcemanager.networkcloud.fluent.KubernetesClustersClient":"Microsoft.NetworkCloud.KubernetesClusters","com.azure.resourcemanager.networkcloud.fluent.KubernetesClustersClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.KubernetesClusters.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.KubernetesClustersClient.beginDelete":"Microsoft.NetworkCloud.KubernetesClusters.delete","com.azure.resourcemanager.networkcloud.fluent.KubernetesClustersClient.beginRestartNode":"Microsoft.NetworkCloud.KubernetesClusters.restartNode","com.azure.resourcemanager.networkcloud.fluent.KubernetesClustersClient.beginUpdate":"Microsoft.NetworkCloud.KubernetesClusters.update","com.azure.resourcemanager.networkcloud.fluent.KubernetesClustersClient.createOrUpdate":"Microsoft.NetworkCloud.KubernetesClusters.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.KubernetesClustersClient.delete":"Microsoft.NetworkCloud.KubernetesClusters.delete","com.azure.resourcemanager.networkcloud.fluent.KubernetesClustersClient.getByResourceGroup":"Microsoft.NetworkCloud.KubernetesClusters.get","com.azure.resourcemanager.networkcloud.fluent.KubernetesClustersClient.getByResourceGroupWithResponse":"Microsoft.NetworkCloud.KubernetesClusters.get","com.azure.resourcemanager.networkcloud.fluent.KubernetesClustersClient.list":"Microsoft.NetworkCloud.KubernetesClusters.listBySubscription","com.azure.resourcemanager.networkcloud.fluent.KubernetesClustersClient.listByResourceGroup":"Microsoft.NetworkCloud.KubernetesClusters.listByResourceGroup","com.azure.resourcemanager.networkcloud.fluent.KubernetesClustersClient.restartNode":"Microsoft.NetworkCloud.KubernetesClusters.restartNode","com.azure.resourcemanager.networkcloud.fluent.KubernetesClustersClient.update":"Microsoft.NetworkCloud.KubernetesClusters.update","com.azure.resourcemanager.networkcloud.fluent.KubernetesVersionsClient":"Microsoft.NetworkCloud.KubernetesVersions","com.azure.resourcemanager.networkcloud.fluent.KubernetesVersionsClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.KubernetesVersions.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.KubernetesVersionsClient.beginDelete":"Microsoft.NetworkCloud.KubernetesVersions.delete","com.azure.resourcemanager.networkcloud.fluent.KubernetesVersionsClient.beginUpdate":"Microsoft.NetworkCloud.KubernetesVersions.update","com.azure.resourcemanager.networkcloud.fluent.KubernetesVersionsClient.createOrUpdate":"Microsoft.NetworkCloud.KubernetesVersions.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.KubernetesVersionsClient.delete":"Microsoft.NetworkCloud.KubernetesVersions.delete","com.azure.resourcemanager.networkcloud.fluent.KubernetesVersionsClient.getByResourceGroup":"Microsoft.NetworkCloud.KubernetesVersions.get","com.azure.resourcemanager.networkcloud.fluent.KubernetesVersionsClient.getByResourceGroupWithResponse":"Microsoft.NetworkCloud.KubernetesVersions.get","com.azure.resourcemanager.networkcloud.fluent.KubernetesVersionsClient.list":"Microsoft.NetworkCloud.KubernetesVersions.listBySubscription","com.azure.resourcemanager.networkcloud.fluent.KubernetesVersionsClient.listByResourceGroup":"Microsoft.NetworkCloud.KubernetesVersions.listByResourceGroup","com.azure.resourcemanager.networkcloud.fluent.KubernetesVersionsClient.update":"Microsoft.NetworkCloud.KubernetesVersions.update","com.azure.resourcemanager.networkcloud.fluent.L2NetworksClient":"Microsoft.NetworkCloud.L2Networks","com.azure.resourcemanager.networkcloud.fluent.L2NetworksClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.L2Networks.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.L2NetworksClient.beginDelete":"Microsoft.NetworkCloud.L2Networks.delete","com.azure.resourcemanager.networkcloud.fluent.L2NetworksClient.createOrUpdate":"Microsoft.NetworkCloud.L2Networks.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.L2NetworksClient.delete":"Microsoft.NetworkCloud.L2Networks.delete","com.azure.resourcemanager.networkcloud.fluent.L2NetworksClient.getByResourceGroup":"Microsoft.NetworkCloud.L2Networks.get","com.azure.resourcemanager.networkcloud.fluent.L2NetworksClient.getByResourceGroupWithResponse":"Microsoft.NetworkCloud.L2Networks.get","com.azure.resourcemanager.networkcloud.fluent.L2NetworksClient.list":"Microsoft.NetworkCloud.L2Networks.listBySubscription","com.azure.resourcemanager.networkcloud.fluent.L2NetworksClient.listByResourceGroup":"Microsoft.NetworkCloud.L2Networks.listByResourceGroup","com.azure.resourcemanager.networkcloud.fluent.L2NetworksClient.update":"Microsoft.NetworkCloud.L2Networks.update","com.azure.resourcemanager.networkcloud.fluent.L2NetworksClient.updateWithResponse":"Microsoft.NetworkCloud.L2Networks.update","com.azure.resourcemanager.networkcloud.fluent.L3NetworksClient":"Microsoft.NetworkCloud.L3Networks","com.azure.resourcemanager.networkcloud.fluent.L3NetworksClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.L3Networks.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.L3NetworksClient.beginDelete":"Microsoft.NetworkCloud.L3Networks.delete","com.azure.resourcemanager.networkcloud.fluent.L3NetworksClient.createOrUpdate":"Microsoft.NetworkCloud.L3Networks.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.L3NetworksClient.delete":"Microsoft.NetworkCloud.L3Networks.delete","com.azure.resourcemanager.networkcloud.fluent.L3NetworksClient.getByResourceGroup":"Microsoft.NetworkCloud.L3Networks.get","com.azure.resourcemanager.networkcloud.fluent.L3NetworksClient.getByResourceGroupWithResponse":"Microsoft.NetworkCloud.L3Networks.get","com.azure.resourcemanager.networkcloud.fluent.L3NetworksClient.list":"Microsoft.NetworkCloud.L3Networks.listBySubscription","com.azure.resourcemanager.networkcloud.fluent.L3NetworksClient.listByResourceGroup":"Microsoft.NetworkCloud.L3Networks.listByResourceGroup","com.azure.resourcemanager.networkcloud.fluent.L3NetworksClient.update":"Microsoft.NetworkCloud.L3Networks.update","com.azure.resourcemanager.networkcloud.fluent.L3NetworksClient.updateWithResponse":"Microsoft.NetworkCloud.L3Networks.update","com.azure.resourcemanager.networkcloud.fluent.MetricsConfigurationsClient":"Microsoft.NetworkCloud","com.azure.resourcemanager.networkcloud.fluent.MetricsConfigurationsClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.ClusterMetricsConfigurations.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.MetricsConfigurationsClient.beginDelete":"Microsoft.NetworkCloud.ClusterMetricsConfigurations.delete","com.azure.resourcemanager.networkcloud.fluent.MetricsConfigurationsClient.beginUpdate":"Microsoft.NetworkCloud.ClusterMetricsConfigurations.update","com.azure.resourcemanager.networkcloud.fluent.MetricsConfigurationsClient.createOrUpdate":"Microsoft.NetworkCloud.ClusterMetricsConfigurations.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.MetricsConfigurationsClient.delete":"Microsoft.NetworkCloud.ClusterMetricsConfigurations.delete","com.azure.resourcemanager.networkcloud.fluent.MetricsConfigurationsClient.get":"Microsoft.NetworkCloud.ClusterMetricsConfigurations.get","com.azure.resourcemanager.networkcloud.fluent.MetricsConfigurationsClient.getWithResponse":"Microsoft.NetworkCloud.ClusterMetricsConfigurations.get","com.azure.resourcemanager.networkcloud.fluent.MetricsConfigurationsClient.listByCluster":"Microsoft.NetworkCloud.ClusterMetricsConfigurations.listByCluster","com.azure.resourcemanager.networkcloud.fluent.MetricsConfigurationsClient.update":"Microsoft.NetworkCloud.ClusterMetricsConfigurations.update","com.azure.resourcemanager.networkcloud.fluent.NetworkCloudManagementClient":"Microsoft.NetworkCloud","com.azure.resourcemanager.networkcloud.fluent.OperationsClient":"Microsoft.NetworkCloud.Operations","com.azure.resourcemanager.networkcloud.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.networkcloud.fluent.RackSkusClient":"Microsoft.NetworkCloud.RackSkus","com.azure.resourcemanager.networkcloud.fluent.RackSkusClient.get":"Microsoft.NetworkCloud.RackSkus.get","com.azure.resourcemanager.networkcloud.fluent.RackSkusClient.getWithResponse":"Microsoft.NetworkCloud.RackSkus.get","com.azure.resourcemanager.networkcloud.fluent.RackSkusClient.list":"Microsoft.NetworkCloud.RackSkus.listBySubscription","com.azure.resourcemanager.networkcloud.fluent.RacksClient":"Microsoft.NetworkCloud.Racks","com.azure.resourcemanager.networkcloud.fluent.RacksClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.Racks.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.RacksClient.beginDelete":"Microsoft.NetworkCloud.Racks.delete","com.azure.resourcemanager.networkcloud.fluent.RacksClient.beginUpdate":"Microsoft.NetworkCloud.Racks.update","com.azure.resourcemanager.networkcloud.fluent.RacksClient.createOrUpdate":"Microsoft.NetworkCloud.Racks.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.RacksClient.delete":"Microsoft.NetworkCloud.Racks.delete","com.azure.resourcemanager.networkcloud.fluent.RacksClient.getByResourceGroup":"Microsoft.NetworkCloud.Racks.get","com.azure.resourcemanager.networkcloud.fluent.RacksClient.getByResourceGroupWithResponse":"Microsoft.NetworkCloud.Racks.get","com.azure.resourcemanager.networkcloud.fluent.RacksClient.list":"Microsoft.NetworkCloud.Racks.listBySubscription","com.azure.resourcemanager.networkcloud.fluent.RacksClient.listByResourceGroup":"Microsoft.NetworkCloud.Racks.listByResourceGroup","com.azure.resourcemanager.networkcloud.fluent.RacksClient.update":"Microsoft.NetworkCloud.Racks.update","com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient":"Microsoft.NetworkCloud.StorageAppliances","com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.StorageAppliances.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient.beginDelete":"Microsoft.NetworkCloud.StorageAppliances.delete","com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient.beginDisableRemoteVendorManagement":"Microsoft.NetworkCloud.StorageAppliances.disableRemoteVendorManagement","com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient.beginEnableRemoteVendorManagement":"Microsoft.NetworkCloud.StorageAppliances.enableRemoteVendorManagement","com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient.beginRunReadCommands":"Microsoft.NetworkCloud.StorageAppliances.runReadCommands","com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient.beginUpdate":"Microsoft.NetworkCloud.StorageAppliances.update","com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient.createOrUpdate":"Microsoft.NetworkCloud.StorageAppliances.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient.delete":"Microsoft.NetworkCloud.StorageAppliances.delete","com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient.disableRemoteVendorManagement":"Microsoft.NetworkCloud.StorageAppliances.disableRemoteVendorManagement","com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient.enableRemoteVendorManagement":"Microsoft.NetworkCloud.StorageAppliances.enableRemoteVendorManagement","com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient.getByResourceGroup":"Microsoft.NetworkCloud.StorageAppliances.get","com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient.getByResourceGroupWithResponse":"Microsoft.NetworkCloud.StorageAppliances.get","com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient.list":"Microsoft.NetworkCloud.StorageAppliances.listBySubscription","com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient.listByResourceGroup":"Microsoft.NetworkCloud.StorageAppliances.listByResourceGroup","com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient.runReadCommands":"Microsoft.NetworkCloud.StorageAppliances.runReadCommands","com.azure.resourcemanager.networkcloud.fluent.StorageAppliancesClient.update":"Microsoft.NetworkCloud.StorageAppliances.update","com.azure.resourcemanager.networkcloud.fluent.TrunkedNetworksClient":"Microsoft.NetworkCloud.TrunkedNetworks","com.azure.resourcemanager.networkcloud.fluent.TrunkedNetworksClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.TrunkedNetworks.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.TrunkedNetworksClient.beginDelete":"Microsoft.NetworkCloud.TrunkedNetworks.delete","com.azure.resourcemanager.networkcloud.fluent.TrunkedNetworksClient.createOrUpdate":"Microsoft.NetworkCloud.TrunkedNetworks.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.TrunkedNetworksClient.delete":"Microsoft.NetworkCloud.TrunkedNetworks.delete","com.azure.resourcemanager.networkcloud.fluent.TrunkedNetworksClient.getByResourceGroup":"Microsoft.NetworkCloud.TrunkedNetworks.get","com.azure.resourcemanager.networkcloud.fluent.TrunkedNetworksClient.getByResourceGroupWithResponse":"Microsoft.NetworkCloud.TrunkedNetworks.get","com.azure.resourcemanager.networkcloud.fluent.TrunkedNetworksClient.list":"Microsoft.NetworkCloud.TrunkedNetworks.listBySubscription","com.azure.resourcemanager.networkcloud.fluent.TrunkedNetworksClient.listByResourceGroup":"Microsoft.NetworkCloud.TrunkedNetworks.listByResourceGroup","com.azure.resourcemanager.networkcloud.fluent.TrunkedNetworksClient.update":"Microsoft.NetworkCloud.TrunkedNetworks.update","com.azure.resourcemanager.networkcloud.fluent.TrunkedNetworksClient.updateWithResponse":"Microsoft.NetworkCloud.TrunkedNetworks.update","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient":"Microsoft.NetworkCloud.VirtualMachines","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.assignRelay":"Microsoft.NetworkCloud.VirtualMachines.assignRelay","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.beginAssignRelay":"Microsoft.NetworkCloud.VirtualMachines.assignRelay","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.VirtualMachines.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.beginDelete":"Microsoft.NetworkCloud.VirtualMachines.delete","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.beginPowerOff":"Microsoft.NetworkCloud.VirtualMachines.powerOff","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.beginReimage":"Microsoft.NetworkCloud.VirtualMachines.reimage","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.beginRestart":"Microsoft.NetworkCloud.VirtualMachines.restart","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.beginStart":"Microsoft.NetworkCloud.VirtualMachines.start","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.beginUpdate":"Microsoft.NetworkCloud.VirtualMachines.update","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.createOrUpdate":"Microsoft.NetworkCloud.VirtualMachines.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.delete":"Microsoft.NetworkCloud.VirtualMachines.delete","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.getByResourceGroup":"Microsoft.NetworkCloud.VirtualMachines.get","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.getByResourceGroupWithResponse":"Microsoft.NetworkCloud.VirtualMachines.get","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.list":"Microsoft.NetworkCloud.VirtualMachines.listBySubscription","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.listByResourceGroup":"Microsoft.NetworkCloud.VirtualMachines.listByResourceGroup","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.powerOff":"Microsoft.NetworkCloud.VirtualMachines.powerOff","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.reimage":"Microsoft.NetworkCloud.VirtualMachines.reimage","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.restart":"Microsoft.NetworkCloud.VirtualMachines.restart","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.start":"Microsoft.NetworkCloud.VirtualMachines.start","com.azure.resourcemanager.networkcloud.fluent.VirtualMachinesClient.update":"Microsoft.NetworkCloud.VirtualMachines.update","com.azure.resourcemanager.networkcloud.fluent.VolumesClient":"Microsoft.NetworkCloud.Volumes","com.azure.resourcemanager.networkcloud.fluent.VolumesClient.beginCreateOrUpdate":"Microsoft.NetworkCloud.Volumes.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.VolumesClient.beginDelete":"Microsoft.NetworkCloud.Volumes.delete","com.azure.resourcemanager.networkcloud.fluent.VolumesClient.createOrUpdate":"Microsoft.NetworkCloud.Volumes.createOrUpdate","com.azure.resourcemanager.networkcloud.fluent.VolumesClient.delete":"Microsoft.NetworkCloud.Volumes.delete","com.azure.resourcemanager.networkcloud.fluent.VolumesClient.getByResourceGroup":"Microsoft.NetworkCloud.Volumes.get","com.azure.resourcemanager.networkcloud.fluent.VolumesClient.getByResourceGroupWithResponse":"Microsoft.NetworkCloud.Volumes.get","com.azure.resourcemanager.networkcloud.fluent.VolumesClient.list":"Microsoft.NetworkCloud.Volumes.listBySubscription","com.azure.resourcemanager.networkcloud.fluent.VolumesClient.listByResourceGroup":"Microsoft.NetworkCloud.Volumes.listByResourceGroup","com.azure.resourcemanager.networkcloud.fluent.VolumesClient.update":"Microsoft.NetworkCloud.Volumes.update","com.azure.resourcemanager.networkcloud.fluent.VolumesClient.updateWithResponse":"Microsoft.NetworkCloud.Volumes.update","com.azure.resourcemanager.networkcloud.fluent.models.AccessBridgeInner":"Microsoft.NetworkCloud.AccessBridge","com.azure.resourcemanager.networkcloud.fluent.models.AccessBridgeProperties":"Microsoft.NetworkCloud.AccessBridgeProperties","com.azure.resourcemanager.networkcloud.fluent.models.AgentPoolInner":"Microsoft.NetworkCloud.AgentPool","com.azure.resourcemanager.networkcloud.fluent.models.AgentPoolPatchProperties":"Microsoft.NetworkCloud.AgentPoolPatchProperties","com.azure.resourcemanager.networkcloud.fluent.models.AgentPoolProperties":"Microsoft.NetworkCloud.AgentPoolProperties","com.azure.resourcemanager.networkcloud.fluent.models.BareMetalMachineInner":"Microsoft.NetworkCloud.BareMetalMachine","com.azure.resourcemanager.networkcloud.fluent.models.BareMetalMachineKeySetInner":"Microsoft.NetworkCloud.BareMetalMachineKeySet","com.azure.resourcemanager.networkcloud.fluent.models.BareMetalMachineKeySetPatchProperties":"Microsoft.NetworkCloud.BareMetalMachineKeySetPatchProperties","com.azure.resourcemanager.networkcloud.fluent.models.BareMetalMachineKeySetProperties":"Microsoft.NetworkCloud.BareMetalMachineKeySetProperties","com.azure.resourcemanager.networkcloud.fluent.models.BareMetalMachinePatchProperties":"Microsoft.NetworkCloud.BareMetalMachinePatchProperties","com.azure.resourcemanager.networkcloud.fluent.models.BareMetalMachineProperties":"Microsoft.NetworkCloud.BareMetalMachineProperties","com.azure.resourcemanager.networkcloud.fluent.models.BmcKeySetInner":"Microsoft.NetworkCloud.BmcKeySet","com.azure.resourcemanager.networkcloud.fluent.models.BmcKeySetPatchProperties":"Microsoft.NetworkCloud.BmcKeySetPatchProperties","com.azure.resourcemanager.networkcloud.fluent.models.BmcKeySetProperties":"Microsoft.NetworkCloud.BmcKeySetProperties","com.azure.resourcemanager.networkcloud.fluent.models.CloudServicesNetworkInner":"Microsoft.NetworkCloud.CloudServicesNetwork","com.azure.resourcemanager.networkcloud.fluent.models.CloudServicesNetworkPatchProperties":"Microsoft.NetworkCloud.CloudServicesNetworkPatchProperties","com.azure.resourcemanager.networkcloud.fluent.models.CloudServicesNetworkProperties":"Microsoft.NetworkCloud.CloudServicesNetworkProperties","com.azure.resourcemanager.networkcloud.fluent.models.ClusterInner":"Microsoft.NetworkCloud.Cluster","com.azure.resourcemanager.networkcloud.fluent.models.ClusterManagerInner":"Microsoft.NetworkCloud.ClusterManager","com.azure.resourcemanager.networkcloud.fluent.models.ClusterManagerProperties":"Microsoft.NetworkCloud.ClusterManagerProperties","com.azure.resourcemanager.networkcloud.fluent.models.ClusterMetricsConfigurationInner":"Microsoft.NetworkCloud.ClusterMetricsConfiguration","com.azure.resourcemanager.networkcloud.fluent.models.ClusterMetricsConfigurationPatchProperties":"Microsoft.NetworkCloud.ClusterMetricsConfigurationPatchProperties","com.azure.resourcemanager.networkcloud.fluent.models.ClusterMetricsConfigurationProperties":"Microsoft.NetworkCloud.ClusterMetricsConfigurationProperties","com.azure.resourcemanager.networkcloud.fluent.models.ClusterPatchProperties":"Microsoft.NetworkCloud.ClusterPatchProperties","com.azure.resourcemanager.networkcloud.fluent.models.ClusterProperties":"Microsoft.NetworkCloud.ClusterProperties","com.azure.resourcemanager.networkcloud.fluent.models.ConsoleInner":"Microsoft.NetworkCloud.Console","com.azure.resourcemanager.networkcloud.fluent.models.ConsolePatchProperties":"Microsoft.NetworkCloud.ConsolePatchProperties","com.azure.resourcemanager.networkcloud.fluent.models.ConsoleProperties":"Microsoft.NetworkCloud.ConsoleProperties","com.azure.resourcemanager.networkcloud.fluent.models.KubernetesClusterFeatureInner":"Microsoft.NetworkCloud.KubernetesClusterFeature","com.azure.resourcemanager.networkcloud.fluent.models.KubernetesClusterFeaturePatchProperties":"Microsoft.NetworkCloud.KubernetesClusterFeaturePatchProperties","com.azure.resourcemanager.networkcloud.fluent.models.KubernetesClusterFeatureProperties":"Microsoft.NetworkCloud.KubernetesClusterFeatureProperties","com.azure.resourcemanager.networkcloud.fluent.models.KubernetesClusterInner":"Microsoft.NetworkCloud.KubernetesCluster","com.azure.resourcemanager.networkcloud.fluent.models.KubernetesClusterPatchProperties":"Microsoft.NetworkCloud.KubernetesClusterPatchProperties","com.azure.resourcemanager.networkcloud.fluent.models.KubernetesClusterProperties":"Microsoft.NetworkCloud.KubernetesClusterProperties","com.azure.resourcemanager.networkcloud.fluent.models.KubernetesVersionInner":"Microsoft.NetworkCloud.KubernetesVersion","com.azure.resourcemanager.networkcloud.fluent.models.KubernetesVersionProperties":"Microsoft.NetworkCloud.KubernetesVersionProperties","com.azure.resourcemanager.networkcloud.fluent.models.L2NetworkInner":"Microsoft.NetworkCloud.L2Network","com.azure.resourcemanager.networkcloud.fluent.models.L2NetworkProperties":"Microsoft.NetworkCloud.L2NetworkProperties","com.azure.resourcemanager.networkcloud.fluent.models.L3NetworkInner":"Microsoft.NetworkCloud.L3Network","com.azure.resourcemanager.networkcloud.fluent.models.L3NetworkProperties":"Microsoft.NetworkCloud.L3NetworkProperties","com.azure.resourcemanager.networkcloud.fluent.models.MachineSkuProperties":"Microsoft.NetworkCloud.MachineSkuProperties","com.azure.resourcemanager.networkcloud.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.networkcloud.fluent.models.OperationStatusResultProperties":"Microsoft.NetworkCloud.OperationStatusResultProperties","com.azure.resourcemanager.networkcloud.fluent.models.RackInner":"Microsoft.NetworkCloud.Rack","com.azure.resourcemanager.networkcloud.fluent.models.RackProperties":"Microsoft.NetworkCloud.RackProperties","com.azure.resourcemanager.networkcloud.fluent.models.RackSkuInner":"Microsoft.NetworkCloud.RackSku","com.azure.resourcemanager.networkcloud.fluent.models.RackSkuProperties":"Microsoft.NetworkCloud.RackSkuProperties","com.azure.resourcemanager.networkcloud.fluent.models.RacksPatchProperties":"Microsoft.NetworkCloud.RacksPatchProperties","com.azure.resourcemanager.networkcloud.fluent.models.StorageApplianceInner":"Microsoft.NetworkCloud.StorageAppliance","com.azure.resourcemanager.networkcloud.fluent.models.StorageAppliancePatchProperties":"Microsoft.NetworkCloud.StorageAppliancePatchProperties","com.azure.resourcemanager.networkcloud.fluent.models.StorageApplianceProperties":"Microsoft.NetworkCloud.StorageApplianceProperties","com.azure.resourcemanager.networkcloud.fluent.models.StorageApplianceSkuProperties":"Microsoft.NetworkCloud.StorageApplianceSkuProperties","com.azure.resourcemanager.networkcloud.fluent.models.TrunkedNetworkInner":"Microsoft.NetworkCloud.TrunkedNetwork","com.azure.resourcemanager.networkcloud.fluent.models.TrunkedNetworkProperties":"Microsoft.NetworkCloud.TrunkedNetworkProperties","com.azure.resourcemanager.networkcloud.fluent.models.VirtualMachineInner":"Microsoft.NetworkCloud.VirtualMachine","com.azure.resourcemanager.networkcloud.fluent.models.VirtualMachinePatchProperties":"Microsoft.NetworkCloud.VirtualMachinePatchProperties","com.azure.resourcemanager.networkcloud.fluent.models.VirtualMachineProperties":"Microsoft.NetworkCloud.VirtualMachineProperties","com.azure.resourcemanager.networkcloud.fluent.models.VolumeInner":"Microsoft.NetworkCloud.Volume","com.azure.resourcemanager.networkcloud.fluent.models.VolumeProperties":"Microsoft.NetworkCloud.VolumeProperties","com.azure.resourcemanager.networkcloud.implementation.NetworkCloudManagementClientBuilder":"Microsoft.NetworkCloud","com.azure.resourcemanager.networkcloud.implementation.models.AccessBridgeList":"Microsoft.NetworkCloud.AccessBridgeList","com.azure.resourcemanager.networkcloud.implementation.models.AgentPoolList":"Microsoft.NetworkCloud.AgentPoolList","com.azure.resourcemanager.networkcloud.implementation.models.BareMetalMachineKeySetList":"Microsoft.NetworkCloud.BareMetalMachineKeySetList","com.azure.resourcemanager.networkcloud.implementation.models.BareMetalMachineList":"Microsoft.NetworkCloud.BareMetalMachineList","com.azure.resourcemanager.networkcloud.implementation.models.BmcKeySetList":"Microsoft.NetworkCloud.BmcKeySetList","com.azure.resourcemanager.networkcloud.implementation.models.CloudServicesNetworkList":"Microsoft.NetworkCloud.CloudServicesNetworkList","com.azure.resourcemanager.networkcloud.implementation.models.ClusterList":"Microsoft.NetworkCloud.ClusterList","com.azure.resourcemanager.networkcloud.implementation.models.ClusterManagerList":"Microsoft.NetworkCloud.ClusterManagerList","com.azure.resourcemanager.networkcloud.implementation.models.ClusterMetricsConfigurationList":"Microsoft.NetworkCloud.ClusterMetricsConfigurationList","com.azure.resourcemanager.networkcloud.implementation.models.ConsoleList":"Microsoft.NetworkCloud.ConsoleList","com.azure.resourcemanager.networkcloud.implementation.models.KubernetesClusterFeatureList":"Microsoft.NetworkCloud.KubernetesClusterFeatureList","com.azure.resourcemanager.networkcloud.implementation.models.KubernetesClusterList":"Microsoft.NetworkCloud.KubernetesClusterList","com.azure.resourcemanager.networkcloud.implementation.models.KubernetesVersionList":"Microsoft.NetworkCloud.KubernetesVersionList","com.azure.resourcemanager.networkcloud.implementation.models.L2NetworkList":"Microsoft.NetworkCloud.L2NetworkList","com.azure.resourcemanager.networkcloud.implementation.models.L3NetworkList":"Microsoft.NetworkCloud.L3NetworkList","com.azure.resourcemanager.networkcloud.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.networkcloud.implementation.models.RackList":"Microsoft.NetworkCloud.RackList","com.azure.resourcemanager.networkcloud.implementation.models.RackSkuList":"Microsoft.NetworkCloud.RackSkuList","com.azure.resourcemanager.networkcloud.implementation.models.StorageApplianceList":"Microsoft.NetworkCloud.StorageApplianceList","com.azure.resourcemanager.networkcloud.implementation.models.TrunkedNetworkList":"Microsoft.NetworkCloud.TrunkedNetworkList","com.azure.resourcemanager.networkcloud.implementation.models.VirtualMachineList":"Microsoft.NetworkCloud.VirtualMachineList","com.azure.resourcemanager.networkcloud.implementation.models.VolumeList":"Microsoft.NetworkCloud.VolumeList","com.azure.resourcemanager.networkcloud.models.AadConfiguration":"Microsoft.NetworkCloud.AadConfiguration","com.azure.resourcemanager.networkcloud.models.AccessBridgeAllowedName":"Microsoft.NetworkCloud.AccessBridgeAllowedName","com.azure.resourcemanager.networkcloud.models.AccessBridgeDetailedStatus":"Microsoft.NetworkCloud.AccessBridgeDetailedStatus","com.azure.resourcemanager.networkcloud.models.AccessBridgeEndpoint":"Microsoft.NetworkCloud.AccessBridgeEndpoint","com.azure.resourcemanager.networkcloud.models.AccessBridgePatchParameters":"Microsoft.NetworkCloud.AccessBridgePatchParameters","com.azure.resourcemanager.networkcloud.models.AccessBridgePatchProperties":"Microsoft.NetworkCloud.AccessBridgePatchProperties","com.azure.resourcemanager.networkcloud.models.AccessBridgeProvisioningState":"Microsoft.NetworkCloud.AccessBridgeProvisioningState","com.azure.resourcemanager.networkcloud.models.AccessBridgeSecurityRule":"Microsoft.NetworkCloud.AccessBridgeSecurityRule","com.azure.resourcemanager.networkcloud.models.ActionState":"Microsoft.NetworkCloud.ActionState","com.azure.resourcemanager.networkcloud.models.ActionStateStatus":"Microsoft.NetworkCloud.ActionStateStatus","com.azure.resourcemanager.networkcloud.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.networkcloud.models.AdministrativeCredentials":"Microsoft.NetworkCloud.AdministrativeCredentials","com.azure.resourcemanager.networkcloud.models.AdministratorConfiguration":"Microsoft.NetworkCloud.AdministratorConfiguration","com.azure.resourcemanager.networkcloud.models.AdministratorConfigurationPatch":"Microsoft.NetworkCloud.AdministratorConfigurationPatch","com.azure.resourcemanager.networkcloud.models.AdvertiseToFabric":"Microsoft.NetworkCloud.AdvertiseToFabric","com.azure.resourcemanager.networkcloud.models.AgentOptions":"Microsoft.NetworkCloud.AgentOptions","com.azure.resourcemanager.networkcloud.models.AgentPoolDetailedStatus":"Microsoft.NetworkCloud.AgentPoolDetailedStatus","com.azure.resourcemanager.networkcloud.models.AgentPoolMode":"Microsoft.NetworkCloud.AgentPoolMode","com.azure.resourcemanager.networkcloud.models.AgentPoolPatchParameters":"Microsoft.NetworkCloud.AgentPoolPatchParameters","com.azure.resourcemanager.networkcloud.models.AgentPoolProvisioningState":"Microsoft.NetworkCloud.AgentPoolProvisioningState","com.azure.resourcemanager.networkcloud.models.AgentPoolUpgradeSettings":"Microsoft.NetworkCloud.AgentPoolUpgradeSettings","com.azure.resourcemanager.networkcloud.models.AnalyticsOutputSettings":"Microsoft.NetworkCloud.AnalyticsOutputSettings","com.azure.resourcemanager.networkcloud.models.AttachedNetworkConfiguration":"Microsoft.NetworkCloud.AttachedNetworkConfiguration","com.azure.resourcemanager.networkcloud.models.AvailabilityLifecycle":"Microsoft.NetworkCloud.AvailabilityLifecycle","com.azure.resourcemanager.networkcloud.models.AvailableUpgrade":"Microsoft.NetworkCloud.AvailableUpgrade","com.azure.resourcemanager.networkcloud.models.BareMetalMachineCommandSpecification":"Microsoft.NetworkCloud.BareMetalMachineCommandSpecification","com.azure.resourcemanager.networkcloud.models.BareMetalMachineConfigurationData":"Microsoft.NetworkCloud.BareMetalMachineConfigurationData","com.azure.resourcemanager.networkcloud.models.BareMetalMachineCordonParameters":"Microsoft.NetworkCloud.BareMetalMachineCordonParameters","com.azure.resourcemanager.networkcloud.models.BareMetalMachineCordonStatus":"Microsoft.NetworkCloud.BareMetalMachineCordonStatus","com.azure.resourcemanager.networkcloud.models.BareMetalMachineDetailedStatus":"Microsoft.NetworkCloud.BareMetalMachineDetailedStatus","com.azure.resourcemanager.networkcloud.models.BareMetalMachineEvacuate":"Microsoft.NetworkCloud.BareMetalMachineEvacuate","com.azure.resourcemanager.networkcloud.models.BareMetalMachineHardwareValidationResult":"Microsoft.NetworkCloud.BareMetalMachineHardwareValidationResult","com.azure.resourcemanager.networkcloud.models.BareMetalMachineKeySetDetailedStatus":"Microsoft.NetworkCloud.BareMetalMachineKeySetDetailedStatus","com.azure.resourcemanager.networkcloud.models.BareMetalMachineKeySetPatchParameters":"Microsoft.NetworkCloud.BareMetalMachineKeySetPatchParameters","com.azure.resourcemanager.networkcloud.models.BareMetalMachineKeySetPrivilegeLevel":"Microsoft.NetworkCloud.BareMetalMachineKeySetPrivilegeLevel","com.azure.resourcemanager.networkcloud.models.BareMetalMachineKeySetProvisioningState":"Microsoft.NetworkCloud.BareMetalMachineKeySetProvisioningState","com.azure.resourcemanager.networkcloud.models.BareMetalMachineKeySetUserSetupStatus":"Microsoft.NetworkCloud.BareMetalMachineKeySetUserSetupStatus","com.azure.resourcemanager.networkcloud.models.BareMetalMachineMetricsConfigurationStatusLogLevel":"Microsoft.NetworkCloud.BareMetalMachineMetricsConfigurationStatusLogLevel","com.azure.resourcemanager.networkcloud.models.BareMetalMachineMetricsConfigurationStatusMetricsLevel":"Microsoft.NetworkCloud.BareMetalMachineMetricsConfigurationStatusMetricsLevel","com.azure.resourcemanager.networkcloud.models.BareMetalMachineMonitoringConfigurationStatus":"Microsoft.NetworkCloud.BareMetalMachineMonitoringConfigurationStatus","com.azure.resourcemanager.networkcloud.models.BareMetalMachinePatchParameters":"Microsoft.NetworkCloud.BareMetalMachinePatchParameters","com.azure.resourcemanager.networkcloud.models.BareMetalMachinePowerOffParameters":"Microsoft.NetworkCloud.BareMetalMachinePowerOffParameters","com.azure.resourcemanager.networkcloud.models.BareMetalMachinePowerState":"Microsoft.NetworkCloud.BareMetalMachinePowerState","com.azure.resourcemanager.networkcloud.models.BareMetalMachineProvisioningState":"Microsoft.NetworkCloud.BareMetalMachineProvisioningState","com.azure.resourcemanager.networkcloud.models.BareMetalMachineReadyState":"Microsoft.NetworkCloud.BareMetalMachineReadyState","com.azure.resourcemanager.networkcloud.models.BareMetalMachineReimageParameters":"Microsoft.NetworkCloud.BareMetalMachineReimageParameters","com.azure.resourcemanager.networkcloud.models.BareMetalMachineReimageSafeguardMode":"Microsoft.NetworkCloud.BareMetalMachineReimageSafeguardMode","com.azure.resourcemanager.networkcloud.models.BareMetalMachineReplaceParameters":"Microsoft.NetworkCloud.BareMetalMachineReplaceParameters","com.azure.resourcemanager.networkcloud.models.BareMetalMachineReplaceSafeguardMode":"Microsoft.NetworkCloud.BareMetalMachineReplaceSafeguardMode","com.azure.resourcemanager.networkcloud.models.BareMetalMachineReplaceStoragePolicy":"Microsoft.NetworkCloud.BareMetalMachineReplaceStoragePolicy","com.azure.resourcemanager.networkcloud.models.BareMetalMachineRunCommandParameters":"Microsoft.NetworkCloud.BareMetalMachineRunCommandParameters","com.azure.resourcemanager.networkcloud.models.BareMetalMachineRunDataExtractsParameters":"Microsoft.NetworkCloud.BareMetalMachineRunDataExtractsParameters","com.azure.resourcemanager.networkcloud.models.BareMetalMachineRunReadCommandsParameters":"Microsoft.NetworkCloud.BareMetalMachineRunReadCommandsParameters","com.azure.resourcemanager.networkcloud.models.BareMetalMachineSkipShutdown":"Microsoft.NetworkCloud.BareMetalMachineSkipShutdown","com.azure.resourcemanager.networkcloud.models.BfdEnabled":"Microsoft.NetworkCloud.BfdEnabled","com.azure.resourcemanager.networkcloud.models.BgpAdvertisement":"Microsoft.NetworkCloud.BgpAdvertisement","com.azure.resourcemanager.networkcloud.models.BgpMultiHop":"Microsoft.NetworkCloud.BgpMultiHop","com.azure.resourcemanager.networkcloud.models.BgpServiceLoadBalancerConfiguration":"Microsoft.NetworkCloud.BgpServiceLoadBalancerConfiguration","com.azure.resourcemanager.networkcloud.models.BmcKeySetDetailedStatus":"Microsoft.NetworkCloud.BmcKeySetDetailedStatus","com.azure.resourcemanager.networkcloud.models.BmcKeySetPatchParameters":"Microsoft.NetworkCloud.BmcKeySetPatchParameters","com.azure.resourcemanager.networkcloud.models.BmcKeySetPrivilegeLevel":"Microsoft.NetworkCloud.BmcKeySetPrivilegeLevel","com.azure.resourcemanager.networkcloud.models.BmcKeySetProvisioningState":"Microsoft.NetworkCloud.BmcKeySetProvisioningState","com.azure.resourcemanager.networkcloud.models.BootstrapProtocol":"Microsoft.NetworkCloud.BootstrapProtocol","com.azure.resourcemanager.networkcloud.models.CertificateInfo":"Microsoft.NetworkCloud.CertificateInfo","com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkDetailedStatus":"Microsoft.NetworkCloud.CloudServicesNetworkDetailedStatus","com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkEnableDefaultEgressEndpoints":"Microsoft.NetworkCloud.CloudServicesNetworkEnableDefaultEgressEndpoints","com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkPatchParameters":"Microsoft.NetworkCloud.CloudServicesNetworkPatchParameters","com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkProvisioningState":"Microsoft.NetworkCloud.CloudServicesNetworkProvisioningState","com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkStorageMode":"Microsoft.NetworkCloud.CloudServicesNetworkStorageMode","com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkStorageOptions":"Microsoft.NetworkCloud.CloudServicesNetworkStorageOptions","com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkStorageOptionsPatch":"Microsoft.NetworkCloud.CloudServicesNetworkStorageOptionsPatch","com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkStorageStatus":"Microsoft.NetworkCloud.CloudServicesNetworkStorageStatus","com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkStorageStatusStatus":"Microsoft.NetworkCloud.CloudServicesNetworkStorageStatusStatus","com.azure.resourcemanager.networkcloud.models.ClusterAvailableUpgradeVersion":"Microsoft.NetworkCloud.ClusterAvailableUpgradeVersion","com.azure.resourcemanager.networkcloud.models.ClusterAvailableVersion":"Microsoft.NetworkCloud.ClusterAvailableVersion","com.azure.resourcemanager.networkcloud.models.ClusterCapacity":"Microsoft.NetworkCloud.ClusterCapacity","com.azure.resourcemanager.networkcloud.models.ClusterConnectionStatus":"Microsoft.NetworkCloud.ClusterConnectionStatus","com.azure.resourcemanager.networkcloud.models.ClusterContinueUpdateVersionMachineGroupTargetingMode":"Microsoft.NetworkCloud.ClusterContinueUpdateVersionMachineGroupTargetingMode","com.azure.resourcemanager.networkcloud.models.ClusterContinueUpdateVersionParameters":"Microsoft.NetworkCloud.ClusterContinueUpdateVersionParameters","com.azure.resourcemanager.networkcloud.models.ClusterContinueUpdateVersionSafeguardMode":"Microsoft.NetworkCloud.ClusterContinueUpdateVersionSafeguardMode","com.azure.resourcemanager.networkcloud.models.ClusterDeployParameters":"Microsoft.NetworkCloud.ClusterDeployParameters","com.azure.resourcemanager.networkcloud.models.ClusterDetailedStatus":"Microsoft.NetworkCloud.ClusterDetailedStatus","com.azure.resourcemanager.networkcloud.models.ClusterInspectAdditionalAction":"Microsoft.NetworkCloud.ClusterInspectAdditionalAction","com.azure.resourcemanager.networkcloud.models.ClusterInspectParameters":"Microsoft.NetworkCloud.ClusterInspectParameters","com.azure.resourcemanager.networkcloud.models.ClusterManagerConnectionStatus":"Microsoft.NetworkCloud.ClusterManagerConnectionStatus","com.azure.resourcemanager.networkcloud.models.ClusterManagerDetailedStatus":"Microsoft.NetworkCloud.ClusterManagerDetailedStatus","com.azure.resourcemanager.networkcloud.models.ClusterManagerPatchParameters":"Microsoft.NetworkCloud.ClusterManagerPatchParameters","com.azure.resourcemanager.networkcloud.models.ClusterManagerProvisioningState":"Microsoft.NetworkCloud.ClusterManagerProvisioningState","com.azure.resourcemanager.networkcloud.models.ClusterManagerRelayConfiguration":"Microsoft.NetworkCloud.ClusterManagerRelayConfiguration","com.azure.resourcemanager.networkcloud.models.ClusterManagerUpdateRelayPrivateEndpointConnectionParameters":"Microsoft.NetworkCloud.ClusterManagerUpdateRelayPrivateEndpointConnectionParameters","com.azure.resourcemanager.networkcloud.models.ClusterMetricsConfigurationDetailedStatus":"Microsoft.NetworkCloud.ClusterMetricsConfigurationDetailedStatus","com.azure.resourcemanager.networkcloud.models.ClusterMetricsConfigurationPatchParameters":"Microsoft.NetworkCloud.ClusterMetricsConfigurationPatchParameters","com.azure.resourcemanager.networkcloud.models.ClusterMetricsConfigurationProvisioningState":"Microsoft.NetworkCloud.ClusterMetricsConfigurationProvisioningState","com.azure.resourcemanager.networkcloud.models.ClusterPatchParameters":"Microsoft.NetworkCloud.ClusterPatchParameters","com.azure.resourcemanager.networkcloud.models.ClusterProvisioningState":"Microsoft.NetworkCloud.ClusterProvisioningState","com.azure.resourcemanager.networkcloud.models.ClusterRotateCredentialParameters":"Microsoft.NetworkCloud.ClusterRotateCredentialParameters","com.azure.resourcemanager.networkcloud.models.ClusterScanRuntimeParameters":"Microsoft.NetworkCloud.ClusterScanRuntimeParameters","com.azure.resourcemanager.networkcloud.models.ClusterScanRuntimeParametersScanActivity":"Microsoft.NetworkCloud.ClusterScanRuntimeParametersScanActivity","com.azure.resourcemanager.networkcloud.models.ClusterSecretArchive":"Microsoft.NetworkCloud.ClusterSecretArchive","com.azure.resourcemanager.networkcloud.models.ClusterSecretArchiveEnabled":"Microsoft.NetworkCloud.ClusterSecretArchiveEnabled","com.azure.resourcemanager.networkcloud.models.ClusterType":"Microsoft.NetworkCloud.ClusterType","com.azure.resourcemanager.networkcloud.models.ClusterUpdateStrategy":"Microsoft.NetworkCloud.ClusterUpdateStrategy","com.azure.resourcemanager.networkcloud.models.ClusterUpdateStrategyType":"Microsoft.NetworkCloud.ClusterUpdateStrategyType","com.azure.resourcemanager.networkcloud.models.ClusterUpdateVersionParameters":"Microsoft.NetworkCloud.ClusterUpdateVersionParameters","com.azure.resourcemanager.networkcloud.models.ClusterUpdateVersionSafeguardMode":"Microsoft.NetworkCloud.ClusterUpdateVersionSafeguardMode","com.azure.resourcemanager.networkcloud.models.CommandOutputOverride":"Microsoft.NetworkCloud.CommandOutputOverride","com.azure.resourcemanager.networkcloud.models.CommandOutputSettings":"Microsoft.NetworkCloud.CommandOutputSettings","com.azure.resourcemanager.networkcloud.models.CommandOutputType":"Microsoft.NetworkCloud.CommandOutputType","com.azure.resourcemanager.networkcloud.models.ConsoleDetailedStatus":"Microsoft.NetworkCloud.ConsoleDetailedStatus","com.azure.resourcemanager.networkcloud.models.ConsoleEnabled":"Microsoft.NetworkCloud.ConsoleEnabled","com.azure.resourcemanager.networkcloud.models.ConsolePatchParameters":"Microsoft.NetworkCloud.ConsolePatchParameters","com.azure.resourcemanager.networkcloud.models.ConsoleProvisioningState":"Microsoft.NetworkCloud.ConsoleProvisioningState","com.azure.resourcemanager.networkcloud.models.ControlImpact":"Microsoft.NetworkCloud.ControlImpact","com.azure.resourcemanager.networkcloud.models.ControlPlaneNodeConfiguration":"Microsoft.NetworkCloud.ControlPlaneNodeConfiguration","com.azure.resourcemanager.networkcloud.models.ControlPlaneNodePatchConfiguration":"Microsoft.NetworkCloud.ControlPlaneNodePatchConfiguration","com.azure.resourcemanager.networkcloud.models.DefaultGateway":"Microsoft.NetworkCloud.DefaultGateway","com.azure.resourcemanager.networkcloud.models.DeploymentType":"Microsoft.NetworkCloud.DeploymentType","com.azure.resourcemanager.networkcloud.models.DeviceConnectionType":"Microsoft.NetworkCloud.DeviceConnectionType","com.azure.resourcemanager.networkcloud.models.DiskType":"Microsoft.NetworkCloud.DiskType","com.azure.resourcemanager.networkcloud.models.EgressEndpoint":"Microsoft.NetworkCloud.EgressEndpoint","com.azure.resourcemanager.networkcloud.models.EndpointDependency":"Microsoft.NetworkCloud.EndpointDependency","com.azure.resourcemanager.networkcloud.models.ExtendedLocation":"Azure.ResourceManager.CommonTypes.ExtendedLocation","com.azure.resourcemanager.networkcloud.models.ExtendedLocationType":"Azure.ResourceManager.CommonTypes.ExtendedLocationType","com.azure.resourcemanager.networkcloud.models.FabricPeeringEnabled":"Microsoft.NetworkCloud.FabricPeeringEnabled","com.azure.resourcemanager.networkcloud.models.FeatureDetailedStatus":"Microsoft.NetworkCloud.FeatureDetailedStatus","com.azure.resourcemanager.networkcloud.models.FeatureStatus":"Microsoft.NetworkCloud.FeatureStatus","com.azure.resourcemanager.networkcloud.models.FilterDevices":"Microsoft.NetworkCloud.FilterDevices","com.azure.resourcemanager.networkcloud.models.HardwareInventory":"Microsoft.NetworkCloud.HardwareInventory","com.azure.resourcemanager.networkcloud.models.HardwareInventoryNetworkInterface":"Microsoft.NetworkCloud.HardwareInventoryNetworkInterface","com.azure.resourcemanager.networkcloud.models.HardwareValidationStatus":"Microsoft.NetworkCloud.HardwareValidationStatus","com.azure.resourcemanager.networkcloud.models.HugepagesSize":"Microsoft.NetworkCloud.HugepagesSize","com.azure.resourcemanager.networkcloud.models.HybridAksIpamEnabled":"Microsoft.NetworkCloud.HybridAksIpamEnabled","com.azure.resourcemanager.networkcloud.models.HybridAksPluginType":"Microsoft.NetworkCloud.HybridAksPluginType","com.azure.resourcemanager.networkcloud.models.IdentitySelector":"Microsoft.NetworkCloud.IdentitySelector","com.azure.resourcemanager.networkcloud.models.ImageRepositoryCredentials":"Microsoft.NetworkCloud.ImageRepositoryCredentials","com.azure.resourcemanager.networkcloud.models.InitialAgentPoolConfiguration":"Microsoft.NetworkCloud.InitialAgentPoolConfiguration","com.azure.resourcemanager.networkcloud.models.IpAddressPool":"Microsoft.NetworkCloud.IpAddressPool","com.azure.resourcemanager.networkcloud.models.IpAllocationType":"Microsoft.NetworkCloud.IpAllocationType","com.azure.resourcemanager.networkcloud.models.KeySetUser":"Microsoft.NetworkCloud.KeySetUser","com.azure.resourcemanager.networkcloud.models.KeySetUserStatus":"Microsoft.NetworkCloud.KeySetUserStatus","com.azure.resourcemanager.networkcloud.models.KubernetesClusterDetailedStatus":"Microsoft.NetworkCloud.KubernetesClusterDetailedStatus","com.azure.resourcemanager.networkcloud.models.KubernetesClusterFeatureAvailabilityLifecycle":"Microsoft.NetworkCloud.KubernetesClusterFeatureAvailabilityLifecycle","com.azure.resourcemanager.networkcloud.models.KubernetesClusterFeatureDetailedStatus":"Microsoft.NetworkCloud.KubernetesClusterFeatureDetailedStatus","com.azure.resourcemanager.networkcloud.models.KubernetesClusterFeaturePatchParameters":"Microsoft.NetworkCloud.KubernetesClusterFeaturePatchParameters","com.azure.resourcemanager.networkcloud.models.KubernetesClusterFeatureProvisioningState":"Microsoft.NetworkCloud.KubernetesClusterFeatureProvisioningState","com.azure.resourcemanager.networkcloud.models.KubernetesClusterFeatureRequired":"Microsoft.NetworkCloud.KubernetesClusterFeatureRequired","com.azure.resourcemanager.networkcloud.models.KubernetesClusterNode":"Microsoft.NetworkCloud.KubernetesClusterNode","com.azure.resourcemanager.networkcloud.models.KubernetesClusterNodeDetailedStatus":"Microsoft.NetworkCloud.KubernetesClusterNodeDetailedStatus","com.azure.resourcemanager.networkcloud.models.KubernetesClusterPatchParameters":"Microsoft.NetworkCloud.KubernetesClusterPatchParameters","com.azure.resourcemanager.networkcloud.models.KubernetesClusterProvisioningState":"Microsoft.NetworkCloud.KubernetesClusterProvisioningState","com.azure.resourcemanager.networkcloud.models.KubernetesClusterRestartNodeParameters":"Microsoft.NetworkCloud.KubernetesClusterRestartNodeParameters","com.azure.resourcemanager.networkcloud.models.KubernetesLabel":"Microsoft.NetworkCloud.KubernetesLabel","com.azure.resourcemanager.networkcloud.models.KubernetesNodePowerState":"Microsoft.NetworkCloud.KubernetesNodePowerState","com.azure.resourcemanager.networkcloud.models.KubernetesNodeRole":"Microsoft.NetworkCloud.KubernetesNodeRole","com.azure.resourcemanager.networkcloud.models.KubernetesPluginType":"Microsoft.NetworkCloud.KubernetesPluginType","com.azure.resourcemanager.networkcloud.models.KubernetesVersionPatchParameters":"Microsoft.NetworkCloud.KubernetesVersionPatchParameters","com.azure.resourcemanager.networkcloud.models.KubernetesVersionProvisioningState":"Microsoft.NetworkCloud.KubernetesVersionProvisioningState","com.azure.resourcemanager.networkcloud.models.KubernetesVersionValue":"Microsoft.NetworkCloud.KubernetesVersionValue","com.azure.resourcemanager.networkcloud.models.L2NetworkAttachmentConfiguration":"Microsoft.NetworkCloud.L2NetworkAttachmentConfiguration","com.azure.resourcemanager.networkcloud.models.L2NetworkDetailedStatus":"Microsoft.NetworkCloud.L2NetworkDetailedStatus","com.azure.resourcemanager.networkcloud.models.L2NetworkPatchParameters":"Microsoft.NetworkCloud.L2NetworkPatchParameters","com.azure.resourcemanager.networkcloud.models.L2NetworkProvisioningState":"Microsoft.NetworkCloud.L2NetworkProvisioningState","com.azure.resourcemanager.networkcloud.models.L2ServiceLoadBalancerConfiguration":"Microsoft.NetworkCloud.L2ServiceLoadBalancerConfiguration","com.azure.resourcemanager.networkcloud.models.L3NetworkAttachmentConfiguration":"Microsoft.NetworkCloud.L3NetworkAttachmentConfiguration","com.azure.resourcemanager.networkcloud.models.L3NetworkConfigurationIpamEnabled":"Microsoft.NetworkCloud.L3NetworkConfigurationIpamEnabled","com.azure.resourcemanager.networkcloud.models.L3NetworkDetailedStatus":"Microsoft.NetworkCloud.L3NetworkDetailedStatus","com.azure.resourcemanager.networkcloud.models.L3NetworkPatchParameters":"Microsoft.NetworkCloud.L3NetworkPatchParameters","com.azure.resourcemanager.networkcloud.models.L3NetworkProvisioningState":"Microsoft.NetworkCloud.L3NetworkProvisioningState","com.azure.resourcemanager.networkcloud.models.LldpNeighbor":"Microsoft.NetworkCloud.LldpNeighbor","com.azure.resourcemanager.networkcloud.models.MachineDisk":"Microsoft.NetworkCloud.MachineDisk","com.azure.resourcemanager.networkcloud.models.MachineSkuDiskConnectionType":"Microsoft.NetworkCloud.MachineSkuDiskConnectionType","com.azure.resourcemanager.networkcloud.models.MachineSkuSlot":"Microsoft.NetworkCloud.MachineSkuSlot","com.azure.resourcemanager.networkcloud.models.ManagedResourceGroupConfiguration":"Microsoft.NetworkCloud.ManagedResourceGroupConfiguration","com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentitySelectorType":"Microsoft.NetworkCloud.ManagedServiceIdentitySelectorType","com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.networkcloud.models.NetworkAttachment":"Microsoft.NetworkCloud.NetworkAttachment","com.azure.resourcemanager.networkcloud.models.NetworkConfiguration":"Microsoft.NetworkCloud.NetworkConfiguration","com.azure.resourcemanager.networkcloud.models.NetworkInterface":"Microsoft.NetworkCloud.NetworkInterface","com.azure.resourcemanager.networkcloud.models.Nic":"Microsoft.NetworkCloud.Nic","com.azure.resourcemanager.networkcloud.models.NodePoolAdministratorConfigurationPatch":"Microsoft.NetworkCloud.NodePoolAdministratorConfigurationPatch","com.azure.resourcemanager.networkcloud.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.networkcloud.models.OperationStatusResult":"Microsoft.NetworkCloud.OperationStatusResult","com.azure.resourcemanager.networkcloud.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.networkcloud.models.OsDisk":"Microsoft.NetworkCloud.OsDisk","com.azure.resourcemanager.networkcloud.models.OsDiskCreateOption":"Microsoft.NetworkCloud.OsDiskCreateOption","com.azure.resourcemanager.networkcloud.models.OsDiskDeleteOption":"Microsoft.NetworkCloud.OsDiskDeleteOption","com.azure.resourcemanager.networkcloud.models.RackDefinition":"Microsoft.NetworkCloud.RackDefinition","com.azure.resourcemanager.networkcloud.models.RackDetailedStatus":"Microsoft.NetworkCloud.RackDetailedStatus","com.azure.resourcemanager.networkcloud.models.RackPatchParameters":"Microsoft.NetworkCloud.RackPatchParameters","com.azure.resourcemanager.networkcloud.models.RackProvisioningState":"Microsoft.NetworkCloud.RackProvisioningState","com.azure.resourcemanager.networkcloud.models.RackSkuProvisioningState":"Microsoft.NetworkCloud.RackSkuProvisioningState","com.azure.resourcemanager.networkcloud.models.RackSkuType":"Microsoft.NetworkCloud.RackSkuType","com.azure.resourcemanager.networkcloud.models.RelayPrivateEndpointConnectionState":"Microsoft.NetworkCloud.RelayPrivateEndpointConnectionState","com.azure.resourcemanager.networkcloud.models.RelayType":"Microsoft.NetworkCloud.RelayType","com.azure.resourcemanager.networkcloud.models.RemoteVendorManagementFeature":"Microsoft.NetworkCloud.RemoteVendorManagementFeature","com.azure.resourcemanager.networkcloud.models.RemoteVendorManagementStatus":"Microsoft.NetworkCloud.RemoteVendorManagementStatus","com.azure.resourcemanager.networkcloud.models.RuntimeProtectionAgentHealthStatus":"Microsoft.NetworkCloud.RuntimeProtectionAgentHealthStatus","com.azure.resourcemanager.networkcloud.models.RuntimeProtectionAgentLicenseStatus":"Microsoft.NetworkCloud.RuntimeProtectionAgentLicenseStatus","com.azure.resourcemanager.networkcloud.models.RuntimeProtectionConfiguration":"Microsoft.NetworkCloud.RuntimeProtectionConfiguration","com.azure.resourcemanager.networkcloud.models.RuntimeProtectionDefinitionUpdateMode":"Microsoft.NetworkCloud.RuntimeProtectionDefinitionUpdateMode","com.azure.resourcemanager.networkcloud.models.RuntimeProtectionEnforcementLevel":"Microsoft.NetworkCloud.RuntimeProtectionEnforcementLevel","com.azure.resourcemanager.networkcloud.models.RuntimeProtectionStatus":"Microsoft.NetworkCloud.RuntimeProtectionStatus","com.azure.resourcemanager.networkcloud.models.SecretArchiveReference":"Microsoft.NetworkCloud.SecretArchiveReference","com.azure.resourcemanager.networkcloud.models.SecretArchiveSettings":"Microsoft.NetworkCloud.SecretArchiveSettings","com.azure.resourcemanager.networkcloud.models.SecretRotationStatus":"Microsoft.NetworkCloud.SecretRotationStatus","com.azure.resourcemanager.networkcloud.models.SecurityRuleDirection":"Microsoft.NetworkCloud.SecurityRuleDirection","com.azure.resourcemanager.networkcloud.models.ServiceLoadBalancerBgpPeer":"Microsoft.NetworkCloud.ServiceLoadBalancerBgpPeer","com.azure.resourcemanager.networkcloud.models.ServicePrincipalInformation":"Microsoft.NetworkCloud.ServicePrincipalInformation","com.azure.resourcemanager.networkcloud.models.SkipShutdown":"Microsoft.NetworkCloud.SkipShutdown","com.azure.resourcemanager.networkcloud.models.SshPublicKey":"Microsoft.NetworkCloud.SshPublicKey","com.azure.resourcemanager.networkcloud.models.StepState":"Microsoft.NetworkCloud.StepState","com.azure.resourcemanager.networkcloud.models.StepStateStatus":"Microsoft.NetworkCloud.StepStateStatus","com.azure.resourcemanager.networkcloud.models.StorageApplianceCommandSpecification":"Microsoft.NetworkCloud.StorageApplianceCommandSpecification","com.azure.resourcemanager.networkcloud.models.StorageApplianceConfigurationData":"Microsoft.NetworkCloud.StorageApplianceConfigurationData","com.azure.resourcemanager.networkcloud.models.StorageApplianceDetailedStatus":"Microsoft.NetworkCloud.StorageApplianceDetailedStatus","com.azure.resourcemanager.networkcloud.models.StorageApplianceEnableRemoteVendorManagementParameters":"Microsoft.NetworkCloud.StorageApplianceEnableRemoteVendorManagementParameters","com.azure.resourcemanager.networkcloud.models.StorageApplianceExpansionShelf":"Microsoft.NetworkCloud.StorageApplianceExpansionShelf","com.azure.resourcemanager.networkcloud.models.StorageApplianceMetricsConfigurationStatusLogLevel":"Microsoft.NetworkCloud.StorageApplianceMetricsConfigurationStatusLogLevel","com.azure.resourcemanager.networkcloud.models.StorageApplianceMetricsConfigurationStatusMetricsLevel":"Microsoft.NetworkCloud.StorageApplianceMetricsConfigurationStatusMetricsLevel","com.azure.resourcemanager.networkcloud.models.StorageApplianceMonitoringConfigurationStatus":"Microsoft.NetworkCloud.StorageApplianceMonitoringConfigurationStatus","com.azure.resourcemanager.networkcloud.models.StorageAppliancePatchParameters":"Microsoft.NetworkCloud.StorageAppliancePatchParameters","com.azure.resourcemanager.networkcloud.models.StorageApplianceProvisioningState":"Microsoft.NetworkCloud.StorageApplianceProvisioningState","com.azure.resourcemanager.networkcloud.models.StorageApplianceRunReadCommandsParameters":"Microsoft.NetworkCloud.StorageApplianceRunReadCommandsParameters","com.azure.resourcemanager.networkcloud.models.StorageApplianceSkuSlot":"Microsoft.NetworkCloud.StorageApplianceSkuSlot","com.azure.resourcemanager.networkcloud.models.StorageProfile":"Microsoft.NetworkCloud.StorageProfile","com.azure.resourcemanager.networkcloud.models.StringKeyValuePair":"Microsoft.NetworkCloud.StringKeyValuePair","com.azure.resourcemanager.networkcloud.models.TransportProtocol":"Microsoft.NetworkCloud.TransportProtocol","com.azure.resourcemanager.networkcloud.models.TrunkedNetworkAttachmentConfiguration":"Microsoft.NetworkCloud.TrunkedNetworkAttachmentConfiguration","com.azure.resourcemanager.networkcloud.models.TrunkedNetworkDetailedStatus":"Microsoft.NetworkCloud.TrunkedNetworkDetailedStatus","com.azure.resourcemanager.networkcloud.models.TrunkedNetworkPatchParameters":"Microsoft.NetworkCloud.TrunkedNetworkPatchParameters","com.azure.resourcemanager.networkcloud.models.TrunkedNetworkProvisioningState":"Microsoft.NetworkCloud.TrunkedNetworkProvisioningState","com.azure.resourcemanager.networkcloud.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.networkcloud.models.ValidationThreshold":"Microsoft.NetworkCloud.ValidationThreshold","com.azure.resourcemanager.networkcloud.models.ValidationThresholdGrouping":"Microsoft.NetworkCloud.ValidationThresholdGrouping","com.azure.resourcemanager.networkcloud.models.ValidationThresholdType":"Microsoft.NetworkCloud.ValidationThresholdType","com.azure.resourcemanager.networkcloud.models.VirtualMachineAssignRelayParameters":"Microsoft.NetworkCloud.VirtualMachineAssignRelayParameters","com.azure.resourcemanager.networkcloud.models.VirtualMachineBootMethod":"Microsoft.NetworkCloud.VirtualMachineBootMethod","com.azure.resourcemanager.networkcloud.models.VirtualMachineDetailedStatus":"Microsoft.NetworkCloud.VirtualMachineDetailedStatus","com.azure.resourcemanager.networkcloud.models.VirtualMachineDeviceModelType":"Microsoft.NetworkCloud.VirtualMachineDeviceModelType","com.azure.resourcemanager.networkcloud.models.VirtualMachineIpAllocationMethod":"Microsoft.NetworkCloud.VirtualMachineIPAllocationMethod","com.azure.resourcemanager.networkcloud.models.VirtualMachineIsolateEmulatorThread":"Microsoft.NetworkCloud.VirtualMachineIsolateEmulatorThread","com.azure.resourcemanager.networkcloud.models.VirtualMachinePatchParameters":"Microsoft.NetworkCloud.VirtualMachinePatchParameters","com.azure.resourcemanager.networkcloud.models.VirtualMachinePlacementHint":"Microsoft.NetworkCloud.VirtualMachinePlacementHint","com.azure.resourcemanager.networkcloud.models.VirtualMachinePlacementHintPodAffinityScope":"Microsoft.NetworkCloud.VirtualMachinePlacementHintPodAffinityScope","com.azure.resourcemanager.networkcloud.models.VirtualMachinePlacementHintType":"Microsoft.NetworkCloud.VirtualMachinePlacementHintType","com.azure.resourcemanager.networkcloud.models.VirtualMachinePowerOffParameters":"Microsoft.NetworkCloud.VirtualMachinePowerOffParameters","com.azure.resourcemanager.networkcloud.models.VirtualMachinePowerState":"Microsoft.NetworkCloud.VirtualMachinePowerState","com.azure.resourcemanager.networkcloud.models.VirtualMachineProvisioningState":"Microsoft.NetworkCloud.VirtualMachineProvisioningState","com.azure.resourcemanager.networkcloud.models.VirtualMachineSchedulingExecution":"Microsoft.NetworkCloud.VirtualMachineSchedulingExecution","com.azure.resourcemanager.networkcloud.models.VirtualMachineVirtioInterfaceType":"Microsoft.NetworkCloud.VirtualMachineVirtioInterfaceType","com.azure.resourcemanager.networkcloud.models.VolumeDetailedStatus":"Microsoft.NetworkCloud.VolumeDetailedStatus","com.azure.resourcemanager.networkcloud.models.VolumePatchParameters":"Microsoft.NetworkCloud.VolumePatchParameters","com.azure.resourcemanager.networkcloud.models.VolumeProvisioningState":"Microsoft.NetworkCloud.VolumeProvisioningState","com.azure.resourcemanager.networkcloud.models.VulnerabilityScanningSettings":"Microsoft.NetworkCloud.VulnerabilityScanningSettings","com.azure.resourcemanager.networkcloud.models.VulnerabilityScanningSettingsContainerScan":"Microsoft.NetworkCloud.VulnerabilityScanningSettingsContainerScan","com.azure.resourcemanager.networkcloud.models.VulnerabilityScanningSettingsPatch":"Microsoft.NetworkCloud.VulnerabilityScanningSettingsPatch","com.azure.resourcemanager.networkcloud.models.WorkloadImpact":"Microsoft.NetworkCloud.WorkloadImpact"},"generatedFiles":["src/main/java/com/azure/resourcemanager/networkcloud/NetworkCloudManager.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/AccessBridgesClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/AgentPoolsClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/BareMetalMachineKeySetsClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/BareMetalMachinesClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/BmcKeySetsClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/CloudServicesNetworksClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/ClusterManagersClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/ClustersClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/ConsolesClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/KubernetesClusterFeaturesClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/KubernetesClustersClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/KubernetesVersionsClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/L2NetworksClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/L3NetworksClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/MetricsConfigurationsClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/NetworkCloudManagementClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/RackSkusClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/RacksClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/StorageAppliancesClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/TrunkedNetworksClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/VirtualMachinesClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/VolumesClient.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AccessBridgeInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AccessBridgeProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AgentPoolInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AgentPoolPatchProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/AgentPoolProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineKeySetInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineKeySetPatchProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineKeySetProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachinePatchProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BareMetalMachineProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BmcKeySetInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BmcKeySetPatchProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/BmcKeySetProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkPatchProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/CloudServicesNetworkProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterManagerInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterManagerProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterMetricsConfigurationInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterMetricsConfigurationPatchProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterMetricsConfigurationProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterPatchProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ClusterProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ConsoleInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ConsolePatchProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/ConsoleProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterFeatureInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterFeaturePatchProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterFeatureProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterPatchProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesClusterProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesVersionInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/KubernetesVersionProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L2NetworkInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L2NetworkProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L3NetworkInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/L3NetworkProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/MachineSkuProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/OperationStatusResultProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RackInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RackProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RackSkuInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RackSkuProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/RacksPatchProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageApplianceInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageAppliancePatchProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageApplianceProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/StorageApplianceSkuProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/TrunkedNetworkInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/TrunkedNetworkProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachineInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachinePatchProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VirtualMachineProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VolumeInner.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/VolumeProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/networkcloud/fluent/package-info.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/AccessBridgeImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/AccessBridgesClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/AccessBridgesImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/AgentPoolImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/AgentPoolsClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/AgentPoolsImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineKeySetImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineKeySetsClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachineKeySetsImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachinesClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/BareMetalMachinesImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/BmcKeySetImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/BmcKeySetsClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/BmcKeySetsImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/CloudServicesNetworkImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/CloudServicesNetworksClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/CloudServicesNetworksImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterManagerImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterManagersClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterManagersImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClusterMetricsConfigurationImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClustersClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/ClustersImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/ConsoleImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/ConsolesClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/ConsolesImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterFeatureImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterFeaturesClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterFeaturesImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClusterImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClustersClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesClustersImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesVersionImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/KubernetesVersionsImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/L2NetworkImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/L2NetworksClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/L2NetworksImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/L3NetworkImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/L3NetworksClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/L3NetworksImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/MetricsConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/MetricsConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudManagementClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackSkuImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackSkusClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/RackSkusImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/RacksClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/RacksImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageApplianceImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageAppliancesClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/StorageAppliancesImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/TrunkedNetworkImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/TrunkedNetworksClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/TrunkedNetworksImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/VirtualMachineImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/VirtualMachinesClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/VirtualMachinesImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/VolumeImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/VolumesClientImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/VolumesImpl.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/AccessBridgeList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/AgentPoolList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/BareMetalMachineKeySetList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/BareMetalMachineList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/BmcKeySetList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/CloudServicesNetworkList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/ClusterList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/ClusterManagerList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/ClusterMetricsConfigurationList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/ConsoleList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/KubernetesClusterFeatureList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/KubernetesClusterList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/KubernetesVersionList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/L2NetworkList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/L3NetworkList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/RackList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/RackSkuList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/StorageApplianceList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/TrunkedNetworkList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/VirtualMachineList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/models/VolumeList.java","src/main/java/com/azure/resourcemanager/networkcloud/implementation/package-info.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AadConfiguration.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridge.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeAllowedName.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeEndpoint.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgePatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgePatchProperties.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridgeSecurityRule.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AccessBridges.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ActionState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ActionStateStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ActionType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AdministrativeCredentials.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AdministratorConfiguration.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AdministratorConfigurationPatch.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AdvertiseToFabric.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AgentOptions.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPool.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolMode.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolPatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPoolUpgradeSettings.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AgentPools.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AnalyticsOutputSettings.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AttachedNetworkConfiguration.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AvailabilityLifecycle.java","src/main/java/com/azure/resourcemanager/networkcloud/models/AvailableUpgrade.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachine.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineCommandSpecification.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineConfigurationData.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineCordonParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineCordonStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineEvacuate.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineHardwareValidationResult.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySet.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetPatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetPrivilegeLevel.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySetUserSetupStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineKeySets.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineMetricsConfigurationStatusLogLevel.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineMetricsConfigurationStatusMetricsLevel.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineMonitoringConfigurationStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePowerOffParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachinePowerState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReadyState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReimageParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReimageSafeguardMode.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReplaceParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReplaceSafeguardMode.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineReplaceStoragePolicy.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunCommandParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunDataExtractsParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineRunReadCommandsParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachineSkipShutdown.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BareMetalMachines.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BfdEnabled.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BgpAdvertisement.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BgpMultiHop.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BgpServiceLoadBalancerConfiguration.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySet.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetPatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetPrivilegeLevel.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySetProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BmcKeySets.java","src/main/java/com/azure/resourcemanager/networkcloud/models/BootstrapProtocol.java","src/main/java/com/azure/resourcemanager/networkcloud/models/CertificateInfo.java","src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetwork.java","src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkEnableDefaultEgressEndpoints.java","src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkPatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageMode.java","src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageOptions.java","src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageOptionsPatch.java","src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworkStorageStatusStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/CloudServicesNetworks.java","src/main/java/com/azure/resourcemanager/networkcloud/models/Cluster.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterAvailableUpgradeVersion.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterAvailableVersion.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterCapacity.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterConnectionStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterContinueUpdateVersionMachineGroupTargetingMode.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterContinueUpdateVersionParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterContinueUpdateVersionSafeguardMode.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterDeployParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterInspectAdditionalAction.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterInspectParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManager.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerConnectionStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerPatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerRelayConfiguration.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagerUpdateRelayPrivateEndpointConnectionParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterManagers.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfiguration.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfigurationDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfigurationPatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterMetricsConfigurationProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterPatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterRotateCredentialParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterScanRuntimeParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterScanRuntimeParametersScanActivity.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterSecretArchive.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterSecretArchiveEnabled.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateStrategy.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateStrategyType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateVersionParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ClusterUpdateVersionSafeguardMode.java","src/main/java/com/azure/resourcemanager/networkcloud/models/Clusters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputOverride.java","src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputSettings.java","src/main/java/com/azure/resourcemanager/networkcloud/models/CommandOutputType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/Console.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ConsoleDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ConsoleEnabled.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ConsolePatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ConsoleProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/Consoles.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ControlImpact.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ControlPlaneNodeConfiguration.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ControlPlaneNodePatchConfiguration.java","src/main/java/com/azure/resourcemanager/networkcloud/models/DefaultGateway.java","src/main/java/com/azure/resourcemanager/networkcloud/models/DeploymentType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/DeviceConnectionType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/DiskType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/EgressEndpoint.java","src/main/java/com/azure/resourcemanager/networkcloud/models/EndpointDependency.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ExtendedLocation.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ExtendedLocationType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/FabricPeeringEnabled.java","src/main/java/com/azure/resourcemanager/networkcloud/models/FeatureDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/FeatureStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/FilterDevices.java","src/main/java/com/azure/resourcemanager/networkcloud/models/HardwareInventory.java","src/main/java/com/azure/resourcemanager/networkcloud/models/HardwareInventoryNetworkInterface.java","src/main/java/com/azure/resourcemanager/networkcloud/models/HardwareValidationStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/HugepagesSize.java","src/main/java/com/azure/resourcemanager/networkcloud/models/HybridAksIpamEnabled.java","src/main/java/com/azure/resourcemanager/networkcloud/models/HybridAksPluginType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/IdentitySelector.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ImageRepositoryCredentials.java","src/main/java/com/azure/resourcemanager/networkcloud/models/InitialAgentPoolConfiguration.java","src/main/java/com/azure/resourcemanager/networkcloud/models/IpAddressPool.java","src/main/java/com/azure/resourcemanager/networkcloud/models/IpAllocationType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KeySetUser.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KeySetUserStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesCluster.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeature.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureAvailabilityLifecycle.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeaturePatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatureRequired.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterFeatures.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterNode.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterNodeDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterPatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusterRestartNodeParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesClusters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesLabel.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesNodePowerState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesNodeRole.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesPluginType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersion.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersionPatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersionProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersionValue.java","src/main/java/com/azure/resourcemanager/networkcloud/models/KubernetesVersions.java","src/main/java/com/azure/resourcemanager/networkcloud/models/L2Network.java","src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkAttachmentConfiguration.java","src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkPatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/L2NetworkProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/L2Networks.java","src/main/java/com/azure/resourcemanager/networkcloud/models/L2ServiceLoadBalancerConfiguration.java","src/main/java/com/azure/resourcemanager/networkcloud/models/L3Network.java","src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkAttachmentConfiguration.java","src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkConfigurationIpamEnabled.java","src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkPatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/L3NetworkProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/L3Networks.java","src/main/java/com/azure/resourcemanager/networkcloud/models/LldpNeighbor.java","src/main/java/com/azure/resourcemanager/networkcloud/models/MachineDisk.java","src/main/java/com/azure/resourcemanager/networkcloud/models/MachineSkuDiskConnectionType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/MachineSkuSlot.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedResourceGroupConfiguration.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedServiceIdentitySelectorType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/MetricsConfigurations.java","src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkAttachment.java","src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkConfiguration.java","src/main/java/com/azure/resourcemanager/networkcloud/models/NetworkInterface.java","src/main/java/com/azure/resourcemanager/networkcloud/models/Nic.java","src/main/java/com/azure/resourcemanager/networkcloud/models/NodePoolAdministratorConfigurationPatch.java","src/main/java/com/azure/resourcemanager/networkcloud/models/Operation.java","src/main/java/com/azure/resourcemanager/networkcloud/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/networkcloud/models/OperationStatusResult.java","src/main/java/com/azure/resourcemanager/networkcloud/models/Operations.java","src/main/java/com/azure/resourcemanager/networkcloud/models/Origin.java","src/main/java/com/azure/resourcemanager/networkcloud/models/OsDisk.java","src/main/java/com/azure/resourcemanager/networkcloud/models/OsDiskCreateOption.java","src/main/java/com/azure/resourcemanager/networkcloud/models/OsDiskDeleteOption.java","src/main/java/com/azure/resourcemanager/networkcloud/models/Rack.java","src/main/java/com/azure/resourcemanager/networkcloud/models/RackDefinition.java","src/main/java/com/azure/resourcemanager/networkcloud/models/RackDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/RackPatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/RackProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/RackSku.java","src/main/java/com/azure/resourcemanager/networkcloud/models/RackSkuProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/RackSkuType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/RackSkus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/Racks.java","src/main/java/com/azure/resourcemanager/networkcloud/models/RelayPrivateEndpointConnectionState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/RelayType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/RemoteVendorManagementFeature.java","src/main/java/com/azure/resourcemanager/networkcloud/models/RemoteVendorManagementStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionAgentHealthStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionAgentLicenseStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionConfiguration.java","src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionDefinitionUpdateMode.java","src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionEnforcementLevel.java","src/main/java/com/azure/resourcemanager/networkcloud/models/RuntimeProtectionStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/SecretArchiveReference.java","src/main/java/com/azure/resourcemanager/networkcloud/models/SecretArchiveSettings.java","src/main/java/com/azure/resourcemanager/networkcloud/models/SecretRotationStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/SecurityRuleDirection.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ServiceLoadBalancerBgpPeer.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ServicePrincipalInformation.java","src/main/java/com/azure/resourcemanager/networkcloud/models/SkipShutdown.java","src/main/java/com/azure/resourcemanager/networkcloud/models/SshPublicKey.java","src/main/java/com/azure/resourcemanager/networkcloud/models/StepState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/StepStateStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/StorageAppliance.java","src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceCommandSpecification.java","src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceConfigurationData.java","src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceEnableRemoteVendorManagementParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceExpansionShelf.java","src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceMetricsConfigurationStatusLogLevel.java","src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceMetricsConfigurationStatusMetricsLevel.java","src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceMonitoringConfigurationStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/StorageAppliancePatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceRunReadCommandsParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/StorageApplianceSkuSlot.java","src/main/java/com/azure/resourcemanager/networkcloud/models/StorageAppliances.java","src/main/java/com/azure/resourcemanager/networkcloud/models/StorageProfile.java","src/main/java/com/azure/resourcemanager/networkcloud/models/StringKeyValuePair.java","src/main/java/com/azure/resourcemanager/networkcloud/models/TransportProtocol.java","src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetwork.java","src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkAttachmentConfiguration.java","src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkPatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworkProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/TrunkedNetworks.java","src/main/java/com/azure/resourcemanager/networkcloud/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ValidationThreshold.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ValidationThresholdGrouping.java","src/main/java/com/azure/resourcemanager/networkcloud/models/ValidationThresholdType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachine.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineAssignRelayParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineBootMethod.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineDeviceModelType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineIpAllocationMethod.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineIsolateEmulatorThread.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePlacementHint.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePlacementHintPodAffinityScope.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePlacementHintType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePowerOffParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachinePowerState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineSchedulingExecution.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachineVirtioInterfaceType.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VirtualMachines.java","src/main/java/com/azure/resourcemanager/networkcloud/models/Volume.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VolumeDetailedStatus.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VolumePatchParameters.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VolumeProvisioningState.java","src/main/java/com/azure/resourcemanager/networkcloud/models/Volumes.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VulnerabilityScanningSettings.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VulnerabilityScanningSettingsContainerScan.java","src/main/java/com/azure/resourcemanager/networkcloud/models/VulnerabilityScanningSettingsPatch.java","src/main/java/com/azure/resourcemanager/networkcloud/models/WorkloadImpact.java","src/main/java/com/azure/resourcemanager/networkcloud/models/package-info.java","src/main/java/com/azure/resourcemanager/networkcloud/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-networkcloud/proxy-config.json b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-networkcloud/proxy-config.json index e10460627a1a..f738112fb9bc 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-networkcloud/proxy-config.json +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-networkcloud/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.networkcloud.implementation.AgentPoolsClientImpl$AgentPoolsService"],["com.azure.resourcemanager.networkcloud.implementation.BareMetalMachineKeySetsClientImpl$BareMetalMachineKeySetsService"],["com.azure.resourcemanager.networkcloud.implementation.BareMetalMachinesClientImpl$BareMetalMachinesService"],["com.azure.resourcemanager.networkcloud.implementation.BmcKeySetsClientImpl$BmcKeySetsService"],["com.azure.resourcemanager.networkcloud.implementation.CloudServicesNetworksClientImpl$CloudServicesNetworksService"],["com.azure.resourcemanager.networkcloud.implementation.ClusterManagersClientImpl$ClusterManagersService"],["com.azure.resourcemanager.networkcloud.implementation.ClustersClientImpl$ClustersService"],["com.azure.resourcemanager.networkcloud.implementation.ConsolesClientImpl$ConsolesService"],["com.azure.resourcemanager.networkcloud.implementation.KubernetesClusterFeaturesClientImpl$KubernetesClusterFeaturesService"],["com.azure.resourcemanager.networkcloud.implementation.KubernetesClustersClientImpl$KubernetesClustersService"],["com.azure.resourcemanager.networkcloud.implementation.L2NetworksClientImpl$L2NetworksService"],["com.azure.resourcemanager.networkcloud.implementation.L3NetworksClientImpl$L3NetworksService"],["com.azure.resourcemanager.networkcloud.implementation.MetricsConfigurationsClientImpl$MetricsConfigurationsService"],["com.azure.resourcemanager.networkcloud.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.networkcloud.implementation.RackSkusClientImpl$RackSkusService"],["com.azure.resourcemanager.networkcloud.implementation.RacksClientImpl$RacksService"],["com.azure.resourcemanager.networkcloud.implementation.StorageAppliancesClientImpl$StorageAppliancesService"],["com.azure.resourcemanager.networkcloud.implementation.TrunkedNetworksClientImpl$TrunkedNetworksService"],["com.azure.resourcemanager.networkcloud.implementation.VirtualMachinesClientImpl$VirtualMachinesService"],["com.azure.resourcemanager.networkcloud.implementation.VolumesClientImpl$VolumesService"]] \ No newline at end of file +[["com.azure.resourcemanager.networkcloud.implementation.AccessBridgesClientImpl$AccessBridgesService"],["com.azure.resourcemanager.networkcloud.implementation.AgentPoolsClientImpl$AgentPoolsService"],["com.azure.resourcemanager.networkcloud.implementation.BareMetalMachineKeySetsClientImpl$BareMetalMachineKeySetsService"],["com.azure.resourcemanager.networkcloud.implementation.BareMetalMachinesClientImpl$BareMetalMachinesService"],["com.azure.resourcemanager.networkcloud.implementation.BmcKeySetsClientImpl$BmcKeySetsService"],["com.azure.resourcemanager.networkcloud.implementation.CloudServicesNetworksClientImpl$CloudServicesNetworksService"],["com.azure.resourcemanager.networkcloud.implementation.ClusterManagersClientImpl$ClusterManagersService"],["com.azure.resourcemanager.networkcloud.implementation.ClustersClientImpl$ClustersService"],["com.azure.resourcemanager.networkcloud.implementation.ConsolesClientImpl$ConsolesService"],["com.azure.resourcemanager.networkcloud.implementation.KubernetesClusterFeaturesClientImpl$KubernetesClusterFeaturesService"],["com.azure.resourcemanager.networkcloud.implementation.KubernetesClustersClientImpl$KubernetesClustersService"],["com.azure.resourcemanager.networkcloud.implementation.KubernetesVersionsClientImpl$KubernetesVersionsService"],["com.azure.resourcemanager.networkcloud.implementation.L2NetworksClientImpl$L2NetworksService"],["com.azure.resourcemanager.networkcloud.implementation.L3NetworksClientImpl$L3NetworksService"],["com.azure.resourcemanager.networkcloud.implementation.MetricsConfigurationsClientImpl$MetricsConfigurationsService"],["com.azure.resourcemanager.networkcloud.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.networkcloud.implementation.RackSkusClientImpl$RackSkusService"],["com.azure.resourcemanager.networkcloud.implementation.RacksClientImpl$RacksService"],["com.azure.resourcemanager.networkcloud.implementation.StorageAppliancesClientImpl$StorageAppliancesService"],["com.azure.resourcemanager.networkcloud.implementation.TrunkedNetworksClientImpl$TrunkedNetworksService"],["com.azure.resourcemanager.networkcloud.implementation.VirtualMachinesClientImpl$VirtualMachinesService"],["com.azure.resourcemanager.networkcloud.implementation.VolumesClientImpl$VolumesService"]] \ No newline at end of file diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..21954cccdcc7 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesCreateOrUpdateSamples.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.networkcloud.generated; + +import com.azure.resourcemanager.networkcloud.models.AccessBridgeAllowedName; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeSecurityRule; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; +import com.azure.resourcemanager.networkcloud.models.SecurityRuleDirection; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for AccessBridges CreateOrUpdate. + */ +public final class AccessBridgesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/AccessBridges_CreateOrUpdate.json + */ + /** + * Sample code: Create or update access bridge. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void createOrUpdateAccessBridge(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.accessBridges() + .define(AccessBridgeAllowedName.BASTION) + .withRegion("location") + .withExistingResourceGroup("resourceGroupName") + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") + .withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withNetworkId( + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName/internalNetworks/internalNetworkName") + .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) + .withIpv4ConnectedPrefix("198.51.100.0/24") + .withIpv6ConnectedPrefix("2001:db8::/64") + .withSecurityRules( + Arrays.asList(new AccessBridgeSecurityRule().withDescription("Allow management plane egress") + .withDirection(SecurityRuleDirection.OUTBOUND) + .withIpv4Addresses(Arrays.asList("10.10.20.10-10.10.20.20")) + .withIpv6Addresses(Arrays.asList("2001:db8:abcd:12::1000-2001:db8:abcd:12::1fff")) + .withPort("24562-24570"))) + .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/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesDeleteSamples.java new file mode 100644 index 000000000000..ad88e1f94d83 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesDeleteSamples.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.networkcloud.generated; + +import com.azure.resourcemanager.networkcloud.models.AccessBridgeAllowedName; + +/** + * Samples for AccessBridges Delete. + */ +public final class AccessBridgesDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/AccessBridges_Delete.json + */ + /** + * Sample code: Delete access bridge. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void deleteAccessBridge(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.accessBridges() + .delete("resourceGroupName", AccessBridgeAllowedName.BASTION, null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesGetByResourceGroupSamples.java new file mode 100644 index 000000000000..c872758ff5f6 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesGetByResourceGroupSamples.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.networkcloud.generated; + +import com.azure.resourcemanager.networkcloud.models.AccessBridgeAllowedName; + +/** + * Samples for AccessBridges GetByResourceGroup. + */ +public final class AccessBridgesGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/AccessBridges_Get.json + */ + /** + * Sample code: Get access bridge. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void getAccessBridge(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.accessBridges() + .getByResourceGroupWithResponse("resourceGroupName", AccessBridgeAllowedName.BASTION, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesListByResourceGroupSamples.java new file mode 100644 index 000000000000..d26a4081c3a8 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesListByResourceGroupSamples.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.networkcloud.generated; + +/** + * Samples for AccessBridges ListByResourceGroup. + */ +public final class AccessBridgesListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/AccessBridges_ListByResourceGroup.json + */ + /** + * Sample code: List access bridges for resource group. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void + listAccessBridgesForResourceGroup(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.accessBridges().listByResourceGroup("resourceGroupName", null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesListSamples.java new file mode 100644 index 000000000000..26dc73bb9afe --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesListSamples.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.networkcloud.generated; + +/** + * Samples for AccessBridges List. + */ +public final class AccessBridgesListSamples { + /* + * x-ms-original-file: 2026-05-01-preview/AccessBridges_ListBySubscription.json + */ + /** + * Sample code: List access bridges for subscription. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void + listAccessBridgesForSubscription(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.accessBridges().list(null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesUpdateSamples.java new file mode 100644 index 000000000000..c474fe7e43a8 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesUpdateSamples.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.networkcloud.generated; + +import com.azure.resourcemanager.networkcloud.models.AccessBridge; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeAllowedName; +import com.azure.resourcemanager.networkcloud.models.AccessBridgePatchProperties; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeSecurityRule; +import com.azure.resourcemanager.networkcloud.models.SecurityRuleDirection; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for AccessBridges Update. + */ +public final class AccessBridgesUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/AccessBridges_Patch.json + */ + /** + * Sample code: Patch access bridge. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void patchAccessBridge(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + AccessBridge resource = manager.accessBridges() + .getByResourceGroupWithResponse("resourceGroupName", AccessBridgeAllowedName.BASTION, + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) + .withProperties(new AccessBridgePatchProperties().withSecurityRules( + Arrays.asList(new AccessBridgeSecurityRule().withDescription("Allow management plane egress") + .withDirection(SecurityRuleDirection.OUTBOUND) + .withIpv4Addresses(Arrays.asList("10.10.20.10-10.10.20.20")) + .withIpv6Addresses(Arrays.asList("2001:db8:abcd:12::1000-2001:db8:abcd:12::1fff")) + .withPort("24562-24570")))) + .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/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsCreateOrUpdateSamples.java index d1d667efac17..7824b786c2d2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -10,6 +10,7 @@ import com.azure.resourcemanager.networkcloud.models.AgentPoolUpgradeSettings; import com.azure.resourcemanager.networkcloud.models.AttachedNetworkConfiguration; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HugepagesSize; import com.azure.resourcemanager.networkcloud.models.KubernetesLabel; import com.azure.resourcemanager.networkcloud.models.KubernetesPluginType; @@ -27,9 +28,7 @@ */ public final class AgentPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Create. - * json + * x-ms-original-file: 2026-05-01-preview/AgentPools_Create.json */ /** * Sample code: Create or update Kubernetes cluster agent pool. @@ -48,7 +47,7 @@ public final class AgentPoolsCreateOrUpdateSamples { .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withAdministratorConfiguration(new AdministratorConfiguration().withAdminUsername("azure") .withSshPublicKeys(Arrays.asList(new SshPublicKey().withKeyData("fakeTokenPlaceholder")))) .withAgentOptions(new AgentOptions().withHugepagesCount(96L).withHugepagesSize(HugepagesSize.ONEG)) diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsDeleteSamples.java index f1ef9def29c3..c1adf8b1412f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class AgentPoolsDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Delete. - * json + * x-ms-original-file: 2026-05-01-preview/AgentPools_Delete.json */ /** * Sample code: Delete Kubernetes cluster agent pool. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsGetSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsGetSamples.java index fb98527ade53..0596700bab5a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsGetSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,8 +9,7 @@ */ public final class AgentPoolsGetSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Get.json + * x-ms-original-file: 2026-05-01-preview/AgentPools_Get.json */ /** * Sample code: Get Kubernetes cluster agent pool. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsListByKubernetesClusterSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsListByKubernetesClusterSamples.java index 344a484900ce..c9cd6a67c2e4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsListByKubernetesClusterSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsListByKubernetesClusterSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class AgentPoolsListByKubernetesClusterSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * AgentPools_ListByKubernetesCluster.json + * x-ms-original-file: 2026-05-01-preview/AgentPools_ListByKubernetesCluster.json */ /** * Sample code: List agent pools of the Kubernetes cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsUpdateSamples.java index a2ac10145b24..736044744d83 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -17,9 +17,7 @@ */ public final class AgentPoolsUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Patch. - * json + * x-ms-original-file: 2026-05-01-preview/AgentPools_Patch.json */ /** * Sample code: Patch Kubernetes cluster agent pool. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsCreateOrUpdateSamples.java index 13ae5b5611f4..9f8cb70415eb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsCreateOrUpdateSamples.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.resourcemanager.networkcloud.models.BareMetalMachineKeySetPrivilegeLevel; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.KeySetUser; import com.azure.resourcemanager.networkcloud.models.SshPublicKey; import java.time.OffsetDateTime; @@ -18,9 +19,7 @@ */ public final class BareMetalMachineKeySetsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachineKeySets_Create.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Create.json */ /** * Sample code: Create or update bare metal machine key set of cluster. @@ -35,7 +34,7 @@ public static void createOrUpdateBareMetalMachineKeySetOfCluster( .withExistingCluster("resourceGroupName", "clusterName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withAzureGroupId("f110271b-XXXX-4163-9b99-214d91660f0e") .withExpiration(OffsetDateTime.parse("2022-12-31T23:59:59.008Z")) .withJumpHostsAllowed(Arrays.asList("192.0.2.1", "192.0.2.5")) diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsDeleteSamples.java index 38b952c43da8..7029ed262ee7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class BareMetalMachineKeySetsDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachineKeySets_Delete.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Delete.json */ /** * Sample code: Delete bare metal machine key set of cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsGetSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsGetSamples.java index 19e5b70a05da..8a89dfd36be3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsGetSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class BareMetalMachineKeySetsGetSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachineKeySets_Get.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Get.json */ /** * Sample code: Get bare metal machine key set of cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsListByClusterSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsListByClusterSamples.java index 1bd24f9fc0dc..78f43554d0c3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsListByClusterSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsListByClusterSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class BareMetalMachineKeySetsListByClusterSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachineKeySets_ListByCluster.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_ListByCluster.json */ /** * Sample code: List bare metal machine key sets of the cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsUpdateSamples.java index e46bd184e110..e01f2a605e18 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineKeySetsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -17,9 +17,7 @@ */ public final class BareMetalMachineKeySetsUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachineKeySets_Patch.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Patch.json */ /** * Sample code: Patch bare metal machine key set of cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesCordonSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesCordonSamples.java index 477ed4c154c3..cfd8c613c9fb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesCordonSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesCordonSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,9 +12,7 @@ */ public final class BareMetalMachinesCordonSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Cordon.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Cordon.json */ /** * Sample code: Cordon bare metal machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesCreateOrUpdateSamples.java index 1ff09840703b..51d6e9276eb8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesCreateOrUpdateSamples.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.resourcemanager.networkcloud.models.AdministrativeCredentials; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.util.HashMap; import java.util.Map; @@ -14,9 +15,7 @@ */ public final class BareMetalMachinesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Create.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Create.json */ /** * Sample code: Create or update bare metal machine. @@ -31,8 +30,8 @@ public final class BareMetalMachinesCreateOrUpdateSamples { .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) - .withBmcConnectionString("bmcconnectionstring") + .withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withBmcConnectionString("redfish+https://10.10.10.16/redfish/v1/Systems/System.Embedded.1") .withBmcCredentials( new AdministrativeCredentials().withPassword("fakeTokenPlaceholder").withUsername("bmcuser")) .withBmcMacAddress("00:00:4f:00:57:00") diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesDeleteSamples.java index 3c576b40265b..4199b3ae3fce 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class BareMetalMachinesDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Delete.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Delete.json */ /** * Sample code: Delete bare metal machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesGetByResourceGroupSamples.java index fa01fe0092ac..504812d9ae11 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class BareMetalMachinesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Get.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Get.json */ /** * Sample code: Get bare metal machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesListByResourceGroupSamples.java index ed48a193e590..a8ced7c9edef 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class BareMetalMachinesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_ListByResourceGroup.json */ /** * Sample code: List bare metal machines for resource group. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesListSamples.java index 2f1f608c212c..08e5c21ad57e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class BareMetalMachinesListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_ListBySubscription.json */ /** * Sample code: List bare metal machines for subscription. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesPowerOffSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesPowerOffSamples.java index c4cc1a115b24..57ff9b7fd4c1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesPowerOffSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesPowerOffSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,9 +12,7 @@ */ public final class BareMetalMachinesPowerOffSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_PowerOff.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_PowerOff.json */ /** * Sample code: Power off bare metal machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesReimageSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesReimageSamples.java index 47162ed962eb..19fe412aa987 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesReimageSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesReimageSamples.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; +import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReimageParameters; +import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReimageSafeguardMode; + /** * Samples for BareMetalMachines Reimage. */ public final class BareMetalMachinesReimageSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Reimage.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Reimage.json */ /** * Sample code: Reimage bare metal machine. @@ -20,6 +21,8 @@ public final class BareMetalMachinesReimageSamples { */ public static void reimageBareMetalMachine(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { manager.bareMetalMachines() - .reimage("resourceGroupName", "bareMetalMachineName", com.azure.core.util.Context.NONE); + .reimage("resourceGroupName", "bareMetalMachineName", + new BareMetalMachineReimageParameters().withSafeguardMode(BareMetalMachineReimageSafeguardMode.ALL), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesReplaceSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesReplaceSamples.java index 2d9a5414bfab..902f69a41135 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesReplaceSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesReplaceSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,9 +14,7 @@ */ public final class BareMetalMachinesReplaceSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Replace.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Replace.json */ /** * Sample code: Replace bare metal machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRestartSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRestartSamples.java index 60fa5862721c..2626d392aa1c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRestartSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRestartSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class BareMetalMachinesRestartSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Restart.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Restart.json */ /** * Sample code: Restart bare metal machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunCommandSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunCommandSamples.java index d5efe0977d52..6a899a3bc489 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunCommandSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunCommandSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,9 +12,7 @@ */ public final class BareMetalMachinesRunCommandSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_RunCommand.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunCommand.json */ /** * Sample code: Run command on bare metal machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunDataExtractsRestrictedSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunDataExtractsRestrictedSamples.java index dae9fd483af7..2ac34670c0a3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunDataExtractsRestrictedSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunDataExtractsRestrictedSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,9 +13,7 @@ */ public final class BareMetalMachinesRunDataExtractsRestrictedSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_RunDataExtractsRestricted.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunDataExtractsRestricted.json */ /** * Sample code: Run restricted data extraction on bare metal machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunDataExtractsSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunDataExtractsSamples.java index 65eb28b0d0ba..793b894ed35e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunDataExtractsSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunDataExtractsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,9 +13,7 @@ */ public final class BareMetalMachinesRunDataExtractsSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_RunDataExtracts.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunDataExtracts.json */ /** * Sample code: Run data extraction on bare metal machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunReadCommandsSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunReadCommandsSamples.java index b5a944d8de99..00f57f8543a3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunReadCommandsSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesRunReadCommandsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,9 +13,7 @@ */ public final class BareMetalMachinesRunReadCommandsSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_RunReadCommands_Hostname.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunReadCommands_Hostname.json */ /** * Sample code: Run and retrieve output from a single read only command on bare metal machine. @@ -33,9 +31,7 @@ public static void runAndRetrieveOutputFromASingleReadOnlyCommandOnBareMetalMach } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_RunReadCommands_Multiple.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunReadCommands_Multiple.json */ /** * Sample code: Run and retrieve output from read only commands on bare metal machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesStartSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesStartSamples.java index aeb937e8003e..effe2ec5a68d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesStartSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesStartSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class BareMetalMachinesStartSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Start.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Start.json */ /** * Sample code: Start bare metal machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesUncordonSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesUncordonSamples.java index c70045a471a1..f713d0b04936 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesUncordonSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesUncordonSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class BareMetalMachinesUncordonSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Uncordon.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Uncordon.json */ /** * Sample code: Uncordon bare metal machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesUpdateSamples.java index 24fa957e129b..e57d2d572c4a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,9 +13,7 @@ */ public final class BareMetalMachinesUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BareMetalMachines_Patch.json + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Patch.json */ /** * Sample code: Patch bare metal machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsCreateOrUpdateSamples.java index 187041ad82d9..7b7f7cc70ec3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsCreateOrUpdateSamples.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.resourcemanager.networkcloud.models.BmcKeySetPrivilegeLevel; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.KeySetUser; import com.azure.resourcemanager.networkcloud.models.SshPublicKey; import java.time.OffsetDateTime; @@ -18,9 +19,7 @@ */ public final class BmcKeySetsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Create. - * json + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Create.json */ /** * Sample code: Create or update baseboard management controller key set of cluster. @@ -35,7 +34,7 @@ public static void createOrUpdateBaseboardManagementControllerKeySetOfCluster( .withExistingCluster("resourceGroupName", "clusterName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withAzureGroupId("f110271b-XXXX-4163-9b99-214d91660f0e") .withExpiration(OffsetDateTime.parse("2022-12-31T23:59:59.008Z")) .withPrivilegeLevel(BmcKeySetPrivilegeLevel.ADMINISTRATOR) diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsDeleteSamples.java index d0041cf7822e..77f2aefd8e7d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class BmcKeySetsDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Delete. - * json + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Delete.json */ /** * Sample code: Delete baseboard management controller key set of cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsGetSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsGetSamples.java index 7f5d49f3e608..2b8cf455411f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsGetSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,8 +9,7 @@ */ public final class BmcKeySetsGetSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Get.json + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Get.json */ /** * Sample code: Get baseboard management controller key set of cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsListByClusterSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsListByClusterSamples.java index 68fbf2083a93..e06be3c053a1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsListByClusterSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsListByClusterSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class BmcKeySetsListByClusterSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * BmcKeySets_ListByCluster.json + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_ListByCluster.json */ /** * Sample code: List baseboard management controller key sets of the cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsUpdateSamples.java index 60e8614d2cbc..fe4192bae9a7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/BmcKeySetsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -17,9 +17,7 @@ */ public final class BmcKeySetsUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Patch. - * json + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Patch.json */ /** * Sample code: Patch baseboard management controller key set of cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksCreateOrUpdateSamples.java index a4ebd34815f3..228ad98a5c8b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -10,6 +10,7 @@ import com.azure.resourcemanager.networkcloud.models.EgressEndpoint; import com.azure.resourcemanager.networkcloud.models.EndpointDependency; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -19,9 +20,7 @@ */ public final class CloudServicesNetworksCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * CloudServicesNetworks_Create.json + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Create.json */ /** * Sample code: Create or update cloud services network. @@ -36,7 +35,7 @@ public final class CloudServicesNetworksCreateOrUpdateSamples { .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) .withAdditionalEgressEndpoints(Arrays.asList(new EgressEndpoint().withCategory("azure-resource-management") .withEndpoints(Arrays.asList( @@ -46,7 +45,7 @@ public final class CloudServicesNetworksCreateOrUpdateSamples { .withMode(CloudServicesNetworkStorageMode.STANDARD) .withSizeMiB(1048576L) .withStorageApplianceId( - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/StorageAppliances/storageApplianceName")) + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName")) .create(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksDeleteSamples.java index 4e6b32edbbba..d7178e9dfe94 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class CloudServicesNetworksDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * CloudServicesNetworks_Delete.json + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Delete.json */ /** * Sample code: Delete cloud services network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksGetByResourceGroupSamples.java index 22527e99c5d4..a132746c3cc7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class CloudServicesNetworksGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * CloudServicesNetworks_Get.json + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Get.json */ /** * Sample code: Get cloud services network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListByResourceGroupSamples.java index 84e4ac60ba1a..b5c1248a92b8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class CloudServicesNetworksListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * CloudServicesNetworks_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_ListByResourceGroup.json */ /** * Sample code: List cloud services networks for resource group. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListSamples.java index 90247e4d991d..ae2c1f121601 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class CloudServicesNetworksListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * CloudServicesNetworks_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_ListBySubscription.json */ /** * Sample code: List cloud services networks for subscription. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksUpdateSamples.java index b76ab2ca7a1f..dad2f2d06388 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -19,9 +19,7 @@ */ public final class CloudServicesNetworksUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * CloudServicesNetworks_Patch.json + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Patch.json */ /** * Sample code: Patch cloud services network. @@ -43,7 +41,7 @@ public static void patchCloudServicesNetwork(com.azure.resourcemanager.networkcl .withMode(CloudServicesNetworkStorageMode.STANDARD) .withSizeMiB(1048576L) .withStorageApplianceId( - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/StorageAppliances/storageApplianceName")) + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName")) .apply(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersCreateOrUpdateSamples.java index 42daef5d57d0..4e9290b9e62a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersCreateOrUpdateSamples.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; +import com.azure.resourcemanager.networkcloud.models.DeploymentType; import com.azure.resourcemanager.networkcloud.models.ManagedResourceGroupConfiguration; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentity; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentityType; @@ -16,9 +17,7 @@ */ public final class ClusterManagersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterManagers_Create.json + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Create.json */ /** * Sample code: Create or update cluster manager. @@ -35,17 +34,16 @@ public final class ClusterManagersCreateOrUpdateSamples { "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName") .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)) + .withKind(DeploymentType.AZURE_LOCAL) .withAnalyticsWorkspaceId( - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName") + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName") .withManagedResourceGroupConfiguration( new ManagedResourceGroupConfiguration().withLocation("East US").withName("my-managed-rg")) .create(); } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterManagers_Create_Uami.json + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Create_Uami.json */ /** * Sample code: Create or update cluster manager with user assigned identity. @@ -65,8 +63,9 @@ public static void createOrUpdateClusterManagerWithUserAssignedIdentity( .withUserAssignedIdentities(mapOf( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1", new UserAssignedIdentity()))) + .withKind(DeploymentType.AZURE_LOCAL) .withAnalyticsWorkspaceId( - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName") + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName") .withManagedResourceGroupConfiguration( new ManagedResourceGroupConfiguration().withLocation("East US").withName("my-managed-rg")) .create(); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersDeleteSamples.java index 69e6f6c53fa2..5942988b81f2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class ClusterManagersDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterManagers_Delete.json + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Delete.json */ /** * Sample code: Delete cluster manager. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersGetByResourceGroupSamples.java index b76f5b1305eb..e7a38b0407d3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class ClusterManagersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Get - * .json + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Get.json */ /** * Sample code: Get cluster manager. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListByResourceGroupSamples.java index 359719ce9f2c..f1dba05d45da 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class ClusterManagersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterManagers_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_ListByResourceGroup.json */ /** * Sample code: List cluster managers for resource group. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListSamples.java index 859ca579b1ca..5b0a4fd76f9f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class ClusterManagersListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterManagers_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_ListBySubscription.json */ /** * Sample code: List cluster managers for subscription. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersUpdateRelayPrivateEndpointConnectionSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersUpdateRelayPrivateEndpointConnectionSamples.java new file mode 100644 index 000000000000..e0b2b8dff436 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersUpdateRelayPrivateEndpointConnectionSamples.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.generated; + +import com.azure.resourcemanager.networkcloud.models.ClusterManagerUpdateRelayPrivateEndpointConnectionParameters; +import com.azure.resourcemanager.networkcloud.models.RelayPrivateEndpointConnectionState; + +/** + * Samples for ClusterManagers UpdateRelayPrivateEndpointConnection. + */ +public final class ClusterManagersUpdateRelayPrivateEndpointConnectionSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_UpdateRelayPrivateEndpointConnection_Approve.json + */ + /** + * Sample code: Approve private endpoint connection. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void + approvePrivateEndpointConnection(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.clusterManagers() + .updateRelayPrivateEndpointConnection("resourceGroupName", "clusterManagerName", + new ClusterManagerUpdateRelayPrivateEndpointConnectionParameters() + .withConnectionState(RelayPrivateEndpointConnectionState.APPROVED) + .withDescription("Approving private endpoint connection") + .withPrivateEndpointResourceId( + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_UpdateRelayPrivateEndpointConnection_Reject.json + */ + /** + * Sample code: Reject private endpoint connection. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void + rejectPrivateEndpointConnection(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.clusterManagers() + .updateRelayPrivateEndpointConnection("resourceGroupName", "clusterManagerName", + new ClusterManagerUpdateRelayPrivateEndpointConnectionParameters() + .withConnectionState(RelayPrivateEndpointConnectionState.REJECTED) + .withDescription("Rejecting private endpoint connection") + .withPrivateEndpointResourceId( + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersUpdateSamples.java index 0c9f9904fd0a..5e2bcda81091 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -16,9 +16,7 @@ */ public final class ClusterManagersUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterManagers_Patch.json + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Patch.json */ /** * Sample code: Patch cluster manager. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersContinueUpdateVersionSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersContinueUpdateVersionSamples.java index 29ef7cf93e6f..f85b3cf54080 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersContinueUpdateVersionSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersContinueUpdateVersionSamples.java @@ -1,20 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.resourcemanager.networkcloud.models.ClusterContinueUpdateVersionMachineGroupTargetingMode; import com.azure.resourcemanager.networkcloud.models.ClusterContinueUpdateVersionParameters; +import com.azure.resourcemanager.networkcloud.models.ClusterContinueUpdateVersionSafeguardMode; /** * Samples for Clusters ContinueUpdateVersion. */ public final class ClustersContinueUpdateVersionSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_ContinueUpdateVersion.json + * x-ms-original-file: 2026-05-01-preview/Clusters_ContinueUpdateVersion.json */ /** * Sample code: Continue update cluster version. @@ -26,7 +25,8 @@ public final class ClustersContinueUpdateVersionSamples { manager.clusters() .continueUpdateVersion("resourceGroupName", "clusterName", new ClusterContinueUpdateVersionParameters() - .withMachineGroupTargetingMode(ClusterContinueUpdateVersionMachineGroupTargetingMode.ALPHA_BY_RACK), + .withMachineGroupTargetingMode(ClusterContinueUpdateVersionMachineGroupTargetingMode.ALPHA_BY_RACK) + .withSafeguardMode(ClusterContinueUpdateVersionSafeguardMode.ALL), com.azure.core.util.Context.NONE); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersCreateOrUpdateSamples.java index c7b6cb0e9b32..6891b7d6d12f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,7 +13,9 @@ import com.azure.resourcemanager.networkcloud.models.CommandOutputOverride; import com.azure.resourcemanager.networkcloud.models.CommandOutputSettings; import com.azure.resourcemanager.networkcloud.models.CommandOutputType; +import com.azure.resourcemanager.networkcloud.models.DeploymentType; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.IdentitySelector; import com.azure.resourcemanager.networkcloud.models.ManagedResourceGroupConfiguration; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentity; @@ -21,6 +23,7 @@ import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentityType; import com.azure.resourcemanager.networkcloud.models.RackDefinition; import com.azure.resourcemanager.networkcloud.models.RuntimeProtectionConfiguration; +import com.azure.resourcemanager.networkcloud.models.RuntimeProtectionDefinitionUpdateMode; import com.azure.resourcemanager.networkcloud.models.RuntimeProtectionEnforcementLevel; import com.azure.resourcemanager.networkcloud.models.SecretArchiveSettings; import com.azure.resourcemanager.networkcloud.models.StorageApplianceConfigurationData; @@ -39,9 +42,7 @@ */ public final class ClustersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Create. - * json + * x-ms-original-file: 2026-05-01-preview/Clusters_Create.json */ /** * Sample code: Create or update cluster. @@ -55,38 +56,42 @@ public static void createOrUpdateCluster(com.azure.resourcemanager.networkcloud. .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName") - .withType("CustomLocation")) - .withAggregatorOrSingleRackDefinition(new RackDefinition() - .withBareMetalMachineConfigurationData(Arrays.asList( - new BareMetalMachineConfigurationData() - .withBmcCredentials(new AdministrativeCredentials().withPassword("fakeTokenPlaceholder") + .withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withAggregatorOrSingleRackDefinition( + new RackDefinition() + .withBareMetalMachineConfigurationData(Arrays.asList( + new BareMetalMachineConfigurationData() + .withBmcCredentials(new AdministrativeCredentials().withPassword("fakeTokenPlaceholder") + .withUsername("username")) + .withBmcMacAddress("AA:BB:CC:DD:EE:FF") + .withBootMacAddress("00:BB:CC:DD:EE:FF") + .withMachineDetails("extraDetails") + .withMachineName("bmmName1") + .withRackSlot(1L) + .withSerialNumber("BM1219XXX"), + new BareMetalMachineConfigurationData() + .withBmcCredentials( + new AdministrativeCredentials() + .withPassword("fakeTokenPlaceholder") + .withUsername("username")) + .withBmcMacAddress("AA:BB:CC:DD:EE:00") + .withBootMacAddress("00:BB:CC:DD:EE:00") + .withMachineDetails("extraDetails") + .withMachineName("bmmName2") + .withRackSlot(2L) + .withSerialNumber("BM1219YYY"))) + .withNetworkRackId( + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName") + .withRackLocation("Foo Datacenter, Floor 3, Aisle 9, Rack 2") + .withRackSerialNumber("AA1234") + .withRackSkuId( + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName") + .withStorageApplianceConfigurationData(Arrays.asList(new StorageApplianceConfigurationData() + .withAdminCredentials(new AdministrativeCredentials().withPassword("fakeTokenPlaceholder") .withUsername("username")) - .withBmcMacAddress("AA:BB:CC:DD:EE:FF") - .withBootMacAddress("00:BB:CC:DD:EE:FF") - .withMachineDetails("extraDetails") - .withMachineName("bmmName1") .withRackSlot(1L) - .withSerialNumber("BM1219XXX"), - new BareMetalMachineConfigurationData().withBmcCredentials( - new AdministrativeCredentials().withPassword("fakeTokenPlaceholder").withUsername("username")) - .withBmcMacAddress("AA:BB:CC:DD:EE:00") - .withBootMacAddress("00:BB:CC:DD:EE:00") - .withMachineDetails("extraDetails") - .withMachineName("bmmName2") - .withRackSlot(2L) - .withSerialNumber("BM1219YYY"))) - .withNetworkRackId( - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName") - .withRackLocation("Foo Datacenter, Floor 3, Aisle 9, Rack 2") - .withRackSerialNumber("AA1234") - .withRackSkuId( - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName") - .withStorageApplianceConfigurationData(Arrays.asList(new StorageApplianceConfigurationData() - .withAdminCredentials( - new AdministrativeCredentials().withPassword("fakeTokenPlaceholder").withUsername("username")) - .withRackSlot(1L) - .withSerialNumber("BM1219XXX") - .withStorageApplianceName("vmName")))) + .withSerialNumber("BM1219XXX") + .withStorageApplianceName("vmName")))) .withClusterType(ClusterType.SINGLE_RACK) .withClusterVersion("1.0.0") .withNetworkFabricId( @@ -96,8 +101,9 @@ public static void createOrUpdateCluster(com.azure.resourcemanager.networkcloud. .withUserAssignedIdentities(mapOf( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1", new UserAssignedIdentity()))) + .withKind(DeploymentType.AZURE_LOCAL) .withAnalyticsOutputSettings(new AnalyticsOutputSettings().withAnalyticsWorkspaceId( - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName") + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName") .withAssociatedIdentity(new IdentitySelector() .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) .withUserAssignedIdentityResourceId( @@ -152,8 +158,9 @@ public static void createOrUpdateCluster(com.azure.resourcemanager.networkcloud. .withStorageApplianceName("vmName"))))) .withManagedResourceGroupConfiguration( new ManagedResourceGroupConfiguration().withLocation("East US").withName("my-managed-rg")) - .withRuntimeProtectionConfiguration( - new RuntimeProtectionConfiguration().withEnforcementLevel(RuntimeProtectionEnforcementLevel.ON_DEMAND)) + .withRuntimeProtectionConfiguration(new RuntimeProtectionConfiguration() + .withDefinitionUpdateMode(RuntimeProtectionDefinitionUpdateMode.NONE) + .withEnforcementLevel(RuntimeProtectionEnforcementLevel.ON_DEMAND)) .withSecretArchiveSettings(new SecretArchiveSettings().withAssociatedIdentity(new IdentitySelector() .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) .withUserAssignedIdentityResourceId( diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersDeleteSamples.java index 332118bb4a0f..0d10bcaf9715 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Delete. - * json + * x-ms-original-file: 2026-05-01-preview/Clusters_Delete.json */ /** * Sample code: Delete cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersDeploySamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersDeploySamples.java index 094261aa0fd0..6cad4cd0b5c3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersDeploySamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersDeploySamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,9 +12,7 @@ */ public final class ClustersDeploySamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Deploy. - * json + * x-ms-original-file: 2026-05-01-preview/Clusters_Deploy.json */ /** * Sample code: Deploy cluster. @@ -28,9 +26,7 @@ public static void deployCluster(com.azure.resourcemanager.networkcloud.NetworkC } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_Deploy_SkipValidation.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Deploy_SkipValidation.json */ /** * Sample code: Deploy cluster skipping validation. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersGetByResourceGroupSamples.java index 992467693853..0df3b4dd69aa 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,8 +9,7 @@ */ public final class ClustersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Get.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Get.json */ /** * Sample code: Get cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersInspectSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersInspectSamples.java new file mode 100644 index 000000000000..9f61dd637333 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersInspectSamples.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.networkcloud.generated; + +import com.azure.resourcemanager.networkcloud.models.ClusterInspectAdditionalAction; +import com.azure.resourcemanager.networkcloud.models.ClusterInspectParameters; +import com.azure.resourcemanager.networkcloud.models.FilterDevices; +import java.util.Arrays; + +/** + * Samples for Clusters Inspect. + */ +public final class ClustersInspectSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Clusters_Inspect.json + */ + /** + * Sample code: Inspect cluster. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void inspectCluster(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.clusters() + .inspect("resourceGroupName", "clusterName", new ClusterInspectParameters() + .withAdditionalActions(Arrays.asList(ClusterInspectAdditionalAction.RESET_HARDWARE)) + .withFilterDevices(new FilterDevices().withBareMetalMachineNames(Arrays.asList("machine1", "machine2")) + .withRackNames(Arrays.asList("rack1"))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersListByResourceGroupSamples.java index 318fb5faae5d..0b9b70ba3260 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class ClustersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/Clusters_ListByResourceGroup.json */ /** * Sample code: List clusters for resource group. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersListSamples.java index c7ee47502b78..31ef8225126f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class ClustersListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/Clusters_ListBySubscription.json */ /** * Sample code: List clusters for subscription. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersRotateCredentialSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersRotateCredentialSamples.java new file mode 100644 index 000000000000..961430318942 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersRotateCredentialSamples.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.networkcloud.generated; + +import com.azure.resourcemanager.networkcloud.models.ClusterRotateCredentialParameters; +import java.util.Arrays; + +/** + * Samples for Clusters RotateCredential. + */ +public final class ClustersRotateCredentialSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Clusters_RotateCredential.json + */ + /** + * Sample code: Rotate one or more managed credentials. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void + rotateOneOrMoreManagedCredentials(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.clusters() + .rotateCredential("resourceGroupName", "clusterName", + new ClusterRotateCredentialParameters().withCredentials(Arrays.asList("BMC Credential")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersScanRuntimeSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersScanRuntimeSamples.java index 11f395ea9223..1c779448bcce 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersScanRuntimeSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersScanRuntimeSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,9 +12,7 @@ */ public final class ClustersScanRuntimeSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_ScanRuntime.json + * x-ms-original-file: 2026-05-01-preview/Clusters_ScanRuntime.json */ /** * Sample code: Execute a runtime protection scan on the cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersUpdateSamples.java index 4fa9ed86dee8..f883f86e99fc 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -19,6 +19,7 @@ import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentityType; import com.azure.resourcemanager.networkcloud.models.RackDefinition; import com.azure.resourcemanager.networkcloud.models.RuntimeProtectionConfiguration; +import com.azure.resourcemanager.networkcloud.models.RuntimeProtectionDefinitionUpdateMode; import com.azure.resourcemanager.networkcloud.models.RuntimeProtectionEnforcementLevel; import com.azure.resourcemanager.networkcloud.models.SecretArchiveSettings; import com.azure.resourcemanager.networkcloud.models.StorageApplianceConfigurationData; @@ -37,9 +38,7 @@ */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_Patch_UpdateStrategy.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_UpdateStrategy.json */ /** * Sample code: Patch update strategy. @@ -61,9 +60,7 @@ public static void patchUpdateStrategy(com.azure.resourcemanager.networkcloud.Ne } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_Patch_VulnerabilityScanning.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_VulnerabilityScanning.json */ /** * Sample code: Patch vulnerability scanning. @@ -82,9 +79,7 @@ public static void patchVulnerabilityScanning(com.azure.resourcemanager.networkc } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_Patch_Location.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_Location.json */ /** * Sample code: Patch cluster location. @@ -102,9 +97,7 @@ public static void patchClusterLocation(com.azure.resourcemanager.networkcloud.N } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_Patch_AggregatorOrSingleRackDefinition.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_AggregatorOrSingleRackDefinition.json */ /** * Sample code: Patch cluster AggregatorOrSingleRackDefinition. @@ -161,9 +154,7 @@ public static void patchClusterAggregatorOrSingleRackDefinition( } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_Patch_CommandOutput.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_CommandOutput.json */ /** * Sample code: Patch cluster command output. @@ -197,9 +188,7 @@ public static void patchClusterCommandOutput(com.azure.resourcemanager.networkcl } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_Patch_RuntimeProtectionConfiguration.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_RuntimeProtectionConfiguration.json */ /** * Sample code: Patch runtime protection configuration. @@ -213,15 +202,14 @@ public static void patchClusterCommandOutput(com.azure.resourcemanager.networkcl .getValue(); resource.update() .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) - .withRuntimeProtectionConfiguration( - new RuntimeProtectionConfiguration().withEnforcementLevel(RuntimeProtectionEnforcementLevel.ON_DEMAND)) + .withRuntimeProtectionConfiguration(new RuntimeProtectionConfiguration() + .withDefinitionUpdateMode(RuntimeProtectionDefinitionUpdateMode.AUTOMATIC) + .withEnforcementLevel(RuntimeProtectionEnforcementLevel.ON_DEMAND)) .apply(); } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_Patch_SecretArchive.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_SecretArchive.json */ /** * Sample code: Patch secret archive. @@ -243,9 +231,7 @@ public static void patchSecretArchive(com.azure.resourcemanager.networkcloud.Net } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_Patch_AnalyticsOutput.json + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_AnalyticsOutput.json */ /** * Sample code: Patch cluster analytics output. @@ -265,7 +251,7 @@ public static void patchClusterAnalyticsOutput(com.azure.resourcemanager.network "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", new UserAssignedIdentity()))) .withAnalyticsOutputSettings(new AnalyticsOutputSettings().withAnalyticsWorkspaceId( - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName") + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName") .withAssociatedIdentity(new IdentitySelector() .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) .withUserAssignedIdentityResourceId( diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersUpdateVersionSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersUpdateVersionSamples.java index 77040a2cdf23..297223d88902 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersUpdateVersionSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ClustersUpdateVersionSamples.java @@ -1,19 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.resourcemanager.networkcloud.models.ClusterUpdateVersionParameters; +import com.azure.resourcemanager.networkcloud.models.ClusterUpdateVersionSafeguardMode; /** * Samples for Clusters UpdateVersion. */ public final class ClustersUpdateVersionSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Clusters_UpdateVersion.json + * x-ms-original-file: 2026-05-01-preview/Clusters_UpdateVersion.json */ /** * Sample code: Update cluster version. @@ -23,6 +22,8 @@ public final class ClustersUpdateVersionSamples { public static void updateClusterVersion(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { manager.clusters() .updateVersion("resourceGroupName", "clusterName", - new ClusterUpdateVersionParameters().withTargetClusterVersion("2.0"), com.azure.core.util.Context.NONE); + new ClusterUpdateVersionParameters().withSafeguardMode(ClusterUpdateVersionSafeguardMode.ALL) + .withTargetClusterVersion("2.0"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesCreateOrUpdateSamples.java index c5ee2e94507f..80256b7a0f44 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesCreateOrUpdateSamples.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.resourcemanager.networkcloud.models.ConsoleEnabled; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.SshPublicKey; import java.time.OffsetDateTime; import java.util.HashMap; @@ -16,9 +17,7 @@ */ public final class ConsolesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Create. - * json + * x-ms-original-file: 2026-05-01-preview/Consoles_Create.json */ /** * Sample code: Create or update virtual machine console. @@ -33,7 +32,7 @@ public final class ConsolesCreateOrUpdateSamples { .withExistingVirtualMachine("resourceGroupName", "virtualMachineName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withEnabled(ConsoleEnabled.TRUE) .withSshPublicKey(new SshPublicKey().withKeyData("fakeTokenPlaceholder")) .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesDeleteSamples.java index 12de1267b979..83124c729952 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class ConsolesDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Delete. - * json + * x-ms-original-file: 2026-05-01-preview/Consoles_Delete.json */ /** * Sample code: Delete virtual machine console. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesGetSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesGetSamples.java index b7c45749cb69..8efea87c336c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesGetSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,8 +9,7 @@ */ public final class ConsolesGetSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Get.json + * x-ms-original-file: 2026-05-01-preview/Consoles_Get.json */ /** * Sample code: Get virtual machine console. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesListByVirtualMachineSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesListByVirtualMachineSamples.java index 77273cf7ed69..a146515cc99c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesListByVirtualMachineSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesListByVirtualMachineSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class ConsolesListByVirtualMachineSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Consoles_ListByVirtualMachine.json + * x-ms-original-file: 2026-05-01-preview/Consoles_ListByVirtualMachine.json */ /** * Sample code: List consoles of the virtual machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesUpdateSamples.java index f2a0915a0b1d..6b4cd1381093 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/ConsolesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -16,8 +16,7 @@ */ public final class ConsolesUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Patch.json + * x-ms-original-file: 2026-05-01-preview/Consoles_Patch.json */ /** * Sample code: Patch virtual machine console. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesCreateOrUpdateSamples.java index 3990b1fff92f..1252bc63985a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,9 +14,7 @@ */ public final class KubernetesClusterFeaturesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusterFeatures_Create.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Create.json */ /** * Sample code: Create or update Kubernetes cluster feature. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesDeleteSamples.java index 077cdb8d0dee..713dc01f5e79 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class KubernetesClusterFeaturesDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusterFeatures_Delete.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Delete.json */ /** * Sample code: Delete Kubernetes cluster feature. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesGetSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesGetSamples.java index 11f868597f3d..fe7aaadfaa1d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesGetSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class KubernetesClusterFeaturesGetSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusterFeatures_Get.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Get.json */ /** * Sample code: Get Kubernetes cluster feature. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesListByKubernetesClusterSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesListByKubernetesClusterSamples.java index eb7bd77ebf60..d1a2f9e03c16 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesListByKubernetesClusterSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesListByKubernetesClusterSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class KubernetesClusterFeaturesListByKubernetesClusterSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusterFeatures_ListByKubernetesCluster.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_ListByKubernetesCluster.json */ /** * Sample code: List features for the Kubernetes cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesUpdateSamples.java index 23cd5f8a8a9c..bfda10f05f2a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterFeaturesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -15,9 +15,7 @@ */ public final class KubernetesClusterFeaturesUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusterFeatures_Patch.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Patch.json */ /** * Sample code: Patch Kubernetes cluster feature. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersCreateOrUpdateSamples.java index 736ff1f806fc..868ca7554fb3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -17,6 +17,7 @@ import com.azure.resourcemanager.networkcloud.models.BgpServiceLoadBalancerConfiguration; import com.azure.resourcemanager.networkcloud.models.ControlPlaneNodeConfiguration; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.FabricPeeringEnabled; import com.azure.resourcemanager.networkcloud.models.HugepagesSize; import com.azure.resourcemanager.networkcloud.models.InitialAgentPoolConfiguration; @@ -41,9 +42,7 @@ */ public final class KubernetesClustersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusters_Create.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Create.json */ /** * Sample code: Create or update Kubernetes cluster. @@ -58,7 +57,7 @@ public final class KubernetesClustersCreateOrUpdateSamples { .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withControlPlaneNodeConfiguration(new ControlPlaneNodeConfiguration() .withAdministratorConfiguration(new AdministratorConfiguration().withAdminUsername("azure") .withSshPublicKeys(Arrays.asList(new SshPublicKey().withKeyData("fakeTokenPlaceholder")))) @@ -85,11 +84,11 @@ public final class KubernetesClustersCreateOrUpdateSamples { .withCount(3L) .withLabels(Arrays.asList(new KubernetesLabel().withKey("fakeTokenPlaceholder").withValue("true"))) .withMode(AgentPoolMode.SYSTEM) - .withName("SystemPool-1") .withTaints( Arrays.asList(new KubernetesLabel().withKey("fakeTokenPlaceholder").withValue("true:NoSchedule"))) .withUpgradeSettings(new AgentPoolUpgradeSettings().withMaxSurge("1")) - .withVmSkuName("NC_P46_224_v1"))) + .withVmSkuName("NC_P46_224_v1") + .withName("SystemPool-1"))) .withKubernetesVersion("1.XX.Y") .withNetworkConfiguration(new NetworkConfiguration() .withAttachedNetworkConfiguration(new AttachedNetworkConfiguration() @@ -143,9 +142,7 @@ public final class KubernetesClustersCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusters_L2LoadBalancer_Create.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_L2LoadBalancer_Create.json */ /** * Sample code: Create or update Kubernetes cluster with a layer 2 load balancer. @@ -160,7 +157,7 @@ public static void createOrUpdateKubernetesClusterWithALayer2LoadBalancer( .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withControlPlaneNodeConfiguration(new ControlPlaneNodeConfiguration() .withAdministratorConfiguration(new AdministratorConfiguration().withAdminUsername("azure") .withSshPublicKeys(Arrays.asList(new SshPublicKey().withKeyData("fakeTokenPlaceholder")))) @@ -187,11 +184,11 @@ public static void createOrUpdateKubernetesClusterWithALayer2LoadBalancer( .withCount(3L) .withLabels(Arrays.asList(new KubernetesLabel().withKey("fakeTokenPlaceholder").withValue("true"))) .withMode(AgentPoolMode.SYSTEM) - .withName("SystemPool-1") .withTaints( Arrays.asList(new KubernetesLabel().withKey("fakeTokenPlaceholder").withValue("true:NoSchedule"))) .withUpgradeSettings(new AgentPoolUpgradeSettings().withMaxSurge("1")) - .withVmSkuName("NC_P46_224_v1"))) + .withVmSkuName("NC_P46_224_v1") + .withName("SystemPool-1"))) .withKubernetesVersion("1.XX.Y") .withNetworkConfiguration(new NetworkConfiguration() .withAttachedNetworkConfiguration(new AttachedNetworkConfiguration() diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersDeleteSamples.java index 700b249bd101..d64557e7e217 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class KubernetesClustersDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusters_Delete.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Delete.json */ /** * Sample code: Delete Kubernetes cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersGetByResourceGroupSamples.java index 0abd6a8786e1..4be54dc1eeb2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class KubernetesClustersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusters_Get.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Get.json */ /** * Sample code: Get Kubernetes cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersListByResourceGroupSamples.java index 28313cde7d9d..4d1e3cb39de1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class KubernetesClustersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusters_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_ListByResourceGroup.json */ /** * Sample code: List Kubernetes clusters for resource group. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersListSamples.java index 0012d38d054d..0bcf93166499 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class KubernetesClustersListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusters_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_ListBySubscription.json */ /** * Sample code: List Kubernetes clusters for subscription. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersRestartNodeSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersRestartNodeSamples.java index e13e13c6bf3a..3d7258ad47e5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersRestartNodeSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersRestartNodeSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,9 +11,7 @@ */ public final class KubernetesClustersRestartNodeSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusters_RestartNode.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_RestartNode.json */ /** * Sample code: Restart a Kubernetes cluster node. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersUpdateSamples.java index bdcf1878d756..7e166953ce5d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClustersUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -17,9 +17,7 @@ */ public final class KubernetesClustersUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * KubernetesClusters_Patch.json + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Patch.json */ /** * Sample code: Patch Kubernetes cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..11b24ad81d04 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsCreateOrUpdateSamples.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.networkcloud.generated; + +import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for KubernetesVersions CreateOrUpdate. + */ +public final class KubernetesVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Create.json + */ + /** + * Sample code: Create or update Kubernetes versions. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void + createOrUpdateKubernetesVersions(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.kubernetesVersions() + .define("default") + .withRegion("location") + .withExistingResourceGroup("resourceGroupName") + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") + .withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) + .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/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsDeleteSamples.java new file mode 100644 index 000000000000..e978138798c0 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsDeleteSamples.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.networkcloud.generated; + +/** + * Samples for KubernetesVersions Delete. + */ +public final class KubernetesVersionsDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Delete.json + */ + /** + * Sample code: Delete Kubernetes versions. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void deleteKubernetesVersions(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.kubernetesVersions() + .delete("resourceGroupName", "default", null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..ea0d48209ef2 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsGetByResourceGroupSamples.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.networkcloud.generated; + +/** + * Samples for KubernetesVersions GetByResourceGroup. + */ +public final class KubernetesVersionsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Get.json + */ + /** + * Sample code: Get Kubernetes versions. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void getKubernetesVersions(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.kubernetesVersions() + .getByResourceGroupWithResponse("resourceGroupName", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsListByResourceGroupSamples.java new file mode 100644 index 000000000000..4f9a08871595 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsListByResourceGroupSamples.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.networkcloud.generated; + +/** + * Samples for KubernetesVersions ListByResourceGroup. + */ +public final class KubernetesVersionsListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_ListByResourceGroup.json + */ + /** + * Sample code: List Kubernetes versions for resource group. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void + listKubernetesVersionsForResourceGroup(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.kubernetesVersions() + .listByResourceGroup("resourceGroupName", null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsListSamples.java new file mode 100644 index 000000000000..c816a43b3c99 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsListSamples.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.networkcloud.generated; + +/** + * Samples for KubernetesVersions List. + */ +public final class KubernetesVersionsListSamples { + /* + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_ListBySubscription.json + */ + /** + * Sample code: List Kubernetes versions for subscription. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void + listKubernetesVersionsForSubscription(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + manager.kubernetesVersions().list(null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsUpdateSamples.java new file mode 100644 index 000000000000..0ed47f5a2365 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsUpdateSamples.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.networkcloud.generated; + +import com.azure.resourcemanager.networkcloud.models.KubernetesVersion; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for KubernetesVersions Update. + */ +public final class KubernetesVersionsUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_UpdateTags.json + */ + /** + * Sample code: Patch Kubernetes versions. + * + * @param manager Entry point to NetworkCloudManager. + */ + public static void patchKubernetesVersions(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + KubernetesVersion resource = manager.kubernetesVersions() + .getByResourceGroupWithResponse("resourceGroupName", "default", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")).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/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksCreateOrUpdateSamples.java index 0ca6b7db400d..f16be45fc809 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksCreateOrUpdateSamples.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; import java.util.HashMap; import java.util.Map; @@ -14,9 +15,7 @@ */ public final class L2NetworksCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Create. - * json + * x-ms-original-file: 2026-05-01-preview/L2Networks_Create.json */ /** * Sample code: Create or update L2 network. @@ -30,7 +29,7 @@ public static void createOrUpdateL2Network(com.azure.resourcemanager.networkclou .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withL2IsolationDomainId( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName") .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksDeleteSamples.java index 238a414a31dd..510c873d47bc 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class L2NetworksDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Delete. - * json + * x-ms-original-file: 2026-05-01-preview/L2Networks_Delete.json */ /** * Sample code: Delete L2 network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksGetByResourceGroupSamples.java index 9e0b58f45db6..45a7c1df7662 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,8 +9,7 @@ */ public final class L2NetworksGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Get.json + * x-ms-original-file: 2026-05-01-preview/L2Networks_Get.json */ /** * Sample code: Get L2 network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListByResourceGroupSamples.java index 7a9a129c5f6c..7f83378e64a0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class L2NetworksListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * L2Networks_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/L2Networks_ListByResourceGroup.json */ /** * Sample code: List L2 networks for resource group. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListSamples.java index c9cfcdb9b96d..c8da017e6efe 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class L2NetworksListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * L2Networks_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/L2Networks_ListBySubscription.json */ /** * Sample code: List L2 networks for subscription. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksUpdateSamples.java index 5d0c241f3cb6..0c8667d79943 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,9 +13,7 @@ */ public final class L2NetworksUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Patch. - * json + * x-ms-original-file: 2026-05-01-preview/L2Networks_Patch.json */ /** * Sample code: Patch L2 network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksCreateOrUpdateSamples.java index 6efd6cc51059..8417ac9e79d5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksCreateOrUpdateSamples.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.IpAllocationType; import java.util.HashMap; import java.util.Map; @@ -14,9 +15,7 @@ */ public final class L3NetworksCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Create. - * json + * x-ms-original-file: 2026-05-01-preview/L3Networks_Create.json */ /** * Sample code: Create or update L3 network. @@ -30,7 +29,7 @@ public static void createOrUpdateL3Network(com.azure.resourcemanager.networkclou .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withL3IsolationDomainId( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName") .withVlan(12L) diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksDeleteSamples.java index e2a06de7c686..f1b43816e351 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class L3NetworksDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Delete. - * json + * x-ms-original-file: 2026-05-01-preview/L3Networks_Delete.json */ /** * Sample code: Delete L3 network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksGetByResourceGroupSamples.java index 8daf1c5ef09b..197d97168ae0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,15 +9,14 @@ */ public final class L3NetworksGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Get.json + * x-ms-original-file: 2026-05-01-preview/L3Networks_Get.json */ /** - * Sample code: Get L3network. + * Sample code: Get L3 network. * * @param manager Entry point to NetworkCloudManager. */ - public static void getL3network(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { + public static void getL3Network(com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) { manager.l3Networks() .getByResourceGroupWithResponse("resourceGroupName", "l3NetworkName", com.azure.core.util.Context.NONE); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListByResourceGroupSamples.java index cfbc26d3eef3..5b8bda6218eb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class L3NetworksListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * L3Networks_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/L3Networks_ListByResourceGroup.json */ /** * Sample code: List L3 networks for resource group. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListSamples.java index 84e2e5b8e03e..2e435973d450 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class L3NetworksListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * L3Networks_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/L3Networks_ListBySubscription.json */ /** * Sample code: List L3 networks for subscription. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksUpdateSamples.java index cd6454860630..02871cadd733 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,9 +13,7 @@ */ public final class L3NetworksUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Patch. - * json + * x-ms-original-file: 2026-05-01-preview/L3Networks_Patch.json */ /** * Sample code: Patch L3 network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsCreateOrUpdateSamples.java index 9c96d170f738..057799d36ebd 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsCreateOrUpdateSamples.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -14,9 +15,7 @@ */ public final class MetricsConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterMetricsConfigurations_Create.json + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Create.json */ /** * Sample code: Create or update metrics configuration of cluster. @@ -31,7 +30,7 @@ public static void createOrUpdateMetricsConfigurationOfCluster( .withExistingCluster("resourceGroupName", "clusterName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withCollectionInterval(15L) .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) .withEnabledMetrics(Arrays.asList("metric1", "metric2")) diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsDeleteSamples.java index f477ced31d2e..c30b9e404a4a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class MetricsConfigurationsDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterMetricsConfigurations_Delete.json + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Delete.json */ /** * Sample code: Delete metrics configuration of cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsGetSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsGetSamples.java index 1f7cb24341b7..24300d6ffee3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsGetSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class MetricsConfigurationsGetSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterMetricsConfigurations_Get.json + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Get.json */ /** * Sample code: Get metrics configuration of cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsListByClusterSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsListByClusterSamples.java index 8d6a1b2312d3..c8956510fc97 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsListByClusterSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsListByClusterSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class MetricsConfigurationsListByClusterSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterMetricsConfigurations_ListByCluster.json + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_ListByCluster.json */ /** * Sample code: List metrics configurations of the cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsUpdateSamples.java index c8eee198ca0e..45880c818368 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,9 +14,7 @@ */ public final class MetricsConfigurationsUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * ClusterMetricsConfigurations_Patch.json + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Patch.json */ /** * Sample code: Patch metrics configuration of cluster. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/OperationsListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/OperationsListSamples.java index 50cddf702809..c80a2f6d688a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/OperationsListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/OperationsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Operations_List. - * json + * x-ms-original-file: 2026-05-01-preview/Operations_List.json */ /** * Sample code: List resource provider operations. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RackSkusGetSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RackSkusGetSamples.java index 5c6aa37a7543..fedf4e34e206 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RackSkusGetSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RackSkusGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,8 +9,7 @@ */ public final class RackSkusGetSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/RackSkus_Get.json + * x-ms-original-file: 2026-05-01-preview/RackSkus_Get.json */ /** * Sample code: Get rack SKU resource. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RackSkusListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RackSkusListSamples.java index 9ccd7efa539f..f8d326785fd1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RackSkusListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RackSkusListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class RackSkusListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * RackSkus_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/RackSkus_ListBySubscription.json */ /** * Sample code: List rack SKUs for subscription. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksCreateOrUpdateSamples.java index 270c988b9763..9c50116f885d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksCreateOrUpdateSamples.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.util.HashMap; import java.util.Map; @@ -13,8 +14,7 @@ */ public final class RacksCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Create.json + * x-ms-original-file: 2026-05-01-preview/Racks_Create.json */ /** * Sample code: Create or update rack. @@ -28,7 +28,7 @@ public static void createOrUpdateRack(com.azure.resourcemanager.networkcloud.Net .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withAvailabilityZone("1") .withRackLocation("Rack 28") .withRackSerialNumber("RACK_SERIAL_NUMBER") diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksDeleteSamples.java index 856d5912f9fa..fef5cb8c19fb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,8 +9,7 @@ */ public final class RacksDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Delete.json + * x-ms-original-file: 2026-05-01-preview/Racks_Delete.json */ /** * Sample code: Delete rack. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksGetByResourceGroupSamples.java index d3d89332c8e7..9d31afec72af 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,8 +9,7 @@ */ public final class RacksGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Get.json + * x-ms-original-file: 2026-05-01-preview/Racks_Get.json */ /** * Sample code: Get rack. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksListByResourceGroupSamples.java index 9287f1f58266..15896cb0c39b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class RacksListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Racks_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/Racks_ListByResourceGroup.json */ /** * Sample code: List racks for resource group. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksListSamples.java index 9936a2ab8d9e..1fe97a62ee77 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class RacksListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Racks_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/Racks_ListBySubscription.json */ /** * Sample code: List racks for subscription. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksUpdateSamples.java index 2055cd5b9812..af7b9d6bff9f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/RacksUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,8 +13,7 @@ */ public final class RacksUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Patch.json + * x-ms-original-file: 2026-05-01-preview/Racks_Patch.json */ /** * Sample code: Patch rack. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesCreateOrUpdateSamples.java index e1ce11a60c78..86a316206a9b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesCreateOrUpdateSamples.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.resourcemanager.networkcloud.models.AdministrativeCredentials; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.util.HashMap; import java.util.Map; @@ -14,9 +15,7 @@ */ public final class StorageAppliancesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * StorageAppliances_Create.json + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Create.json */ /** * Sample code: Create or update storage appliance. @@ -31,7 +30,7 @@ public final class StorageAppliancesCreateOrUpdateSamples { .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withAdministratorCredentials( new AdministrativeCredentials().withPassword("fakeTokenPlaceholder").withUsername("adminUser")) .withRackId( diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesDeleteSamples.java index 3755b2d36d9f..53f653ca63f0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class StorageAppliancesDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * StorageAppliances_Delete.json + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Delete.json */ /** * Sample code: Delete storage appliance. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesDisableRemoteVendorManagementSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesDisableRemoteVendorManagementSamples.java index 72fffd728071..d12187a573a0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesDisableRemoteVendorManagementSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesDisableRemoteVendorManagementSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class StorageAppliancesDisableRemoteVendorManagementSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * StorageAppliances_DisableRemoteVendorManagement.json + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_DisableRemoteVendorManagement.json */ /** * Sample code: Turn off remote vendor management for storage appliance. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesEnableRemoteVendorManagementSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesEnableRemoteVendorManagementSamples.java index 1c3dd15c1878..3ef170ce4fef 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesEnableRemoteVendorManagementSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesEnableRemoteVendorManagementSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,9 +12,7 @@ */ public final class StorageAppliancesEnableRemoteVendorManagementSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * StorageAppliances_EnableRemoteVendorManagement.json + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_EnableRemoteVendorManagement.json */ /** * Sample code: Turn on remote vendor management for storage appliance. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesGetByResourceGroupSamples.java index 89c668eb63f0..4d5f0b28d829 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class StorageAppliancesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * StorageAppliances_Get.json + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Get.json */ /** * Sample code: Get storage appliance. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesListByResourceGroupSamples.java index f662766099a9..fba2ecbb7a6b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class StorageAppliancesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * StorageAppliances_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_ListByResourceGroup.json */ /** * Sample code: List storage appliances for resource group. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesListSamples.java index 7608faf99711..225b401e2ef8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class StorageAppliancesListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * StorageAppliances_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_ListBySubscription.json */ /** * Sample code: List storage appliances for subscription. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesRunReadCommandsSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesRunReadCommandsSamples.java index a279ca27c122..c613b1fbaef0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesRunReadCommandsSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesRunReadCommandsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,9 +13,7 @@ */ public final class StorageAppliancesRunReadCommandsSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * StorageAppliances_RunReadCommands.json + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_RunReadCommands.json */ /** * Sample code: Run and retrieve output from read only commands on storage appliance. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesUpdateSamples.java index 8a05feb2bb99..f320c59e411e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,9 +13,7 @@ */ public final class StorageAppliancesUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * StorageAppliances_Patch.json + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Patch.json */ /** * Sample code: Patch storage appliance. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksCreateOrUpdateSamples.java index 23827e013786..6f18bb0bdf32 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksCreateOrUpdateSamples.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -14,9 +15,7 @@ */ public final class TrunkedNetworksCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * TrunkedNetworks_Create.json + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Create.json */ /** * Sample code: Create or update trunked network. @@ -31,7 +30,7 @@ public final class TrunkedNetworksCreateOrUpdateSamples { .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withIsolationDomainIds(Arrays.asList( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName", "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName")) diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksDeleteSamples.java index c5c99abf1518..9dd4193ebad5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class TrunkedNetworksDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * TrunkedNetworks_Delete.json + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Delete.json */ /** * Sample code: Delete trunked network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksGetByResourceGroupSamples.java index c9c578ee1dfd..9796442dcfaf 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class TrunkedNetworksGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Get - * .json + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Get.json */ /** * Sample code: Get Trunked network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListByResourceGroupSamples.java index 0372f64ea7a8..952034f1f26c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class TrunkedNetworksListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * TrunkedNetworks_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_ListByResourceGroup.json */ /** * Sample code: List Trunked networks for resource group. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListSamples.java index 0a40c08bda09..5b21e96f504f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class TrunkedNetworksListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * TrunkedNetworks_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_ListBySubscription.json */ /** * Sample code: List trunked networks for subscription. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksUpdateSamples.java index f7951c2226ff..19c6636505a2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,9 +13,7 @@ */ public final class TrunkedNetworksUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * TrunkedNetworks_Patch.json + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Patch.json */ /** * Sample code: Patch trunked network. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesAssignRelaySamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesAssignRelaySamples.java index 56797535b797..a7b6c8083811 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesAssignRelaySamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesAssignRelaySamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,9 +12,7 @@ */ public final class VirtualMachinesAssignRelaySamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_AssignRelay.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_AssignRelay.json */ /** * Sample code: Assign relay to the Microsoft.HybridCompute machine for a virtual machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesCreateOrUpdateSamples.java index 5744b52cc5a9..3e0b892fa8a2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesCreateOrUpdateSamples.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.resourcemanager.networkcloud.models.DefaultGateway; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.ImageRepositoryCredentials; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentity; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentityType; @@ -32,9 +33,7 @@ */ public final class VirtualMachinesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_Create.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Create.json */ /** * Sample code: Create or update virtual machine. @@ -49,7 +48,7 @@ public final class VirtualMachinesCreateOrUpdateSamples { .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withAdminUsername("username") .withCloudServicesNetworkAttachment(new NetworkAttachment().withAttachedNetworkId( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName") diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesDeleteSamples.java index c38e462a91bc..51024a6bd8d5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class VirtualMachinesDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_Delete.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Delete.json */ /** * Sample code: Delete virtual machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesGetByResourceGroupSamples.java index 809ed93b2ca3..519cbc263493 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class VirtualMachinesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Get - * .json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Get.json */ /** * Sample code: Get virtual machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesListByResourceGroupSamples.java index f81ed79e9684..c74bebdf35d1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class VirtualMachinesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_ListByResourceGroup.json */ /** * Sample code: List virtual machines for resource group. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesListSamples.java index abe7effa8eb8..89b67dd6c4c2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class VirtualMachinesListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_ListBySubscription.json */ /** * Sample code: List virtual machines for subscription. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesPowerOffSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesPowerOffSamples.java index ba50bebabb3e..593225bf2223 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesPowerOffSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesPowerOffSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,9 +12,7 @@ */ public final class VirtualMachinesPowerOffSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_PowerOff.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_PowerOff.json */ /** * Sample code: Power off virtual machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesReimageSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesReimageSamples.java index b98368881891..157c7c3bc87d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesReimageSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesReimageSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class VirtualMachinesReimageSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_Reimage.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Reimage.json */ /** * Sample code: Reimage virtual machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesRestartSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesRestartSamples.java index ac37e016ec74..0ad1d38c83b2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesRestartSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesRestartSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class VirtualMachinesRestartSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_Restart.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Restart.json */ /** * Sample code: Restart virtual machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesStartSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesStartSamples.java index b07faa397a88..23341b4fcbd5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesStartSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesStartSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class VirtualMachinesStartSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_Start.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Start.json */ /** * Sample code: Start virtual machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesUpdateSamples.java index ea2376f448ee..dcb9d8f0c97a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -17,9 +17,7 @@ */ public final class VirtualMachinesUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * VirtualMachines_Patch.json + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Patch.json */ /** * Sample code: Patch virtual machine. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesCreateOrUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesCreateOrUpdateSamples.java index 7860aa9354fa..5289061ab82d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesCreateOrUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesCreateOrUpdateSamples.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.util.HashMap; import java.util.Map; @@ -13,8 +14,7 @@ */ public final class VolumesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Create.json + * x-ms-original-file: 2026-05-01-preview/Volumes_Create.json */ /** * Sample code: Create or update volume. @@ -28,11 +28,11 @@ public static void createOrUpdateVolume(com.azure.resourcemanager.networkcloud.N .withExistingResourceGroup("resourceGroupName") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName") - .withType("CustomLocation")) + .withType(ExtendedLocationType.CUSTOM_LOCATION)) .withSizeMiB(1048576L) .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) .withStorageApplianceId( - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/StorageAppliances/storageApplianceName") + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName") .create(); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesDeleteSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesDeleteSamples.java index 560eec215480..7f6ff2c3591b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesDeleteSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,8 +9,7 @@ */ public final class VolumesDeleteSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Delete.json + * x-ms-original-file: 2026-05-01-preview/Volumes_Delete.json */ /** * Sample code: Delete volume. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesGetByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesGetByResourceGroupSamples.java index f87751168899..60fbee6832bf 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesGetByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,8 +9,7 @@ */ public final class VolumesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Get.json + * x-ms-original-file: 2026-05-01-preview/Volumes_Get.json */ /** * Sample code: Get volume. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesListByResourceGroupSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesListByResourceGroupSamples.java index 0e349bc6e6ac..0ce827157732 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesListByResourceGroupSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class VolumesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Volumes_ListByResourceGroup.json + * x-ms-original-file: 2026-05-01-preview/Volumes_ListByResourceGroup.json */ /** * Sample code: List volumes for resource group. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesListSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesListSamples.java index 88513c4a7e5a..c2ae1a375571 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesListSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -9,9 +9,7 @@ */ public final class VolumesListSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ - * Volumes_ListBySubscription.json + * x-ms-original-file: 2026-05-01-preview/Volumes_ListBySubscription.json */ /** * Sample code: List volume for subscription. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesUpdateSamples.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesUpdateSamples.java index 920917da1a1b..5695cd6e29bd 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesUpdateSamples.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/samples/java/com/azure/resourcemanager/networkcloud/generated/VolumesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,8 +13,7 @@ */ public final class VolumesUpdateSamples { /* - * x-ms-original-file: - * specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Patch.json + * x-ms-original-file: 2026-05-01-preview/Volumes_Patch.json */ /** * Sample code: Patch volume. diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AadConfigurationTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AadConfigurationTests.java index 3906a37fa49c..847dab32e8e4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AadConfigurationTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AadConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,15 +12,16 @@ public final class AadConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AadConfiguration model = BinaryData.fromString("{\"adminGroupObjectIds\":[\"aivwitqscywu\",\"gwol\"]}") + AadConfiguration model = BinaryData.fromString("{\"adminGroupObjectIds\":[\"htmdvy\",\"gikdgsz\",\"w\"]}") .toObject(AadConfiguration.class); - Assertions.assertEquals("aivwitqscywu", model.adminGroupObjectIds().get(0)); + Assertions.assertEquals("htmdvy", model.adminGroupObjectIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AadConfiguration model = new AadConfiguration().withAdminGroupObjectIds(Arrays.asList("aivwitqscywu", "gwol")); + AadConfiguration model + = new AadConfiguration().withAdminGroupObjectIds(Arrays.asList("htmdvy", "gikdgsz", "w")); model = BinaryData.fromObject(model).toObject(AadConfiguration.class); - Assertions.assertEquals("aivwitqscywu", model.adminGroupObjectIds().get(0)); + Assertions.assertEquals("htmdvy", model.adminGroupObjectIds().get(0)); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgeEndpointTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgeEndpointTests.java new file mode 100644 index 000000000000..8db8287d9446 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgeEndpointTests.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.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeEndpoint; + +public final class AccessBridgeEndpointTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessBridgeEndpoint model = BinaryData.fromString( + "{\"fqdn\":\"tbciqfouflmm\",\"ipv4Address\":\"zsm\",\"ipv6Address\":\"mglougpbkw\",\"name\":\"utduqktapspwgcu\"}") + .toObject(AccessBridgeEndpoint.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgeInnerTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgeInnerTests.java new file mode 100644 index 000000000000..be80d9540732 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgeInnerTests.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.fluent.models.AccessBridgeInner; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeSecurityRule; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; +import com.azure.resourcemanager.networkcloud.models.SecurityRuleDirection; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class AccessBridgeInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessBridgeInner model = BinaryData.fromString( + "{\"properties\":{\"ipv4ConnectedPrefix\":\"ijbpzvgnwzsymgl\",\"ipv6ConnectedPrefix\":\"fcyzkohdbihanufh\",\"networkId\":\"cbjy\",\"securityRules\":[{\"description\":\"th\",\"direction\":\"Outbound\",\"ipv4Addresses\":[\"bifpikxwczb\",\"scnpqxuhivy\",\"n\",\"wby\"],\"ipv6Addresses\":[\"xvd\"],\"port\":\"mjgr\"}],\"detailedStatus\":\"Degraded\",\"detailedStatusMessage\":\"ukxgaud\",\"endpoints\":[{\"fqdn\":\"h\",\"ipv4Address\":\"cnyejhkryhtnapcz\",\"ipv6Address\":\"okjye\",\"name\":\"kvnipjoxz\"},{\"fqdn\":\"chgejspodm\",\"ipv4Address\":\"lzydehojwyahux\",\"ipv6Address\":\"pmqnja\",\"name\":\"ixjsprozvcputeg\"},{\"fqdn\":\"wmfdatscmdvpjhul\",\"ipv4Address\":\"uvm\",\"ipv6Address\":\"ozkrwfndiodjpslw\",\"name\":\"dpvwryoqpsoaccta\"},{\"fqdn\":\"kljla\",\"ipv4Address\":\"cr\",\"ipv6Address\":\"fdfdosygexpa\",\"name\":\"akhmsbzjhcrz\"}],\"protocol\":\"UDP\",\"provisioningState\":\"Accepted\"},\"etag\":\"xaolth\",\"extendedLocation\":{\"name\":\"trg\",\"type\":\"EdgeZone\"},\"location\":\"pfzfsinzgvfc\",\"tags\":{\"lluwfzitonpeq\":\"zoxxjtf\"},\"id\":\"pjkjlxofpdv\",\"name\":\"pfxxy\",\"type\":\"ininmay\"}") + .toObject(AccessBridgeInner.class); + Assertions.assertEquals("pfzfsinzgvfc", model.location()); + Assertions.assertEquals("zoxxjtf", model.tags().get("lluwfzitonpeq")); + Assertions.assertEquals("trg", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.extendedLocation().type()); + Assertions.assertEquals("ijbpzvgnwzsymgl", model.ipv4ConnectedPrefix()); + Assertions.assertEquals("fcyzkohdbihanufh", model.ipv6ConnectedPrefix()); + Assertions.assertEquals("cbjy", model.networkId()); + Assertions.assertEquals("th", model.securityRules().get(0).description()); + Assertions.assertEquals(SecurityRuleDirection.OUTBOUND, model.securityRules().get(0).direction()); + Assertions.assertEquals("bifpikxwczb", model.securityRules().get(0).ipv4Addresses().get(0)); + Assertions.assertEquals("xvd", model.securityRules().get(0).ipv6Addresses().get(0)); + Assertions.assertEquals("mjgr", model.securityRules().get(0).port()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AccessBridgeInner model = new AccessBridgeInner().withLocation("pfzfsinzgvfc") + .withTags(mapOf("lluwfzitonpeq", "zoxxjtf")) + .withExtendedLocation(new ExtendedLocation().withName("trg").withType(ExtendedLocationType.EDGE_ZONE)) + .withIpv4ConnectedPrefix("ijbpzvgnwzsymgl") + .withIpv6ConnectedPrefix("fcyzkohdbihanufh") + .withNetworkId("cbjy") + .withSecurityRules(Arrays.asList(new AccessBridgeSecurityRule().withDescription("th") + .withDirection(SecurityRuleDirection.OUTBOUND) + .withIpv4Addresses(Arrays.asList("bifpikxwczb", "scnpqxuhivy", "n", "wby")) + .withIpv6Addresses(Arrays.asList("xvd")) + .withPort("mjgr"))); + model = BinaryData.fromObject(model).toObject(AccessBridgeInner.class); + Assertions.assertEquals("pfzfsinzgvfc", model.location()); + Assertions.assertEquals("zoxxjtf", model.tags().get("lluwfzitonpeq")); + Assertions.assertEquals("trg", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.extendedLocation().type()); + Assertions.assertEquals("ijbpzvgnwzsymgl", model.ipv4ConnectedPrefix()); + Assertions.assertEquals("fcyzkohdbihanufh", model.ipv6ConnectedPrefix()); + Assertions.assertEquals("cbjy", model.networkId()); + Assertions.assertEquals("th", model.securityRules().get(0).description()); + Assertions.assertEquals(SecurityRuleDirection.OUTBOUND, model.securityRules().get(0).direction()); + Assertions.assertEquals("bifpikxwczb", model.securityRules().get(0).ipv4Addresses().get(0)); + Assertions.assertEquals("xvd", model.securityRules().get(0).ipv6Addresses().get(0)); + Assertions.assertEquals("mjgr", model.securityRules().get(0).port()); + } + + // 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/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgeListTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgeListTests.java new file mode 100644 index 000000000000..378160706133 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgeListTests.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.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.implementation.models.AccessBridgeList; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; +import com.azure.resourcemanager.networkcloud.models.SecurityRuleDirection; +import org.junit.jupiter.api.Assertions; + +public final class AccessBridgeListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessBridgeList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"ipv4ConnectedPrefix\":\"fidfvzw\",\"ipv6ConnectedPrefix\":\"uht\",\"networkId\":\"mwisdkfthwxmnt\",\"securityRules\":[{\"description\":\"opvkmijcm\",\"direction\":\"Inbound\",\"ipv4Addresses\":[\"ufufsrp\",\"mzidnsezcxtb\",\"sgfyccsnew\"],\"ipv6Addresses\":[\"z\",\"eiachboosflnr\"],\"port\":\"sfqpteehz\"},{\"description\":\"ypyqrimzinp\",\"direction\":\"Outbound\",\"ipv4Addresses\":[\"dkirsoodqxhcr\",\"nohjt\",\"kwh\"],\"ipv6Addresses\":[\"ifiyipjxsqwpgrj\",\"znorcj\",\"vsnb\",\"xqabnmocpcysh\"],\"port\":\"rzafbljjgpbtoqcj\"},{\"description\":\"ljavbqid\",\"direction\":\"Outbound\",\"ipv4Addresses\":[\"zyulp\",\"u\"],\"ipv6Addresses\":[\"rlkhbzhfepgzgq\",\"xzlocxscp\",\"ierhhbcsglummaj\"],\"port\":\"j\"},{\"description\":\"dxob\",\"direction\":\"Outbound\",\"ipv4Addresses\":[\"k\",\"pxokajionp\"],\"ipv6Addresses\":[\"xg\"],\"port\":\"txgcpodgmaajr\"}],\"detailedStatus\":\"Running\",\"detailedStatusMessage\":\"wzrlovmclwhij\",\"endpoints\":[{\"fqdn\":\"ctbzaq\",\"ipv4Address\":\"sycbkbfk\",\"ipv6Address\":\"kdkexxp\",\"name\":\"fmxa\"},{\"fqdn\":\"fjpgddtocjjxhvp\",\"ipv4Address\":\"uexhdzx\",\"ipv6Address\":\"qeojnxqbzvddntw\",\"name\":\"eic\"},{\"fqdn\":\"w\",\"ipv4Address\":\"zao\",\"ipv6Address\":\"uhrhcffcyddgl\",\"name\":\"t\"},{\"fqdn\":\"qkwpyeicxmqc\",\"ipv4Address\":\"q\",\"ipv6Address\":\"khixuigdtopbo\",\"name\":\"og\"}],\"protocol\":\"TCP\",\"provisioningState\":\"Canceled\"},\"etag\":\"m\",\"extendedLocation\":{\"name\":\"uhrzayvvt\",\"type\":\"CustomLocation\"},\"location\":\"dfgiot\",\"tags\":{\"efgugnxk\":\"utqxlngx\",\"hjybigehoqfbo\":\"xdqmidtthzrvqdra\",\"zlcuiywgqywgndrv\":\"skanyk\",\"ocpecfvmmco\":\"nhzgpphrcgyn\"},\"id\":\"fsxlzevgbmqjqa\",\"name\":\"c\",\"type\":\"pmivkwlzu\"}],\"nextLink\":\"c\"}") + .toObject(AccessBridgeList.class); + Assertions.assertEquals("dfgiot", model.value().get(0).location()); + Assertions.assertEquals("utqxlngx", model.value().get(0).tags().get("efgugnxk")); + Assertions.assertEquals("uhrzayvvt", model.value().get(0).extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); + Assertions.assertEquals("fidfvzw", model.value().get(0).ipv4ConnectedPrefix()); + Assertions.assertEquals("uht", model.value().get(0).ipv6ConnectedPrefix()); + Assertions.assertEquals("mwisdkfthwxmnt", model.value().get(0).networkId()); + Assertions.assertEquals("opvkmijcm", model.value().get(0).securityRules().get(0).description()); + Assertions.assertEquals(SecurityRuleDirection.INBOUND, model.value().get(0).securityRules().get(0).direction()); + Assertions.assertEquals("ufufsrp", model.value().get(0).securityRules().get(0).ipv4Addresses().get(0)); + Assertions.assertEquals("z", model.value().get(0).securityRules().get(0).ipv6Addresses().get(0)); + Assertions.assertEquals("sfqpteehz", model.value().get(0).securityRules().get(0).port()); + Assertions.assertEquals("c", model.nextLink()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgePatchParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgePatchParametersTests.java new file mode 100644 index 000000000000..4a8109e76fcc --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgePatchParametersTests.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.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.models.AccessBridgePatchParameters; +import com.azure.resourcemanager.networkcloud.models.AccessBridgePatchProperties; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeSecurityRule; +import com.azure.resourcemanager.networkcloud.models.SecurityRuleDirection; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class AccessBridgePatchParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessBridgePatchParameters model = BinaryData.fromString( + "{\"properties\":{\"securityRules\":[{\"description\":\"bbjfddgmbmbexp\",\"direction\":\"Outbound\",\"ipv4Addresses\":[\"q\"],\"ipv6Addresses\":[\"lfp\"],\"port\":\"psalgbqux\"}]},\"tags\":{\"rkujy\":\"yjgzjaoyfhrtxiln\"}}") + .toObject(AccessBridgePatchParameters.class); + Assertions.assertEquals("bbjfddgmbmbexp", model.properties().securityRules().get(0).description()); + Assertions.assertEquals(SecurityRuleDirection.OUTBOUND, model.properties().securityRules().get(0).direction()); + Assertions.assertEquals("q", model.properties().securityRules().get(0).ipv4Addresses().get(0)); + Assertions.assertEquals("lfp", model.properties().securityRules().get(0).ipv6Addresses().get(0)); + Assertions.assertEquals("psalgbqux", model.properties().securityRules().get(0).port()); + Assertions.assertEquals("yjgzjaoyfhrtxiln", model.tags().get("rkujy")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AccessBridgePatchParameters model + = new AccessBridgePatchParameters().withProperties(new AccessBridgePatchProperties() + .withSecurityRules(Arrays.asList(new AccessBridgeSecurityRule().withDescription("bbjfddgmbmbexp") + .withDirection(SecurityRuleDirection.OUTBOUND) + .withIpv4Addresses(Arrays.asList("q")) + .withIpv6Addresses(Arrays.asList("lfp")) + .withPort("psalgbqux")))) + .withTags(mapOf("rkujy", "yjgzjaoyfhrtxiln")); + model = BinaryData.fromObject(model).toObject(AccessBridgePatchParameters.class); + Assertions.assertEquals("bbjfddgmbmbexp", model.properties().securityRules().get(0).description()); + Assertions.assertEquals(SecurityRuleDirection.OUTBOUND, model.properties().securityRules().get(0).direction()); + Assertions.assertEquals("q", model.properties().securityRules().get(0).ipv4Addresses().get(0)); + Assertions.assertEquals("lfp", model.properties().securityRules().get(0).ipv6Addresses().get(0)); + Assertions.assertEquals("psalgbqux", model.properties().securityRules().get(0).port()); + Assertions.assertEquals("yjgzjaoyfhrtxiln", model.tags().get("rkujy")); + } + + // 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/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgePatchPropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgePatchPropertiesTests.java new file mode 100644 index 000000000000..c6d9e9bd80cd --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgePatchPropertiesTests.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.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.models.AccessBridgePatchProperties; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeSecurityRule; +import com.azure.resourcemanager.networkcloud.models.SecurityRuleDirection; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class AccessBridgePatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessBridgePatchProperties model = BinaryData.fromString( + "{\"securityRules\":[{\"description\":\"juvf\",\"direction\":\"Inbound\",\"ipv4Addresses\":[\"lyxwjkcprbnwbx\",\"jvtbvpyss\",\"dnrujqguhmuouqfp\",\"wzwbnguitn\"],\"ipv6Addresses\":[\"zga\",\"x\"],\"port\":\"fizuckyf\"}]}") + .toObject(AccessBridgePatchProperties.class); + Assertions.assertEquals("juvf", model.securityRules().get(0).description()); + Assertions.assertEquals(SecurityRuleDirection.INBOUND, model.securityRules().get(0).direction()); + Assertions.assertEquals("lyxwjkcprbnwbx", model.securityRules().get(0).ipv4Addresses().get(0)); + Assertions.assertEquals("zga", model.securityRules().get(0).ipv6Addresses().get(0)); + Assertions.assertEquals("fizuckyf", model.securityRules().get(0).port()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AccessBridgePatchProperties model = new AccessBridgePatchProperties() + .withSecurityRules(Arrays.asList(new AccessBridgeSecurityRule().withDescription("juvf") + .withDirection(SecurityRuleDirection.INBOUND) + .withIpv4Addresses(Arrays.asList("lyxwjkcprbnwbx", "jvtbvpyss", "dnrujqguhmuouqfp", "wzwbnguitn")) + .withIpv6Addresses(Arrays.asList("zga", "x")) + .withPort("fizuckyf"))); + model = BinaryData.fromObject(model).toObject(AccessBridgePatchProperties.class); + Assertions.assertEquals("juvf", model.securityRules().get(0).description()); + Assertions.assertEquals(SecurityRuleDirection.INBOUND, model.securityRules().get(0).direction()); + Assertions.assertEquals("lyxwjkcprbnwbx", model.securityRules().get(0).ipv4Addresses().get(0)); + Assertions.assertEquals("zga", model.securityRules().get(0).ipv6Addresses().get(0)); + Assertions.assertEquals("fizuckyf", model.securityRules().get(0).port()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgePropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgePropertiesTests.java new file mode 100644 index 000000000000..a94723157980 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgePropertiesTests.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.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.fluent.models.AccessBridgeProperties; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeSecurityRule; +import com.azure.resourcemanager.networkcloud.models.SecurityRuleDirection; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class AccessBridgePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessBridgeProperties model = BinaryData.fromString( + "{\"ipv4ConnectedPrefix\":\"ybb\",\"ipv6ConnectedPrefix\":\"odepoogin\",\"networkId\":\"vamih\",\"securityRules\":[{\"description\":\"arxzxtheot\",\"direction\":\"Inbound\",\"ipv4Addresses\":[\"yevc\",\"iqihn\",\"un\"],\"ipv6Addresses\":[\"jzrnf\",\"gxg\",\"spemvtzfk\",\"fublj\"],\"port\":\"fxqeof\"},{\"description\":\"e\",\"direction\":\"Outbound\",\"ipv4Addresses\":[\"jbasvmsmjqulngs\",\"tnb\"],\"ipv6Addresses\":[\"zgcwrw\",\"lxxwrljdouskc\",\"vkocrcjdkwtn\"],\"port\":\"xbnjbiksq\"},{\"description\":\"lssai\",\"direction\":\"Outbound\",\"ipv4Addresses\":[\"wnzlljfmppeeb\",\"mgxsab\",\"yqduujit\"],\"ipv6Addresses\":[\"zdzevndh\",\"rwpdappdsbdkvwrw\"],\"port\":\"feusnhut\"}],\"detailedStatus\":\"Degraded\",\"detailedStatusMessage\":\"mrldhu\",\"endpoints\":[{\"fqdn\":\"datqxhocdgeabl\",\"ipv4Address\":\"huticndvkao\",\"ipv6Address\":\"yiftyhxhuro\",\"name\":\"tyxolniwpwc\"}],\"protocol\":\"UDP\",\"provisioningState\":\"Canceled\"}") + .toObject(AccessBridgeProperties.class); + Assertions.assertEquals("ybb", model.ipv4ConnectedPrefix()); + Assertions.assertEquals("odepoogin", model.ipv6ConnectedPrefix()); + Assertions.assertEquals("vamih", model.networkId()); + Assertions.assertEquals("arxzxtheot", model.securityRules().get(0).description()); + Assertions.assertEquals(SecurityRuleDirection.INBOUND, model.securityRules().get(0).direction()); + Assertions.assertEquals("yevc", model.securityRules().get(0).ipv4Addresses().get(0)); + Assertions.assertEquals("jzrnf", model.securityRules().get(0).ipv6Addresses().get(0)); + Assertions.assertEquals("fxqeof", model.securityRules().get(0).port()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AccessBridgeProperties model = new AccessBridgeProperties().withIpv4ConnectedPrefix("ybb") + .withIpv6ConnectedPrefix("odepoogin") + .withNetworkId("vamih") + .withSecurityRules(Arrays.asList( + new AccessBridgeSecurityRule().withDescription("arxzxtheot") + .withDirection(SecurityRuleDirection.INBOUND) + .withIpv4Addresses(Arrays.asList("yevc", "iqihn", "un")) + .withIpv6Addresses(Arrays.asList("jzrnf", "gxg", "spemvtzfk", "fublj")) + .withPort("fxqeof"), + new AccessBridgeSecurityRule().withDescription("e") + .withDirection(SecurityRuleDirection.OUTBOUND) + .withIpv4Addresses(Arrays.asList("jbasvmsmjqulngs", "tnb")) + .withIpv6Addresses(Arrays.asList("zgcwrw", "lxxwrljdouskc", "vkocrcjdkwtn")) + .withPort("xbnjbiksq"), + new AccessBridgeSecurityRule().withDescription("lssai") + .withDirection(SecurityRuleDirection.OUTBOUND) + .withIpv4Addresses(Arrays.asList("wnzlljfmppeeb", "mgxsab", "yqduujit")) + .withIpv6Addresses(Arrays.asList("zdzevndh", "rwpdappdsbdkvwrw")) + .withPort("feusnhut"))); + model = BinaryData.fromObject(model).toObject(AccessBridgeProperties.class); + Assertions.assertEquals("ybb", model.ipv4ConnectedPrefix()); + Assertions.assertEquals("odepoogin", model.ipv6ConnectedPrefix()); + Assertions.assertEquals("vamih", model.networkId()); + Assertions.assertEquals("arxzxtheot", model.securityRules().get(0).description()); + Assertions.assertEquals(SecurityRuleDirection.INBOUND, model.securityRules().get(0).direction()); + Assertions.assertEquals("yevc", model.securityRules().get(0).ipv4Addresses().get(0)); + Assertions.assertEquals("jzrnf", model.securityRules().get(0).ipv6Addresses().get(0)); + Assertions.assertEquals("fxqeof", model.securityRules().get(0).port()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgeSecurityRuleTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgeSecurityRuleTests.java new file mode 100644 index 000000000000..47a7acad37b4 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgeSecurityRuleTests.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.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeSecurityRule; +import com.azure.resourcemanager.networkcloud.models.SecurityRuleDirection; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class AccessBridgeSecurityRuleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessBridgeSecurityRule model = BinaryData.fromString( + "{\"description\":\"iawxklry\",\"direction\":\"Outbound\",\"ipv4Addresses\":[\"kbasyypn\",\"dhsgcba\",\"phejkotynqgoulz\"],\"ipv6Addresses\":[\"i\",\"wyqkgfgibm\",\"dgak\"],\"port\":\"qsrxybzqqed\"}") + .toObject(AccessBridgeSecurityRule.class); + Assertions.assertEquals("iawxklry", model.description()); + Assertions.assertEquals(SecurityRuleDirection.OUTBOUND, model.direction()); + Assertions.assertEquals("kbasyypn", model.ipv4Addresses().get(0)); + Assertions.assertEquals("i", model.ipv6Addresses().get(0)); + Assertions.assertEquals("qsrxybzqqed", model.port()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AccessBridgeSecurityRule model = new AccessBridgeSecurityRule().withDescription("iawxklry") + .withDirection(SecurityRuleDirection.OUTBOUND) + .withIpv4Addresses(Arrays.asList("kbasyypn", "dhsgcba", "phejkotynqgoulz")) + .withIpv6Addresses(Arrays.asList("i", "wyqkgfgibm", "dgak")) + .withPort("qsrxybzqqed"); + model = BinaryData.fromObject(model).toObject(AccessBridgeSecurityRule.class); + Assertions.assertEquals("iawxklry", model.description()); + Assertions.assertEquals(SecurityRuleDirection.OUTBOUND, model.direction()); + Assertions.assertEquals("kbasyypn", model.ipv4Addresses().get(0)); + Assertions.assertEquals("i", model.ipv6Addresses().get(0)); + Assertions.assertEquals("qsrxybzqqed", model.port()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesCreateOrUpdateMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..d0082df715a1 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesCreateOrUpdateMockTests.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.networkcloud.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.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.AccessBridge; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeAllowedName; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeSecurityRule; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; +import com.azure.resourcemanager.networkcloud.models.SecurityRuleDirection; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class AccessBridgesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"ipv4ConnectedPrefix\":\"pxklurccl\",\"ipv6ConnectedPrefix\":\"xa\",\"networkId\":\"n\",\"securityRules\":[{\"description\":\"zposewxigpxvkqm\",\"direction\":\"Inbound\",\"ipv4Addresses\":[\"vpifd\",\"aifyzyzeyuubeids\"],\"ipv6Addresses\":[\"ytoithgygvfl\",\"gvdihoynkrxwetwk\"],\"port\":\"rcyrucpcunnu\"},{\"description\":\"qumoeno\",\"direction\":\"Inbound\",\"ipv4Addresses\":[\"enhqhskndnelq\",\"aadl\",\"nwf\",\"anniyopetxivcnr\"],\"ipv6Addresses\":[\"nucaephblkwqpat\",\"bqsdtcjbctvi\",\"uzqymtuowog\",\"gitsqh\"],\"port\":\"vbrzcdb\"}],\"detailedStatus\":\"Running\",\"detailedStatusMessage\":\"ndscxmxeatk\",\"endpoints\":[{\"fqdn\":\"nrd\",\"ipv4Address\":\"ibqbnaomhjrm\",\"ipv6Address\":\"hmaxljalfi\",\"name\":\"jmobca\"},{\"fqdn\":\"de\",\"ipv4Address\":\"qcwgaxfgvaknokz\",\"ipv6Address\":\"jzrltixldzy\",\"name\":\"ytpqsixymmpujiv\"}],\"protocol\":\"UDP\",\"provisioningState\":\"Succeeded\"},\"etag\":\"vsmb\",\"extendedLocation\":{\"name\":\"slzoyov\",\"type\":\"EdgeZone\"},\"location\":\"bpqvybefg\",\"tags\":{\"lubses\":\"nokcv\"},\"id\":\"vcuartrhun\",\"name\":\"pirykycndzfqiv\",\"type\":\"reuykbbmnwagl\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetworkCloudManager manager = NetworkCloudManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + AccessBridge response = manager.accessBridges() + .define(AccessBridgeAllowedName.PRIVATE_VAULT) + .withRegion("skihmxrfd") + .withExistingResourceGroup("kyeclcdigpta") + .withExtendedLocation(new ExtendedLocation().withName("zlrayme").withType(ExtendedLocationType.EDGE_ZONE)) + .withNetworkId("cyzyzjdnrqjbt") + .withTags(mapOf("yshtuwgmev", "rednw", "xeqipx", "afpwzyifrkgwl", "sfayorpravkjoges", "zdyi")) + .withIpv4ConnectedPrefix("zmqxucyci") + .withIpv6ConnectedPrefix("clxiutg") + .withSecurityRules(Arrays.asList( + new AccessBridgeSecurityRule().withDescription("oqa") + .withDirection(SecurityRuleDirection.OUTBOUND) + .withIpv4Addresses(Arrays.asList("yh", "w")) + .withIpv6Addresses(Arrays.asList("atbwbqam", "e", "liys", "pkcvmwf")) + .withPort("uxx"), + new AccessBridgeSecurityRule().withDescription("myw") + .withDirection(SecurityRuleDirection.INBOUND) + .withIpv4Addresses(Arrays.asList("c", "miciij", "pkzfbojxj")) + .withIpv6Addresses(Arrays.asList("myqwixvcpwnkwywz", "ofalickduoiqtam", "yvsk", "xrwzawnvsbcf")) + .withPort("zagxnvhycvdi"), + new AccessBridgeSecurityRule().withDescription("rzr") + .withDirection(SecurityRuleDirection.INBOUND) + .withIpv4Addresses(Arrays.asList("yufutrwp")) + .withIpv6Addresses(Arrays.asList("ye", "z")) + .withPort("dhme"))) + .create(); + + Assertions.assertEquals("bpqvybefg", response.location()); + Assertions.assertEquals("nokcv", response.tags().get("lubses")); + Assertions.assertEquals("slzoyov", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, response.extendedLocation().type()); + Assertions.assertEquals("pxklurccl", response.ipv4ConnectedPrefix()); + Assertions.assertEquals("xa", response.ipv6ConnectedPrefix()); + Assertions.assertEquals("n", response.networkId()); + Assertions.assertEquals("zposewxigpxvkqm", response.securityRules().get(0).description()); + Assertions.assertEquals(SecurityRuleDirection.INBOUND, response.securityRules().get(0).direction()); + Assertions.assertEquals("vpifd", response.securityRules().get(0).ipv4Addresses().get(0)); + Assertions.assertEquals("ytoithgygvfl", response.securityRules().get(0).ipv6Addresses().get(0)); + Assertions.assertEquals("rcyrucpcunnu", response.securityRules().get(0).port()); + } + + // 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/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesGetByResourceGroupWithResponseMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesGetByResourceGroupWithResponseMockTests.java new file mode 100644 index 000000000000..d18afc3b56ec --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesGetByResourceGroupWithResponseMockTests.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.networkcloud.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.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.AccessBridge; +import com.azure.resourcemanager.networkcloud.models.AccessBridgeAllowedName; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; +import com.azure.resourcemanager.networkcloud.models.SecurityRuleDirection; +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 AccessBridgesGetByResourceGroupWithResponseMockTests { + @Test + public void testGetByResourceGroupWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"ipv4ConnectedPrefix\":\"pfdqwowftptnu\",\"ipv6ConnectedPrefix\":\"tkschgcgqyhl\",\"networkId\":\"seyqrhvyeldotjv\",\"securityRules\":[{\"description\":\"swskuk\",\"direction\":\"Inbound\",\"ipv4Addresses\":[\"bvwispkx\"],\"ipv6Addresses\":[\"xfkndlqvtwknvgm\",\"bugtywatmqa\",\"kueatgroeshoy\"],\"port\":\"zcbyfq\"},{\"description\":\"faoytehqpuv\",\"direction\":\"Outbound\",\"ipv4Addresses\":[\"mtdwcky\"],\"ipv6Addresses\":[\"ejnndljdju\",\"kb\",\"req\"],\"port\":\"n\"},{\"description\":\"eysfaqegplw\",\"direction\":\"Inbound\",\"ipv4Addresses\":[\"w\",\"d\",\"vbxgkqusyb\"],\"ipv6Addresses\":[\"dacarvvlfnty\",\"tpo\",\"wenaz\"],\"port\":\"r\"},{\"description\":\"zrsq\",\"direction\":\"Inbound\",\"ipv4Addresses\":[\"kdnwqapfgsdpcve\",\"smzhhkuuipldqqct\",\"kva\"],\"ipv6Addresses\":[\"htjqvqyvw\"],\"port\":\"hta\"}],\"detailedStatus\":\"Failed\",\"detailedStatusMessage\":\"zzy\",\"endpoints\":[{\"fqdn\":\"sxivzrrryvei\",\"ipv4Address\":\"pskdyzatvfuzk\",\"ipv6Address\":\"tjvv\",\"name\":\"xwigsye\"},{\"fqdn\":\"qdsmjtg\",\"ipv4Address\":\"gdgkki\",\"ipv6Address\":\"plkcsm\",\"name\":\"hwtbbaedorvvm\"}],\"protocol\":\"TCP\",\"provisioningState\":\"Succeeded\"},\"etag\":\"bdgwumgxdgd\",\"extendedLocation\":{\"name\":\"pabgdexjddvjsaqw\",\"type\":\"EdgeZone\"},\"location\":\"mwllcolsrsxapt\",\"tags\":{\"jbekpeeksnbksdq\":\"excgjokjljnhvl\",\"poq\":\"jvyklxeslkhhust\",\"g\":\"avnwqj\"},\"id\":\"knlejjjkxybwfd\",\"name\":\"kjbztensvkzykj\",\"type\":\"jknsxfwu\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetworkCloudManager manager = NetworkCloudManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + AccessBridge response = manager.accessBridges() + .getByResourceGroupWithResponse("ovwmbjlzqsczpgvd", AccessBridgeAllowedName.BASTION, + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("mwllcolsrsxapt", response.location()); + Assertions.assertEquals("excgjokjljnhvl", response.tags().get("jbekpeeksnbksdq")); + Assertions.assertEquals("pabgdexjddvjsaqw", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, response.extendedLocation().type()); + Assertions.assertEquals("pfdqwowftptnu", response.ipv4ConnectedPrefix()); + Assertions.assertEquals("tkschgcgqyhl", response.ipv6ConnectedPrefix()); + Assertions.assertEquals("seyqrhvyeldotjv", response.networkId()); + Assertions.assertEquals("swskuk", response.securityRules().get(0).description()); + Assertions.assertEquals(SecurityRuleDirection.INBOUND, response.securityRules().get(0).direction()); + Assertions.assertEquals("bvwispkx", response.securityRules().get(0).ipv4Addresses().get(0)); + Assertions.assertEquals("xfkndlqvtwknvgm", response.securityRules().get(0).ipv6Addresses().get(0)); + Assertions.assertEquals("zcbyfq", response.securityRules().get(0).port()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesListByResourceGroupMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesListByResourceGroupMockTests.java new file mode 100644 index 000000000000..a6ee42218426 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesListByResourceGroupMockTests.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.networkcloud.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.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.AccessBridge; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; +import com.azure.resourcemanager.networkcloud.models.SecurityRuleDirection; +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 AccessBridgesListByResourceGroupMockTests { + @Test + public void testListByResourceGroup() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"ipv4ConnectedPrefix\":\"zfav\",\"ipv6ConnectedPrefix\":\"zwfbcyaykmmfzs\",\"networkId\":\"fwxrzxmdew\",\"securityRules\":[{\"description\":\"krplbjazejww\",\"direction\":\"Outbound\",\"ipv4Addresses\":[\"y\",\"suhbrnn\",\"jxsqwjhqkbiwetp\"],\"ipv6Addresses\":[\"c\",\"qiqyhgfsetzlexbs\",\"ledynojpz\",\"uwfbzkkdtnhqsy\"],\"port\":\"ljselp\"},{\"description\":\"bafvafhlbylcc\",\"direction\":\"Inbound\",\"ipv4Addresses\":[\"rhyzdf\",\"rsofpltdbmairrh\",\"hfnrac\",\"npq\"],\"ipv6Addresses\":[\"uuj\",\"ouhdawsigrb\"],\"port\":\"bxsjybvitvqkj\"}],\"detailedStatus\":\"Running\",\"detailedStatusMessage\":\"umtggmuwdchozfn\",\"endpoints\":[{\"fqdn\":\"lv\",\"ipv4Address\":\"oakizvoai\",\"ipv6Address\":\"a\",\"name\":\"nuwiguyxlykwph\"},{\"fqdn\":\"zc\",\"ipv4Address\":\"hmpejtlkexaonw\",\"ipv6Address\":\"kcq\",\"name\":\"xhxknlc\"},{\"fqdn\":\"mmkyu\",\"ipv4Address\":\"jubyqjfkakfq\",\"ipv6Address\":\"kemyil\",\"name\":\"dxjascowvfdj\"}],\"protocol\":\"TCP\",\"provisioningState\":\"Provisioning\"},\"etag\":\"lkksnmgzvyfi\",\"extendedLocation\":{\"name\":\"dkz\",\"type\":\"CustomLocation\"},\"location\":\"wsithuqolyahlu\",\"tags\":{\"fhyqezvqqugdrft\":\"ulsutrjbhxy\",\"wtl\":\"cvexreuqu\",\"qtvbczsu\":\"vfwhreagkhyxv\",\"ykgsangpszng\":\"mdgglmepjpfs\"},\"id\":\"fpgylkve\",\"name\":\"jujcngoad\",\"type\":\"edmzrgjfoknub\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetworkCloudManager manager = NetworkCloudManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.accessBridges() + .listByResourceGroup("hcdpkupnqrmgj", 425904374, "pkuwxeoioj", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("wsithuqolyahlu", response.iterator().next().location()); + Assertions.assertEquals("ulsutrjbhxy", response.iterator().next().tags().get("fhyqezvqqugdrft")); + Assertions.assertEquals("dkz", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, + response.iterator().next().extendedLocation().type()); + Assertions.assertEquals("zfav", response.iterator().next().ipv4ConnectedPrefix()); + Assertions.assertEquals("zwfbcyaykmmfzs", response.iterator().next().ipv6ConnectedPrefix()); + Assertions.assertEquals("fwxrzxmdew", response.iterator().next().networkId()); + Assertions.assertEquals("krplbjazejww", response.iterator().next().securityRules().get(0).description()); + Assertions.assertEquals(SecurityRuleDirection.OUTBOUND, + response.iterator().next().securityRules().get(0).direction()); + Assertions.assertEquals("y", response.iterator().next().securityRules().get(0).ipv4Addresses().get(0)); + Assertions.assertEquals("c", response.iterator().next().securityRules().get(0).ipv6Addresses().get(0)); + Assertions.assertEquals("ljselp", response.iterator().next().securityRules().get(0).port()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesListMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesListMockTests.java new file mode 100644 index 000000000000..bde67ea46fd6 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AccessBridgesListMockTests.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.networkcloud.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.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.AccessBridge; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; +import com.azure.resourcemanager.networkcloud.models.SecurityRuleDirection; +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 AccessBridgesListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"ipv4ConnectedPrefix\":\"coqra\",\"ipv6ConnectedPrefix\":\"ugyxpqit\",\"networkId\":\"eialwvskb\",\"securityRules\":[{\"description\":\"caqt\",\"direction\":\"Inbound\",\"ipv4Addresses\":[\"oqc\"],\"ipv6Addresses\":[\"dsxzakuejkmvb\",\"ztjofqcvovjufyc\",\"jmlbemyejiriux\"],\"port\":\"gthortudaw\"}],\"detailedStatus\":\"Running\",\"detailedStatusMessage\":\"elqerpp\",\"endpoints\":[{\"fqdn\":\"qnzmnhiil\",\"ipv4Address\":\"lwcjgckbbcccgzpr\",\"ipv6Address\":\"xnyuffatsgftipwc\",\"name\":\"yubhiqdx\"},{\"fqdn\":\"rnpnuhzafccnuh\",\"ipv4Address\":\"gbylbuig\",\"ipv6Address\":\"vatvcrkd\",\"name\":\"nbqxvhcsyhzlwxae\"}],\"protocol\":\"TCP\",\"provisioningState\":\"Accepted\"},\"etag\":\"xdndsbdweaderzm\",\"extendedLocation\":{\"name\":\"ntopa\",\"type\":\"CustomLocation\"},\"location\":\"mvmmagoaqylkjz\",\"tags\":{\"pdltkrlg\":\"uazjcgmxitpfinz\"},\"id\":\"mtbdrvcqgu\",\"name\":\"fzhompheq\",\"type\":\"urelyujlfyoump\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetworkCloudManager manager = NetworkCloudManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.accessBridges().list(1263849499, "itpkpztrgdg", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("mvmmagoaqylkjz", response.iterator().next().location()); + Assertions.assertEquals("uazjcgmxitpfinz", response.iterator().next().tags().get("pdltkrlg")); + Assertions.assertEquals("ntopa", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, + response.iterator().next().extendedLocation().type()); + Assertions.assertEquals("coqra", response.iterator().next().ipv4ConnectedPrefix()); + Assertions.assertEquals("ugyxpqit", response.iterator().next().ipv6ConnectedPrefix()); + Assertions.assertEquals("eialwvskb", response.iterator().next().networkId()); + Assertions.assertEquals("caqt", response.iterator().next().securityRules().get(0).description()); + Assertions.assertEquals(SecurityRuleDirection.INBOUND, + response.iterator().next().securityRules().get(0).direction()); + Assertions.assertEquals("oqc", response.iterator().next().securityRules().get(0).ipv4Addresses().get(0)); + Assertions.assertEquals("dsxzakuejkmvb", + response.iterator().next().securityRules().get(0).ipv6Addresses().get(0)); + Assertions.assertEquals("gthortudaw", response.iterator().next().securityRules().get(0).port()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ActionStateTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ActionStateTests.java index ce55b5b6d5ae..ff8400974322 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ActionStateTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ActionStateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class ActionStateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ActionState model = BinaryData.fromString( - "{\"actionType\":\"ijcoejctb\",\"correlationId\":\"qsqsy\",\"endTime\":\"kbfkg\",\"message\":\"dkexxppofm\",\"startTime\":\"x\",\"status\":\"Failed\",\"stepStates\":[{\"endTime\":\"dtocj\",\"message\":\"hvpmoue\",\"startTime\":\"dzxibqeojnxqbzvd\",\"status\":\"Completed\",\"stepName\":\"ndei\"},{\"endTime\":\"twnpzaoqvuhrhcf\",\"message\":\"yd\",\"startTime\":\"lmjthjq\",\"status\":\"InProgress\",\"stepName\":\"eicxmqciwqvhkhi\"}]}") + "{\"actionType\":\"cbonqvpk\",\"correlationId\":\"rxnjeaseipheofl\",\"endTime\":\"eyy\",\"message\":\"nj\",\"startTime\":\"lwtgrhpdj\",\"status\":\"Failed\",\"stepStates\":[{\"endTime\":\"xazjpqyegual\",\"message\":\"xxhejjzzvd\",\"startTime\":\"gwdslfhotwm\",\"status\":\"Failed\",\"stepName\":\"wlbjnpgacftade\"},{\"endTime\":\"nltyfsoppusuesnz\",\"message\":\"ej\",\"startTime\":\"vorxzdmohct\",\"status\":\"InProgress\",\"stepName\":\"dwxdndnv\"},{\"endTime\":\"gujjugwdkcglh\",\"message\":\"azjdyggd\",\"startTime\":\"ixhbkuofqweykhm\",\"status\":\"NotStarted\",\"stepName\":\"fyexfwhy\"},{\"endTime\":\"i\",\"message\":\"yvdcsitynnaa\",\"startTime\":\"ectehf\",\"status\":\"InProgress\",\"stepName\":\"jeyp\"}]}") .toObject(ActionState.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ActionState model = new ActionState(); - model = BinaryData.fromObject(model).toObject(ActionState.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AgentOptionsTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AgentOptionsTests.java index a03c2bf7f2bb..7fa05d164aac 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AgentOptionsTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AgentOptionsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,18 +12,18 @@ public final class AgentOptionsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AgentOptions model = BinaryData.fromString("{\"hugepagesCount\":6178652880729547644,\"hugepagesSize\":\"1G\"}") + AgentOptions model = BinaryData.fromString("{\"hugepagesCount\":5748509254911669409,\"hugepagesSize\":\"2M\"}") .toObject(AgentOptions.class); - Assertions.assertEquals(6178652880729547644L, model.hugepagesCount()); - Assertions.assertEquals(HugepagesSize.ONEG, model.hugepagesSize()); + Assertions.assertEquals(5748509254911669409L, model.hugepagesCount()); + Assertions.assertEquals(HugepagesSize.TWOM, model.hugepagesSize()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AgentOptions model - = new AgentOptions().withHugepagesCount(6178652880729547644L).withHugepagesSize(HugepagesSize.ONEG); + = new AgentOptions().withHugepagesCount(5748509254911669409L).withHugepagesSize(HugepagesSize.TWOM); model = BinaryData.fromObject(model).toObject(AgentOptions.class); - Assertions.assertEquals(6178652880729547644L, model.hugepagesCount()); - Assertions.assertEquals(HugepagesSize.ONEG, model.hugepagesSize()); + Assertions.assertEquals(5748509254911669409L, model.hugepagesCount()); + Assertions.assertEquals(HugepagesSize.TWOM, model.hugepagesSize()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolUpgradeSettingsTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolUpgradeSettingsTests.java index 1d2ffba0405c..3af7b31e1604 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolUpgradeSettingsTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AgentPoolUpgradeSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,21 +12,21 @@ public final class AgentPoolUpgradeSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AgentPoolUpgradeSettings model = BinaryData.fromString( - "{\"drainTimeout\":2176235645270803384,\"maxSurge\":\"jivfxzsjabib\",\"maxUnavailable\":\"stawfsdjpvkv\"}") + "{\"drainTimeout\":1456935603967599138,\"maxSurge\":\"gumhjglikkxws\",\"maxUnavailable\":\"lbqpvuzlmvfelf\"}") .toObject(AgentPoolUpgradeSettings.class); - Assertions.assertEquals(2176235645270803384L, model.drainTimeout()); - Assertions.assertEquals("jivfxzsjabib", model.maxSurge()); - Assertions.assertEquals("stawfsdjpvkv", model.maxUnavailable()); + Assertions.assertEquals(1456935603967599138L, model.drainTimeout()); + Assertions.assertEquals("gumhjglikkxws", model.maxSurge()); + Assertions.assertEquals("lbqpvuzlmvfelf", model.maxUnavailable()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AgentPoolUpgradeSettings model = new AgentPoolUpgradeSettings().withDrainTimeout(2176235645270803384L) - .withMaxSurge("jivfxzsjabib") - .withMaxUnavailable("stawfsdjpvkv"); + AgentPoolUpgradeSettings model = new AgentPoolUpgradeSettings().withDrainTimeout(1456935603967599138L) + .withMaxSurge("gumhjglikkxws") + .withMaxUnavailable("lbqpvuzlmvfelf"); model = BinaryData.fromObject(model).toObject(AgentPoolUpgradeSettings.class); - Assertions.assertEquals(2176235645270803384L, model.drainTimeout()); - Assertions.assertEquals("jivfxzsjabib", model.maxSurge()); - Assertions.assertEquals("stawfsdjpvkv", model.maxUnavailable()); + Assertions.assertEquals(1456935603967599138L, model.drainTimeout()); + Assertions.assertEquals("gumhjglikkxws", model.maxSurge()); + Assertions.assertEquals("lbqpvuzlmvfelf", model.maxUnavailable()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AnalyticsOutputSettingsTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AnalyticsOutputSettingsTests.java index b3d1c2609777..118bf5999d76 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AnalyticsOutputSettingsTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AnalyticsOutputSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,24 +14,24 @@ public final class AnalyticsOutputSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AnalyticsOutputSettings model = BinaryData.fromString( - "{\"analyticsWorkspaceId\":\"eqz\",\"associatedIdentity\":{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"o\"}}") + "{\"analyticsWorkspaceId\":\"xgfpelolppv\",\"associatedIdentity\":{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"vu\"}}") .toObject(AnalyticsOutputSettings.class); - Assertions.assertEquals("eqz", model.analyticsWorkspaceId()); + Assertions.assertEquals("xgfpelolppv", model.analyticsWorkspaceId()); Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, model.associatedIdentity().identityType()); - Assertions.assertEquals("o", model.associatedIdentity().userAssignedIdentityResourceId()); + Assertions.assertEquals("vu", model.associatedIdentity().userAssignedIdentityResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AnalyticsOutputSettings model = new AnalyticsOutputSettings().withAnalyticsWorkspaceId("eqz") + AnalyticsOutputSettings model = new AnalyticsOutputSettings().withAnalyticsWorkspaceId("xgfpelolppv") .withAssociatedIdentity( new IdentitySelector().withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) - .withUserAssignedIdentityResourceId("o")); + .withUserAssignedIdentityResourceId("vu")); model = BinaryData.fromObject(model).toObject(AnalyticsOutputSettings.class); - Assertions.assertEquals("eqz", model.analyticsWorkspaceId()); + Assertions.assertEquals("xgfpelolppv", model.analyticsWorkspaceId()); Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, model.associatedIdentity().identityType()); - Assertions.assertEquals("o", model.associatedIdentity().userAssignedIdentityResourceId()); + Assertions.assertEquals("vu", model.associatedIdentity().userAssignedIdentityResourceId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AttachedNetworkConfigurationTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AttachedNetworkConfigurationTests.java index 5c8fa75b7e18..a7d66a35a297 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AttachedNetworkConfigurationTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AttachedNetworkConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -18,44 +18,46 @@ public final class AttachedNetworkConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AttachedNetworkConfiguration model = BinaryData.fromString( - "{\"l2Networks\":[{\"networkId\":\"cdl\",\"pluginType\":\"SRIOV\"},{\"networkId\":\"hfwpracstwit\",\"pluginType\":\"MACVLAN\"},{\"networkId\":\"evxccedcp\",\"pluginType\":\"MACVLAN\"}],\"l3Networks\":[{\"ipamEnabled\":\"False\",\"networkId\":\"wzxltjc\",\"pluginType\":\"MACVLAN\"}],\"trunkedNetworks\":[{\"networkId\":\"iugcxnavvwxq\",\"pluginType\":\"OSDevice\"},{\"networkId\":\"qunyowxwlmdjr\",\"pluginType\":\"SRIOV\"},{\"networkId\":\"g\",\"pluginType\":\"DPDK\"}]}") + "{\"l2Networks\":[{\"networkId\":\"byrqufeg\",\"pluginType\":\"IPVLAN\"},{\"networkId\":\"wz\",\"pluginType\":\"DPDK\"},{\"networkId\":\"hlmctlpdngitvgb\",\"pluginType\":\"MACVLAN\"}],\"l3Networks\":[{\"ipamEnabled\":\"False\",\"networkId\":\"myijejvegr\",\"pluginType\":\"SRIOV\"}],\"trunkedNetworks\":[{\"networkId\":\"ixexcc\",\"pluginType\":\"SRIOV\"},{\"networkId\":\"eaxhcexdrrvqahqk\",\"pluginType\":\"MACVLAN\"},{\"networkId\":\"pwijnhy\",\"pluginType\":\"IPVLAN\"},{\"networkId\":\"f\",\"pluginType\":\"DPDK\"}]}") .toObject(AttachedNetworkConfiguration.class); - Assertions.assertEquals("cdl", model.l2Networks().get(0).networkId()); - Assertions.assertEquals(KubernetesPluginType.SRIOV, model.l2Networks().get(0).pluginType()); + Assertions.assertEquals("byrqufeg", model.l2Networks().get(0).networkId()); + Assertions.assertEquals(KubernetesPluginType.IPVLAN, model.l2Networks().get(0).pluginType()); Assertions.assertEquals(L3NetworkConfigurationIpamEnabled.FALSE, model.l3Networks().get(0).ipamEnabled()); - Assertions.assertEquals("wzxltjc", model.l3Networks().get(0).networkId()); - Assertions.assertEquals(KubernetesPluginType.MACVLAN, model.l3Networks().get(0).pluginType()); - Assertions.assertEquals("iugcxnavvwxq", model.trunkedNetworks().get(0).networkId()); - Assertions.assertEquals(KubernetesPluginType.OSDEVICE, model.trunkedNetworks().get(0).pluginType()); + Assertions.assertEquals("myijejvegr", model.l3Networks().get(0).networkId()); + Assertions.assertEquals(KubernetesPluginType.SRIOV, model.l3Networks().get(0).pluginType()); + Assertions.assertEquals("ixexcc", model.trunkedNetworks().get(0).networkId()); + Assertions.assertEquals(KubernetesPluginType.SRIOV, model.trunkedNetworks().get(0).pluginType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AttachedNetworkConfiguration model = new AttachedNetworkConfiguration() .withL2Networks(Arrays.asList( - new L2NetworkAttachmentConfiguration().withNetworkId("cdl").withPluginType(KubernetesPluginType.SRIOV), - new L2NetworkAttachmentConfiguration().withNetworkId("hfwpracstwit") - .withPluginType(KubernetesPluginType.MACVLAN), - new L2NetworkAttachmentConfiguration().withNetworkId("evxccedcp") + new L2NetworkAttachmentConfiguration().withNetworkId("byrqufeg") + .withPluginType(KubernetesPluginType.IPVLAN), + new L2NetworkAttachmentConfiguration().withNetworkId("wz").withPluginType(KubernetesPluginType.DPDK), + new L2NetworkAttachmentConfiguration().withNetworkId("hlmctlpdngitvgb") .withPluginType(KubernetesPluginType.MACVLAN))) .withL3Networks(Arrays .asList(new L3NetworkAttachmentConfiguration().withIpamEnabled(L3NetworkConfigurationIpamEnabled.FALSE) - .withNetworkId("wzxltjc") - .withPluginType(KubernetesPluginType.MACVLAN))) + .withNetworkId("myijejvegr") + .withPluginType(KubernetesPluginType.SRIOV))) .withTrunkedNetworks(Arrays.asList( - new TrunkedNetworkAttachmentConfiguration().withNetworkId("iugcxnavvwxq") - .withPluginType(KubernetesPluginType.OSDEVICE), - new TrunkedNetworkAttachmentConfiguration().withNetworkId("qunyowxwlmdjr") + new TrunkedNetworkAttachmentConfiguration().withNetworkId("ixexcc") .withPluginType(KubernetesPluginType.SRIOV), - new TrunkedNetworkAttachmentConfiguration().withNetworkId("g") + new TrunkedNetworkAttachmentConfiguration().withNetworkId("eaxhcexdrrvqahqk") + .withPluginType(KubernetesPluginType.MACVLAN), + new TrunkedNetworkAttachmentConfiguration().withNetworkId("pwijnhy") + .withPluginType(KubernetesPluginType.IPVLAN), + new TrunkedNetworkAttachmentConfiguration().withNetworkId("f") .withPluginType(KubernetesPluginType.DPDK))); model = BinaryData.fromObject(model).toObject(AttachedNetworkConfiguration.class); - Assertions.assertEquals("cdl", model.l2Networks().get(0).networkId()); - Assertions.assertEquals(KubernetesPluginType.SRIOV, model.l2Networks().get(0).pluginType()); + Assertions.assertEquals("byrqufeg", model.l2Networks().get(0).networkId()); + Assertions.assertEquals(KubernetesPluginType.IPVLAN, model.l2Networks().get(0).pluginType()); Assertions.assertEquals(L3NetworkConfigurationIpamEnabled.FALSE, model.l3Networks().get(0).ipamEnabled()); - Assertions.assertEquals("wzxltjc", model.l3Networks().get(0).networkId()); - Assertions.assertEquals(KubernetesPluginType.MACVLAN, model.l3Networks().get(0).pluginType()); - Assertions.assertEquals("iugcxnavvwxq", model.trunkedNetworks().get(0).networkId()); - Assertions.assertEquals(KubernetesPluginType.OSDEVICE, model.trunkedNetworks().get(0).pluginType()); + Assertions.assertEquals("myijejvegr", model.l3Networks().get(0).networkId()); + Assertions.assertEquals(KubernetesPluginType.SRIOV, model.l3Networks().get(0).pluginType()); + Assertions.assertEquals("ixexcc", model.trunkedNetworks().get(0).networkId()); + Assertions.assertEquals(KubernetesPluginType.SRIOV, model.trunkedNetworks().get(0).pluginType()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AvailableUpgradeTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AvailableUpgradeTests.java index 8cfb58fed998..c2ffd0f02bd1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AvailableUpgradeTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/AvailableUpgradeTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class AvailableUpgradeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvailableUpgrade model - = BinaryData.fromString("{\"availabilityLifecycle\":\"Preview\",\"version\":\"tlstvlzywem\"}") + = BinaryData.fromString("{\"availabilityLifecycle\":\"GenerallyAvailable\",\"version\":\"wwqfbumlkxtrqj\"}") .toObject(AvailableUpgrade.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableUpgrade model = new AvailableUpgrade(); - model = BinaryData.fromObject(model).toObject(AvailableUpgrade.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineCommandSpecificationTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineCommandSpecificationTests.java index 4f749b47edf9..36b7be0d4894 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineCommandSpecificationTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineCommandSpecificationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,20 +12,20 @@ public final class BareMetalMachineCommandSpecificationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - BareMetalMachineCommandSpecification model = BinaryData - .fromString("{\"arguments\":[\"wtrhtgv\",\"zpcrrkolawj\",\"jsmwrokc\"],\"command\":\"xfzzzwyjafitlhgu\"}") - .toObject(BareMetalMachineCommandSpecification.class); - Assertions.assertEquals("wtrhtgv", model.arguments().get(0)); - Assertions.assertEquals("xfzzzwyjafitlhgu", model.command()); + BareMetalMachineCommandSpecification model + = BinaryData.fromString("{\"arguments\":[\"v\",\"qdqgbi\"],\"command\":\"ylihkaetckt\"}") + .toObject(BareMetalMachineCommandSpecification.class); + Assertions.assertEquals("v", model.arguments().get(0)); + Assertions.assertEquals("ylihkaetckt", model.command()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BareMetalMachineCommandSpecification model = new BareMetalMachineCommandSpecification() - .withArguments(Arrays.asList("wtrhtgv", "zpcrrkolawj", "jsmwrokc")) - .withCommand("xfzzzwyjafitlhgu"); + BareMetalMachineCommandSpecification model + = new BareMetalMachineCommandSpecification().withArguments(Arrays.asList("v", "qdqgbi")) + .withCommand("ylihkaetckt"); model = BinaryData.fromObject(model).toObject(BareMetalMachineCommandSpecification.class); - Assertions.assertEquals("wtrhtgv", model.arguments().get(0)); - Assertions.assertEquals("xfzzzwyjafitlhgu", model.command()); + Assertions.assertEquals("v", model.arguments().get(0)); + Assertions.assertEquals("ylihkaetckt", model.command()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineCordonParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineCordonParametersTests.java index 27ba79d969ee..58a46a3ac333 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineCordonParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineCordonParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineMonitoringConfigurationStatusTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineMonitoringConfigurationStatusTests.java new file mode 100644 index 000000000000..1f05302f0ed2 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineMonitoringConfigurationStatusTests.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.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.models.BareMetalMachineMetricsConfigurationStatusLogLevel; +import com.azure.resourcemanager.networkcloud.models.BareMetalMachineMetricsConfigurationStatusMetricsLevel; +import com.azure.resourcemanager.networkcloud.models.BareMetalMachineMonitoringConfigurationStatus; +import org.junit.jupiter.api.Assertions; + +public final class BareMetalMachineMonitoringConfigurationStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BareMetalMachineMonitoringConfigurationStatus model + = BinaryData.fromString("{\"logLevel\":\"Default\",\"metricsLevel\":\"Nexus\"}") + .toObject(BareMetalMachineMonitoringConfigurationStatus.class); + Assertions.assertEquals(BareMetalMachineMetricsConfigurationStatusLogLevel.DEFAULT, model.logLevel()); + Assertions.assertEquals(BareMetalMachineMetricsConfigurationStatusMetricsLevel.NEXUS, model.metricsLevel()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinePatchParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinePatchParametersTests.java index 6474bfd8105f..33974f72747c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinePatchParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinePatchParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,21 +13,20 @@ public final class BareMetalMachinePatchParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - BareMetalMachinePatchParameters model = BinaryData.fromString( - "{\"properties\":{\"machineDetails\":\"jgl\"},\"tags\":{\"hmem\":\"uyzlw\",\"memczjkmmyk\":\"ooclutnp\",\"rye\":\"ujxsglhsr\",\"rfih\":\"ylmbkzudni\"}}") + BareMetalMachinePatchParameters model = BinaryData + .fromString("{\"properties\":{\"machineDetails\":\"hagalpbuxwgipwh\"},\"tags\":{\"kix\":\"wkgshwa\"}}") .toObject(BareMetalMachinePatchParameters.class); - Assertions.assertEquals("uyzlw", model.tags().get("hmem")); - Assertions.assertEquals("jgl", model.machineDetails()); + Assertions.assertEquals("wkgshwa", model.tags().get("kix")); + Assertions.assertEquals("hagalpbuxwgipwh", model.machineDetails()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BareMetalMachinePatchParameters model = new BareMetalMachinePatchParameters() - .withTags(mapOf("hmem", "uyzlw", "memczjkmmyk", "ooclutnp", "rye", "ujxsglhsr", "rfih", "ylmbkzudni")) - .withMachineDetails("jgl"); + BareMetalMachinePatchParameters model = new BareMetalMachinePatchParameters().withTags(mapOf("kix", "wkgshwa")) + .withMachineDetails("hagalpbuxwgipwh"); model = BinaryData.fromObject(model).toObject(BareMetalMachinePatchParameters.class); - Assertions.assertEquals("uyzlw", model.tags().get("hmem")); - Assertions.assertEquals("jgl", model.machineDetails()); + Assertions.assertEquals("wkgshwa", model.tags().get("kix")); + Assertions.assertEquals("hagalpbuxwgipwh", model.machineDetails()); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinePatchPropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinePatchPropertiesTests.java index 866dd1db0c54..6ea2933ce68d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinePatchPropertiesTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinePatchPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,15 +11,15 @@ public final class BareMetalMachinePatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - BareMetalMachinePatchProperties model = BinaryData.fromString("{\"machineDetails\":\"jewlpxuzzjg\"}") - .toObject(BareMetalMachinePatchProperties.class); - Assertions.assertEquals("jewlpxuzzjg", model.machineDetails()); + BareMetalMachinePatchProperties model + = BinaryData.fromString("{\"machineDetails\":\"injep\"}").toObject(BareMetalMachinePatchProperties.class); + Assertions.assertEquals("injep", model.machineDetails()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BareMetalMachinePatchProperties model = new BareMetalMachinePatchProperties().withMachineDetails("jewlpxuzzjg"); + BareMetalMachinePatchProperties model = new BareMetalMachinePatchProperties().withMachineDetails("injep"); model = BinaryData.fromObject(model).toObject(BareMetalMachinePatchProperties.class); - Assertions.assertEquals("jewlpxuzzjg", model.machineDetails()); + Assertions.assertEquals("injep", model.machineDetails()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinePowerOffParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinePowerOffParametersTests.java index bc14aaa3aa7a..e8738b8da4c9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinePowerOffParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachinePowerOffParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineReimageParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineReimageParametersTests.java new file mode 100644 index 000000000000..171a40c18d48 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineReimageParametersTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReimageParameters; +import com.azure.resourcemanager.networkcloud.models.BareMetalMachineReimageSafeguardMode; +import org.junit.jupiter.api.Assertions; + +public final class BareMetalMachineReimageParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BareMetalMachineReimageParameters model + = BinaryData.fromString("{\"safeguardMode\":\"All\"}").toObject(BareMetalMachineReimageParameters.class); + Assertions.assertEquals(BareMetalMachineReimageSafeguardMode.ALL, model.safeguardMode()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BareMetalMachineReimageParameters model + = new BareMetalMachineReimageParameters().withSafeguardMode(BareMetalMachineReimageSafeguardMode.ALL); + model = BinaryData.fromObject(model).toObject(BareMetalMachineReimageParameters.class); + Assertions.assertEquals(BareMetalMachineReimageSafeguardMode.ALL, model.safeguardMode()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineRunCommandParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineRunCommandParametersTests.java index 4c3f8fb07d37..6461b0100b54 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineRunCommandParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineRunCommandParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,23 +12,24 @@ public final class BareMetalMachineRunCommandParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - BareMetalMachineRunCommandParameters model = BinaryData.fromString( - "{\"arguments\":[\"hiqakydiwfbrk\",\"pzdqtvhcspod\",\"qaxsipietgbebjf\"],\"limitTimeSeconds\":8805567120468423519,\"script\":\"moichdlpnfpubntn\"}") + BareMetalMachineRunCommandParameters model = BinaryData + .fromString( + "{\"arguments\":[\"noc\",\"koklya\"],\"limitTimeSeconds\":4636130661045501185,\"script\":\"onuq\"}") .toObject(BareMetalMachineRunCommandParameters.class); - Assertions.assertEquals("hiqakydiwfbrk", model.arguments().get(0)); - Assertions.assertEquals(8805567120468423519L, model.limitTimeSeconds()); - Assertions.assertEquals("moichdlpnfpubntn", model.script()); + Assertions.assertEquals("noc", model.arguments().get(0)); + Assertions.assertEquals(4636130661045501185L, model.limitTimeSeconds()); + Assertions.assertEquals("onuq", model.script()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BareMetalMachineRunCommandParameters model = new BareMetalMachineRunCommandParameters() - .withArguments(Arrays.asList("hiqakydiwfbrk", "pzdqtvhcspod", "qaxsipietgbebjf")) - .withLimitTimeSeconds(8805567120468423519L) - .withScript("moichdlpnfpubntn"); + BareMetalMachineRunCommandParameters model + = new BareMetalMachineRunCommandParameters().withArguments(Arrays.asList("noc", "koklya")) + .withLimitTimeSeconds(4636130661045501185L) + .withScript("onuq"); model = BinaryData.fromObject(model).toObject(BareMetalMachineRunCommandParameters.class); - Assertions.assertEquals("hiqakydiwfbrk", model.arguments().get(0)); - Assertions.assertEquals(8805567120468423519L, model.limitTimeSeconds()); - Assertions.assertEquals("moichdlpnfpubntn", model.script()); + Assertions.assertEquals("noc", model.arguments().get(0)); + Assertions.assertEquals(4636130661045501185L, model.limitTimeSeconds()); + Assertions.assertEquals("onuq", model.script()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineRunDataExtractsParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineRunDataExtractsParametersTests.java index f7f2a6419284..c6504fa7d768 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineRunDataExtractsParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineRunDataExtractsParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,31 +14,23 @@ public final class BareMetalMachineRunDataExtractsParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BareMetalMachineRunDataExtractsParameters model = BinaryData.fromString( - "{\"commands\":[{\"arguments\":[\"viqsowsaaelcattc\",\"uhplrvkmjcwmjv\",\"gfggcvkyylizrzbj\"],\"command\":\"sfxsf\"},{\"arguments\":[\"lvt\"],\"command\":\"vagbwidqlvhukove\"},{\"arguments\":[\"zrvjfnmjmvlwyzgi\"],\"command\":\"lkujrllfojui\"},{\"arguments\":[\"uuyjucejikz\",\"eovvtzej\",\"tjklntikyjuzk\"],\"command\":\"bqzolxr\"}],\"limitTimeSeconds\":3978193914466506691}") + "{\"commands\":[{\"arguments\":[\"beypewrmjmw\",\"vjektcxsenh\"],\"command\":\"lrsf\"}],\"limitTimeSeconds\":4986041102570951835}") .toObject(BareMetalMachineRunDataExtractsParameters.class); - Assertions.assertEquals("viqsowsaaelcattc", model.commands().get(0).arguments().get(0)); - Assertions.assertEquals("sfxsf", model.commands().get(0).command()); - Assertions.assertEquals(3978193914466506691L, model.limitTimeSeconds()); + Assertions.assertEquals("beypewrmjmw", model.commands().get(0).arguments().get(0)); + Assertions.assertEquals("lrsf", model.commands().get(0).command()); + Assertions.assertEquals(4986041102570951835L, model.limitTimeSeconds()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { BareMetalMachineRunDataExtractsParameters model = new BareMetalMachineRunDataExtractsParameters().withCommands(Arrays.asList( - new BareMetalMachineCommandSpecification() - .withArguments(Arrays.asList("viqsowsaaelcattc", "uhplrvkmjcwmjv", "gfggcvkyylizrzbj")) - .withCommand("sfxsf"), - new BareMetalMachineCommandSpecification().withArguments(Arrays.asList("lvt")) - .withCommand("vagbwidqlvhukove"), - new BareMetalMachineCommandSpecification().withArguments(Arrays.asList("zrvjfnmjmvlwyzgi")) - .withCommand("lkujrllfojui"), - new BareMetalMachineCommandSpecification() - .withArguments(Arrays.asList("uuyjucejikz", "eovvtzej", "tjklntikyjuzk")) - .withCommand("bqzolxr"))) - .withLimitTimeSeconds(3978193914466506691L); + new BareMetalMachineCommandSpecification().withArguments(Arrays.asList("beypewrmjmw", "vjektcxsenh")) + .withCommand("lrsf"))) + .withLimitTimeSeconds(4986041102570951835L); model = BinaryData.fromObject(model).toObject(BareMetalMachineRunDataExtractsParameters.class); - Assertions.assertEquals("viqsowsaaelcattc", model.commands().get(0).arguments().get(0)); - Assertions.assertEquals("sfxsf", model.commands().get(0).command()); - Assertions.assertEquals(3978193914466506691L, model.limitTimeSeconds()); + Assertions.assertEquals("beypewrmjmw", model.commands().get(0).arguments().get(0)); + Assertions.assertEquals("lrsf", model.commands().get(0).command()); + Assertions.assertEquals(4986041102570951835L, model.limitTimeSeconds()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineRunReadCommandsParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineRunReadCommandsParametersTests.java index 8ce027d08923..a822d2f90150 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineRunReadCommandsParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BareMetalMachineRunReadCommandsParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,30 +14,29 @@ public final class BareMetalMachineRunReadCommandsParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BareMetalMachineRunReadCommandsParameters model = BinaryData.fromString( - "{\"commands\":[{\"arguments\":[\"hlgmltxdwhmoz\"],\"command\":\"sgzv\"},{\"arguments\":[\"n\",\"jzfpafolpymwamx\",\"zragpg\",\"phtvdu\"],\"command\":\"a\"},{\"arguments\":[\"ejchcsrlz\",\"nmzlanru\"],\"command\":\"dwv\"},{\"arguments\":[\"cnzqtpjhmqr\",\"v\"],\"command\":\"hlaiwd\"}],\"limitTimeSeconds\":5700414636533482402}") + "{\"commands\":[{\"arguments\":[\"vf\",\"nkymuctqhjfbebrj\"],\"command\":\"xerf\"},{\"arguments\":[\"tttxfvjrb\",\"rp\",\"xepcyvahfn\",\"jky\"],\"command\":\"xjvuujqgidokg\"},{\"arguments\":[\"yoxgvcltbgsnc\",\"hkjeszzhbi\",\"htxfvgxbfsmxnehm\"],\"command\":\"vecxgodebfqkk\"}],\"limitTimeSeconds\":3854336235013359487}") .toObject(BareMetalMachineRunReadCommandsParameters.class); - Assertions.assertEquals("hlgmltxdwhmoz", model.commands().get(0).arguments().get(0)); - Assertions.assertEquals("sgzv", model.commands().get(0).command()); - Assertions.assertEquals(5700414636533482402L, model.limitTimeSeconds()); + Assertions.assertEquals("vf", model.commands().get(0).arguments().get(0)); + Assertions.assertEquals("xerf", model.commands().get(0).command()); + Assertions.assertEquals(3854336235013359487L, model.limitTimeSeconds()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { BareMetalMachineRunReadCommandsParameters model = new BareMetalMachineRunReadCommandsParameters().withCommands(Arrays.asList( - new BareMetalMachineCommandSpecification().withArguments(Arrays.asList("hlgmltxdwhmoz")) - .withCommand("sgzv"), + new BareMetalMachineCommandSpecification().withArguments(Arrays.asList("vf", "nkymuctqhjfbebrj")) + .withCommand("xerf"), new BareMetalMachineCommandSpecification() - .withArguments(Arrays.asList("n", "jzfpafolpymwamx", "zragpg", "phtvdu")) - .withCommand("a"), - new BareMetalMachineCommandSpecification().withArguments(Arrays.asList("ejchcsrlz", "nmzlanru")) - .withCommand("dwv"), - new BareMetalMachineCommandSpecification().withArguments(Arrays.asList("cnzqtpjhmqr", "v")) - .withCommand("hlaiwd"))) - .withLimitTimeSeconds(5700414636533482402L); + .withArguments(Arrays.asList("tttxfvjrb", "rp", "xepcyvahfn", "jky")) + .withCommand("xjvuujqgidokg"), + new BareMetalMachineCommandSpecification() + .withArguments(Arrays.asList("yoxgvcltbgsnc", "hkjeszzhbi", "htxfvgxbfsmxnehm")) + .withCommand("vecxgodebfqkk"))) + .withLimitTimeSeconds(3854336235013359487L); model = BinaryData.fromObject(model).toObject(BareMetalMachineRunReadCommandsParameters.class); - Assertions.assertEquals("hlgmltxdwhmoz", model.commands().get(0).arguments().get(0)); - Assertions.assertEquals("sgzv", model.commands().get(0).command()); - Assertions.assertEquals(5700414636533482402L, model.limitTimeSeconds()); + Assertions.assertEquals("vf", model.commands().get(0).arguments().get(0)); + Assertions.assertEquals("xerf", model.commands().get(0).command()); + Assertions.assertEquals(3854336235013359487L, model.limitTimeSeconds()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BgpAdvertisementTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BgpAdvertisementTests.java index 2ee89aa8fae0..0e3bddf459b1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BgpAdvertisementTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/BgpAdvertisementTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,24 +14,24 @@ public final class BgpAdvertisementTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BgpAdvertisement model = BinaryData.fromString( - "{\"advertiseToFabric\":\"True\",\"communities\":[\"irryuzhlh\",\"joqrvqqaatj\",\"nrvgoupmfiibfgg\"],\"ipAddressPools\":[\"ool\",\"rwxkvtkkgl\",\"qwjygvja\",\"vblm\"],\"peers\":[\"zuhbxvvyhgsopb\"]}") + "{\"advertiseToFabric\":\"False\",\"communities\":[\"rykqgaifmvikl\",\"ydv\"],\"ipAddressPools\":[\"bejdznxcv\",\"srhnjivo\",\"v\",\"novqfzge\"],\"peers\":[\"ftul\",\"ltducea\",\"tmczuomejwcwwqi\"]}") .toObject(BgpAdvertisement.class); - Assertions.assertEquals(AdvertiseToFabric.TRUE, model.advertiseToFabric()); - Assertions.assertEquals("irryuzhlh", model.communities().get(0)); - Assertions.assertEquals("ool", model.ipAddressPools().get(0)); - Assertions.assertEquals("zuhbxvvyhgsopb", model.peers().get(0)); + Assertions.assertEquals(AdvertiseToFabric.FALSE, model.advertiseToFabric()); + Assertions.assertEquals("rykqgaifmvikl", model.communities().get(0)); + Assertions.assertEquals("bejdznxcv", model.ipAddressPools().get(0)); + Assertions.assertEquals("ftul", model.peers().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BgpAdvertisement model = new BgpAdvertisement().withAdvertiseToFabric(AdvertiseToFabric.TRUE) - .withCommunities(Arrays.asList("irryuzhlh", "joqrvqqaatj", "nrvgoupmfiibfgg")) - .withIpAddressPools(Arrays.asList("ool", "rwxkvtkkgl", "qwjygvja", "vblm")) - .withPeers(Arrays.asList("zuhbxvvyhgsopb")); + BgpAdvertisement model = new BgpAdvertisement().withAdvertiseToFabric(AdvertiseToFabric.FALSE) + .withCommunities(Arrays.asList("rykqgaifmvikl", "ydv")) + .withIpAddressPools(Arrays.asList("bejdznxcv", "srhnjivo", "v", "novqfzge")) + .withPeers(Arrays.asList("ftul", "ltducea", "tmczuomejwcwwqi")); model = BinaryData.fromObject(model).toObject(BgpAdvertisement.class); - Assertions.assertEquals(AdvertiseToFabric.TRUE, model.advertiseToFabric()); - Assertions.assertEquals("irryuzhlh", model.communities().get(0)); - Assertions.assertEquals("ool", model.ipAddressPools().get(0)); - Assertions.assertEquals("zuhbxvvyhgsopb", model.peers().get(0)); + Assertions.assertEquals(AdvertiseToFabric.FALSE, model.advertiseToFabric()); + Assertions.assertEquals("rykqgaifmvikl", model.communities().get(0)); + Assertions.assertEquals("bejdznxcv", model.ipAddressPools().get(0)); + Assertions.assertEquals("ftul", model.peers().get(0)); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CertificateInfoTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CertificateInfoTests.java index 881404ebed0e..3e3537f83fa0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CertificateInfoTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CertificateInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -10,13 +10,7 @@ public final class CertificateInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CertificateInfo model - = BinaryData.fromString("{\"hash\":\"vqdra\",\"value\":\"jybige\"}").toObject(CertificateInfo.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CertificateInfo model = new CertificateInfo(); - model = BinaryData.fromObject(model).toObject(CertificateInfo.class); + CertificateInfo model = BinaryData.fromString("{\"hash\":\"nqecanoaeup\",\"value\":\"yhltrpmopjmcm\"}") + .toObject(CertificateInfo.class); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkInnerTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkInnerTests.java index d147e0d98a00..1423272123c5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkInnerTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,6 +12,7 @@ import com.azure.resourcemanager.networkcloud.models.EgressEndpoint; import com.azure.resourcemanager.networkcloud.models.EndpointDependency; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -21,65 +22,67 @@ public final class CloudServicesNetworkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudServicesNetworkInner model = BinaryData.fromString( - "{\"etag\":\"enhwlrs\",\"extendedLocation\":{\"name\":\"frzpwvlqdqgb\",\"type\":\"qylihkaetckt\"},\"properties\":{\"additionalEgressEndpoints\":[{\"category\":\"vf\",\"endpoints\":[{\"domainName\":\"kymuctqhjfbebr\",\"port\":3911807626536137727},{\"domainName\":\"rfuwutt\",\"port\":5923268141734612582},{\"domainName\":\"jrbirphxepcyv\",\"port\":6463705926594653414},{\"domainName\":\"ljkyqxjvuuj\",\"port\":8872227679723225496}]},{\"category\":\"ok\",\"endpoints\":[{\"domainName\":\"ljyoxgvcltb\",\"port\":7497073347562685414},{\"domainName\":\"ghkjeszzhbi\",\"port\":6478089353119603843}]}],\"associatedResourceIds\":[\"gx\",\"fsm\"],\"clusterId\":\"eh\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"cxgod\",\"enableDefaultEgressEndpoints\":\"True\",\"enabledEgressEndpoints\":[{\"category\":\"krbm\",\"endpoints\":[{\"domainName\":\"kgriwflzlfbx\",\"port\":3057965224117803701},{\"domainName\":\"ycispnqzahmgkb\",\"port\":2437104180699873640}]}],\"hybridAksClustersAssociatedIds\":[\"ibnuqqkpik\",\"drgvtqagn\",\"uynhijg\"],\"interfaceName\":\"ebf\",\"provisioningState\":\"Canceled\",\"storageOptions\":{\"mode\":\"None\",\"sizeMiB\":8731208977026157995,\"storageApplianceId\":\"pnazzm\"},\"storageStatus\":{\"mode\":\"None\",\"sizeMiB\":8792561748290564880,\"status\":\"ExpandingVolume\",\"statusMessage\":\"dbhrbnlankxm\",\"volumeId\":\"k\"},\"virtualMachinesAssociatedIds\":[\"enbtkcxywny\",\"nrs\",\"nlqidybyxczf\",\"lhaaxdbabp\"]},\"location\":\"wrqlfktsthsuco\",\"tags\":{\"wrqpue\":\"yyazttbt\",\"xibxujwbhqwalm\":\"ckzywbiexzfeyue\",\"ux\":\"zyoxaepdkzjan\",\"zt\":\"hdwbavxbniwdjs\"},\"id\":\"dbpgnxytxhp\",\"name\":\"xbzpfzab\",\"type\":\"lcuhxwtctyqiklb\"}") + "{\"properties\":{\"additionalEgressEndpoints\":[{\"category\":\"gr\",\"endpoints\":[{\"domainName\":\"flz\",\"port\":2558620893795237086},{\"domainName\":\"zpuzycisp\",\"port\":9129919859872119531},{\"domainName\":\"hmgkbrpyy\",\"port\":1635050264720722105},{\"domainName\":\"nuqqkpikadrgvt\",\"port\":4999068038306600813}]},{\"category\":\"buynhijggm\",\"endpoints\":[{\"domainName\":\"fsiarbutr\",\"port\":6344517989132203623}]},{\"category\":\"azzmhjrunmpxt\",\"endpoints\":[{\"domainName\":\"bh\",\"port\":3549999695260197099},{\"domainName\":\"ankxmyskpbhenb\",\"port\":2918302235936136328},{\"domainName\":\"ywn\",\"port\":3361050620024364671}]}],\"enableDefaultEgressEndpoints\":\"True\",\"storageOptions\":{\"mode\":\"None\",\"sizeMiB\":4938600277265014186,\"storageApplianceId\":\"yxczfclh\"},\"associatedResourceIds\":[\"dbabp\",\"lwrq\",\"fkts\"],\"clusterId\":\"sucocmnyyazttbtw\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"uedck\",\"enabledEgressEndpoints\":[{\"category\":\"biexzfeyu\",\"endpoints\":[{\"domainName\":\"xibxujwbhqwalm\",\"port\":4204523047188307273},{\"domainName\":\"xaepdkzjancuxr\",\"port\":3067424612233139925}]},{\"category\":\"avxbniwdjswztsdb\",\"endpoints\":[{\"domainName\":\"nxytxh\",\"port\":8724476376904230855},{\"domainName\":\"zpfzabglc\",\"port\":8884342571785633710},{\"domainName\":\"tcty\",\"port\":3791870776302603545}]},{\"category\":\"bbovplwzbhvgyugu\",\"endpoints\":[{\"domainName\":\"vmkfssxqu\",\"port\":2455965823671467627},{\"domainName\":\"l\",\"port\":5850785611921356044},{\"domainName\":\"xnkjzkdesl\",\"port\":8771297433888765314}]}],\"hybridAksClustersAssociatedIds\":[\"i\",\"ighxpk\",\"wzbaiue\"],\"interfaceName\":\"a\",\"storageStatus\":{\"mode\":\"Standard\",\"sizeMiB\":6578204295231408017,\"status\":\"Available\",\"statusMessage\":\"ojnabckhsmtxpsie\",\"volumeId\":\"fhvpesaps\"},\"virtualMachinesAssociatedIds\":[\"qmhjjdhtld\"],\"provisioningState\":\"Failed\"},\"etag\":\"xuutkncwscwsv\",\"extendedLocation\":{\"name\":\"xotogtwrupqsxv\",\"type\":\"CustomLocation\"},\"location\":\"cykvceo\",\"tags\":{\"notyfjfcnjbkcn\":\"lo\",\"kphywpnvjto\":\"dhbt\"},\"id\":\"nermcl\",\"name\":\"plpho\",\"type\":\"uscrpabgyepsb\"}") .toObject(CloudServicesNetworkInner.class); - Assertions.assertEquals("wrqlfktsthsuco", model.location()); - Assertions.assertEquals("yyazttbt", model.tags().get("wrqpue")); - Assertions.assertEquals("frzpwvlqdqgb", model.extendedLocation().name()); - Assertions.assertEquals("qylihkaetckt", model.extendedLocation().type()); - Assertions.assertEquals("vf", model.additionalEgressEndpoints().get(0).category()); - Assertions.assertEquals("kymuctqhjfbebr", - model.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); - Assertions.assertEquals(3911807626536137727L, + Assertions.assertEquals("cykvceo", model.location()); + Assertions.assertEquals("lo", model.tags().get("notyfjfcnjbkcn")); + Assertions.assertEquals("xotogtwrupqsxv", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.extendedLocation().type()); + Assertions.assertEquals("gr", model.additionalEgressEndpoints().get(0).category()); + Assertions.assertEquals("flz", model.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); + Assertions.assertEquals(2558620893795237086L, model.additionalEgressEndpoints().get(0).endpoints().get(0).port()); Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.TRUE, model.enableDefaultEgressEndpoints()); Assertions.assertEquals(CloudServicesNetworkStorageMode.NONE, model.storageOptions().mode()); - Assertions.assertEquals(8731208977026157995L, model.storageOptions().sizeMiB()); - Assertions.assertEquals("pnazzm", model.storageOptions().storageApplianceId()); + Assertions.assertEquals(4938600277265014186L, model.storageOptions().sizeMiB()); + Assertions.assertEquals("yxczfclh", model.storageOptions().storageApplianceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CloudServicesNetworkInner model - = new CloudServicesNetworkInner().withLocation("wrqlfktsthsuco") - .withTags(mapOf("wrqpue", "yyazttbt", "xibxujwbhqwalm", "ckzywbiexzfeyue", "ux", "zyoxaepdkzjan", "zt", - "hdwbavxbniwdjs")) - .withExtendedLocation(new ExtendedLocation().withName("frzpwvlqdqgb").withType("qylihkaetckt")) + = new CloudServicesNetworkInner().withLocation("cykvceo") + .withTags(mapOf("notyfjfcnjbkcn", "lo", "kphywpnvjto", "dhbt")) + .withExtendedLocation( + new ExtendedLocation().withName("xotogtwrupqsxv").withType(ExtendedLocationType.CUSTOM_LOCATION)) .withAdditionalEgressEndpoints( Arrays.asList( - new EgressEndpoint().withCategory("vf") + new EgressEndpoint().withCategory("gr") .withEndpoints(Arrays.asList( - new EndpointDependency().withDomainName("kymuctqhjfbebr") - .withPort(3911807626536137727L), - new EndpointDependency().withDomainName("rfuwutt").withPort(5923268141734612582L), - new EndpointDependency().withDomainName("jrbirphxepcyv").withPort(6463705926594653414L), - new EndpointDependency().withDomainName("ljkyqxjvuuj").withPort(8872227679723225496L))), - new EgressEndpoint().withCategory("ok") + new EndpointDependency().withDomainName("flz").withPort(2558620893795237086L), + new EndpointDependency().withDomainName("zpuzycisp").withPort(9129919859872119531L), + new EndpointDependency().withDomainName("hmgkbrpyy").withPort(1635050264720722105L), + new EndpointDependency().withDomainName("nuqqkpikadrgvt") + .withPort(4999068038306600813L))), + new EgressEndpoint().withCategory("buynhijggm") .withEndpoints(Arrays.asList( - new EndpointDependency().withDomainName("ljyoxgvcltb").withPort(7497073347562685414L), - new EndpointDependency().withDomainName("ghkjeszzhbi") - .withPort(6478089353119603843L))))) + new EndpointDependency().withDomainName("fsiarbutr").withPort(6344517989132203623L))), + new EgressEndpoint().withCategory("azzmhjrunmpxt") + .withEndpoints(Arrays.asList( + new EndpointDependency().withDomainName("bh").withPort(3549999695260197099L), + new EndpointDependency().withDomainName("ankxmyskpbhenb") + .withPort(2918302235936136328L), + new EndpointDependency().withDomainName("ywn").withPort(3361050620024364671L))))) .withEnableDefaultEgressEndpoints(CloudServicesNetworkEnableDefaultEgressEndpoints.TRUE) .withStorageOptions( new CloudServicesNetworkStorageOptions().withMode(CloudServicesNetworkStorageMode.NONE) - .withSizeMiB(8731208977026157995L) - .withStorageApplianceId("pnazzm")); + .withSizeMiB(4938600277265014186L) + .withStorageApplianceId("yxczfclh")); model = BinaryData.fromObject(model).toObject(CloudServicesNetworkInner.class); - Assertions.assertEquals("wrqlfktsthsuco", model.location()); - Assertions.assertEquals("yyazttbt", model.tags().get("wrqpue")); - Assertions.assertEquals("frzpwvlqdqgb", model.extendedLocation().name()); - Assertions.assertEquals("qylihkaetckt", model.extendedLocation().type()); - Assertions.assertEquals("vf", model.additionalEgressEndpoints().get(0).category()); - Assertions.assertEquals("kymuctqhjfbebr", - model.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); - Assertions.assertEquals(3911807626536137727L, + Assertions.assertEquals("cykvceo", model.location()); + Assertions.assertEquals("lo", model.tags().get("notyfjfcnjbkcn")); + Assertions.assertEquals("xotogtwrupqsxv", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.extendedLocation().type()); + Assertions.assertEquals("gr", model.additionalEgressEndpoints().get(0).category()); + Assertions.assertEquals("flz", model.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); + Assertions.assertEquals(2558620893795237086L, model.additionalEgressEndpoints().get(0).endpoints().get(0).port()); Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.TRUE, model.enableDefaultEgressEndpoints()); Assertions.assertEquals(CloudServicesNetworkStorageMode.NONE, model.storageOptions().mode()); - Assertions.assertEquals(8731208977026157995L, model.storageOptions().sizeMiB()); - Assertions.assertEquals("pnazzm", model.storageOptions().storageApplianceId()); + Assertions.assertEquals(4938600277265014186L, model.storageOptions().sizeMiB()); + Assertions.assertEquals("yxczfclh", model.storageOptions().storageApplianceId()); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkListTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkListTests.java index 4d3f0deba44a..bcc56426a4ac 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkListTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkListTests.java @@ -1,86 +1,34 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.networkcloud.fluent.models.CloudServicesNetworkInner; +import com.azure.resourcemanager.networkcloud.implementation.models.CloudServicesNetworkList; import com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkEnableDefaultEgressEndpoints; -import com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkList; import com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkStorageMode; -import com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkStorageOptions; -import com.azure.resourcemanager.networkcloud.models.EgressEndpoint; -import com.azure.resourcemanager.networkcloud.models.EndpointDependency; -import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import org.junit.jupiter.api.Assertions; public final class CloudServicesNetworkListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudServicesNetworkList model = BinaryData.fromString( - "{\"nextLink\":\"lrmv\",\"value\":[{\"etag\":\"atkpnp\",\"extendedLocation\":{\"name\":\"lexxbczwtru\",\"type\":\"iqzbq\"},\"properties\":{\"additionalEgressEndpoints\":[{\"category\":\"vmyokacspkwl\",\"endpoints\":[{\"domainName\":\"dobpxjmflbvvn\"},{\"domainName\":\"hrk\"},{\"domainName\":\"ciwwzjuqkhr\"},{\"domainName\":\"ajiwkuo\"}]}],\"associatedResourceIds\":[\"kg\",\"sauuimj\",\"vxieduugidyj\"],\"clusterId\":\"f\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"svexcsonpclhoco\",\"enableDefaultEgressEndpoints\":\"True\",\"enabledEgressEndpoints\":[{\"category\":\"vleggzfbuhfmvfax\",\"endpoints\":[{\"domainName\":\"feiithlvmez\"},{\"domainName\":\"v\"}]}],\"hybridAksClustersAssociatedIds\":[\"mzsb\",\"zoggigrxwburvjxx\",\"nspydptkoenkoukn\"],\"interfaceName\":\"dwtiukbldngkp\",\"provisioningState\":\"Provisioning\",\"storageOptions\":{\"mode\":\"None\",\"sizeMiB\":8016442937915577150,\"storageApplianceId\":\"gukgjnpiucgygevq\"},\"storageStatus\":{\"mode\":\"None\",\"sizeMiB\":2573822727768682260,\"status\":\"ExpansionFailed\",\"statusMessage\":\"zcdrqjsdpydnfyhx\",\"volumeId\":\"oejzi\"},\"virtualMachinesAssociatedIds\":[\"fsj\",\"tgzfbishcbkh\",\"jdeyeamdpha\",\"alpbuxwgipwhon\"]},\"location\":\"kgshwa\",\"tags\":{\"rywn\":\"xzbinjeputt\",\"lwh\":\"zoqftiyqzrnkcqvy\",\"ryavwhheunmmqh\":\"lsicohoqqnwv\",\"noc\":\"yxzk\"},\"id\":\"koklya\",\"name\":\"uconuqszfkbey\",\"type\":\"ewrmjmwvvjektc\"}]}") + "{\"value\":[{\"properties\":{\"additionalEgressEndpoints\":[{\"category\":\"exilzznfqqnvwpmq\",\"endpoints\":[{\"domainName\":\"ruoujmk\"},{\"domainName\":\"jhwqytjrybnw\"},{\"domainName\":\"ewgdrjervn\"},{\"domainName\":\"enq\"}]},{\"category\":\"eh\",\"endpoints\":[{\"domainName\":\"doy\"},{\"domainName\":\"mifthnzdnd\"},{\"domainName\":\"l\"},{\"domainName\":\"nayqi\"}]},{\"category\":\"ynduha\",\"endpoints\":[{\"domainName\":\"qlkth\"},{\"domainName\":\"maqolbgycduie\"},{\"domainName\":\"tgccymvaolpss\"}]},{\"category\":\"qlfmmdnbb\",\"endpoints\":[{\"domainName\":\"zpswiydmc\"},{\"domainName\":\"yhz\"},{\"domainName\":\"xssadbzmnvdf\"}]}],\"enableDefaultEgressEndpoints\":\"True\",\"storageOptions\":{\"mode\":\"None\",\"sizeMiB\":6943254984636718191,\"storageApplianceId\":\"bncblylpstdbhhx\"},\"associatedResourceIds\":[\"dzu\",\"erscdntne\",\"fiwjmygtdssls\",\"tmweriofzpyq\"],\"clusterId\":\"mwabnetshhszhedp\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"wubmwmbesldn\",\"enabledEgressEndpoints\":[{\"category\":\"tppjflcx\",\"endpoints\":[{\"domainName\":\"aokonzmnsik\"},{\"domainName\":\"mkqzeqqkdltfzxmh\"},{\"domainName\":\"v\"},{\"domainName\":\"gureodkwobdag\"}]},{\"category\":\"tibqdxbxwakb\",\"endpoints\":[{\"domainName\":\"qxn\"},{\"domainName\":\"lkzgxhuriplbp\"},{\"domainName\":\"dxunkbebxmubyyn\"},{\"domainName\":\"wlrbqtkoievseo\"}]},{\"category\":\"gqrlltmuwla\",\"endpoints\":[{\"domainName\":\"zizxbmpgcj\"},{\"domainName\":\"fuzmuvpbtt\"},{\"domainName\":\"um\"},{\"domainName\":\"rp\"}]},{\"category\":\"xe\",\"endpoints\":[{\"domainName\":\"nzbtbhj\"}]}],\"hybridAksClustersAssociatedIds\":[\"kfgohdneue\"],\"interfaceName\":\"phsdyhto\",\"storageStatus\":{\"mode\":\"None\",\"sizeMiB\":1123884029466838588,\"status\":\"Available\",\"statusMessage\":\"uvxzxclvi\",\"volumeId\":\"hqzonosggbhcoh\"},\"virtualMachinesAssociatedIds\":[\"sjnkal\",\"utiiswacf\"],\"provisioningState\":\"Accepted\"},\"etag\":\"zzewkfvhqcrai\",\"extendedLocation\":{\"name\":\"vpnpp\",\"type\":\"EdgeZone\"},\"location\":\"lrwdmhdlxyj\",\"tags\":{\"edgfbcvkcvq\":\"agafcnihgwqap\"},\"id\":\"pkeqdcvdrhvoo\",\"name\":\"sotbob\",\"type\":\"dopcjwvnh\"}],\"nextLink\":\"d\"}") .toObject(CloudServicesNetworkList.class); - Assertions.assertEquals("lrmv", model.nextLink()); - Assertions.assertEquals("kgshwa", model.value().get(0).location()); - Assertions.assertEquals("xzbinjeputt", model.value().get(0).tags().get("rywn")); - Assertions.assertEquals("lexxbczwtru", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("iqzbq", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("vmyokacspkwl", model.value().get(0).additionalEgressEndpoints().get(0).category()); - Assertions.assertEquals("dobpxjmflbvvn", + Assertions.assertEquals("lrwdmhdlxyj", model.value().get(0).location()); + Assertions.assertEquals("agafcnihgwqap", model.value().get(0).tags().get("edgfbcvkcvq")); + Assertions.assertEquals("vpnpp", model.value().get(0).extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.value().get(0).extendedLocation().type()); + Assertions.assertEquals("exilzznfqqnvwpmq", model.value().get(0).additionalEgressEndpoints().get(0).category()); + Assertions.assertEquals("ruoujmk", model.value().get(0).additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.TRUE, model.value().get(0).enableDefaultEgressEndpoints()); Assertions.assertEquals(CloudServicesNetworkStorageMode.NONE, model.value().get(0).storageOptions().mode()); - Assertions.assertEquals(8016442937915577150L, model.value().get(0).storageOptions().sizeMiB()); - Assertions.assertEquals("gukgjnpiucgygevq", model.value().get(0).storageOptions().storageApplianceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CloudServicesNetworkList model = new CloudServicesNetworkList().withNextLink("lrmv") - .withValue(Arrays.asList(new CloudServicesNetworkInner().withLocation("kgshwa") - .withTags(mapOf("rywn", "xzbinjeputt", "lwh", "zoqftiyqzrnkcqvy", "ryavwhheunmmqh", "lsicohoqqnwv", - "noc", "yxzk")) - .withExtendedLocation(new ExtendedLocation().withName("lexxbczwtru").withType("iqzbq")) - .withAdditionalEgressEndpoints(Arrays.asList(new EgressEndpoint().withCategory("vmyokacspkwl") - .withEndpoints(Arrays.asList(new EndpointDependency().withDomainName("dobpxjmflbvvn"), - new EndpointDependency().withDomainName("hrk"), - new EndpointDependency().withDomainName("ciwwzjuqkhr"), - new EndpointDependency().withDomainName("ajiwkuo"))))) - .withEnableDefaultEgressEndpoints(CloudServicesNetworkEnableDefaultEgressEndpoints.TRUE) - .withStorageOptions( - new CloudServicesNetworkStorageOptions().withMode(CloudServicesNetworkStorageMode.NONE) - .withSizeMiB(8016442937915577150L) - .withStorageApplianceId("gukgjnpiucgygevq")))); - model = BinaryData.fromObject(model).toObject(CloudServicesNetworkList.class); - Assertions.assertEquals("lrmv", model.nextLink()); - Assertions.assertEquals("kgshwa", model.value().get(0).location()); - Assertions.assertEquals("xzbinjeputt", model.value().get(0).tags().get("rywn")); - Assertions.assertEquals("lexxbczwtru", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("iqzbq", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("vmyokacspkwl", model.value().get(0).additionalEgressEndpoints().get(0).category()); - Assertions.assertEquals("dobpxjmflbvvn", - model.value().get(0).additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); - Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.TRUE, - model.value().get(0).enableDefaultEgressEndpoints()); - Assertions.assertEquals(CloudServicesNetworkStorageMode.NONE, model.value().get(0).storageOptions().mode()); - Assertions.assertEquals(8016442937915577150L, model.value().get(0).storageOptions().sizeMiB()); - Assertions.assertEquals("gukgjnpiucgygevq", model.value().get(0).storageOptions().storageApplianceId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(6943254984636718191L, model.value().get(0).storageOptions().sizeMiB()); + Assertions.assertEquals("bncblylpstdbhhx", model.value().get(0).storageOptions().storageApplianceId()); + Assertions.assertEquals("d", model.nextLink()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkPatchParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkPatchParametersTests.java index 8f2486563860..0243131ede02 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkPatchParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkPatchParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -20,43 +20,70 @@ public final class CloudServicesNetworkPatchParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudServicesNetworkPatchParameters model = BinaryData.fromString( - "{\"properties\":{\"additionalEgressEndpoints\":[{\"category\":\"zhzdtxetlgydlhqv\",\"endpoints\":[{\"domainName\":\"npxybafiq\",\"port\":963093637527470244}]}],\"enableDefaultEgressEndpoints\":\"True\",\"storageOptions\":{\"mode\":\"None\",\"sizeMiB\":4818628415741720464,\"storageApplianceId\":\"lbyulidwcwvmze\"}},\"tags\":{\"kspzhzmtksjcit\":\"nfhjirwgdnqzbr\"}}") + "{\"properties\":{\"additionalEgressEndpoints\":[{\"category\":\"ilpjzuaejxdult\",\"endpoints\":[{\"domainName\":\"zbbtdzumveek\",\"port\":7699661261462782532},{\"domainName\":\"zuhkfpbsjyof\",\"port\":2440593564933545315}]},{\"category\":\"us\",\"endpoints\":[{\"domainName\":\"touwaboekqv\",\"port\":2699583635820054770},{\"domainName\":\"smv\",\"port\":8384991099911613052},{\"domainName\":\"jsflhhcaalnjix\",\"port\":4911333762565955558},{\"domainName\":\"awjoyaqcslyjp\",\"port\":7703908538660559056}]},{\"category\":\"zyexzn\",\"endpoints\":[{\"domainName\":\"ixhnrztf\",\"port\":1865985112447305959},{\"domainName\":\"nxknalaulp\",\"port\":3477162422481469913},{\"domainName\":\"tpnapnyiropuhpig\",\"port\":9191271768964579261}]},{\"category\":\"lgqg\",\"endpoints\":[{\"domainName\":\"xmedjvcsly\",\"port\":2572160878205453976},{\"domainName\":\"ncw\",\"port\":2313446192917643442}]}],\"enableDefaultEgressEndpoints\":\"False\",\"storageOptions\":{\"mode\":\"None\",\"sizeMiB\":6598774338835583357,\"storageApplianceId\":\"apkteoellwptfdyg\"}},\"tags\":{\"ac\":\"b\",\"fqrhhuaopppc\":\"op\",\"lzdahzxctobgbkdm\":\"eqx\"}}") .toObject(CloudServicesNetworkPatchParameters.class); - Assertions.assertEquals("nfhjirwgdnqzbr", model.tags().get("kspzhzmtksjcit")); - Assertions.assertEquals("zhzdtxetlgydlhqv", model.additionalEgressEndpoints().get(0).category()); - Assertions.assertEquals("npxybafiq", model.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); - Assertions.assertEquals(963093637527470244L, + Assertions.assertEquals("b", model.tags().get("ac")); + Assertions.assertEquals("ilpjzuaejxdult", model.additionalEgressEndpoints().get(0).category()); + Assertions.assertEquals("zbbtdzumveek", + model.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); + Assertions.assertEquals(7699661261462782532L, model.additionalEgressEndpoints().get(0).endpoints().get(0).port()); - Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.TRUE, + Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.FALSE, model.enableDefaultEgressEndpoints()); Assertions.assertEquals(CloudServicesNetworkStorageMode.NONE, model.storageOptions().mode()); - Assertions.assertEquals(4818628415741720464L, model.storageOptions().sizeMiB()); - Assertions.assertEquals("lbyulidwcwvmze", model.storageOptions().storageApplianceId()); + Assertions.assertEquals(6598774338835583357L, model.storageOptions().sizeMiB()); + Assertions.assertEquals("apkteoellwptfdyg", model.storageOptions().storageApplianceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CloudServicesNetworkPatchParameters model - = new CloudServicesNetworkPatchParameters().withTags(mapOf("kspzhzmtksjcit", "nfhjirwgdnqzbr")) - .withAdditionalEgressEndpoints(Arrays.asList(new EgressEndpoint().withCategory("zhzdtxetlgydlhqv") - .withEndpoints(Arrays - .asList(new EndpointDependency().withDomainName("npxybafiq").withPort(963093637527470244L))))) - .withEnableDefaultEgressEndpoints(CloudServicesNetworkEnableDefaultEgressEndpoints.TRUE) + = new CloudServicesNetworkPatchParameters() + .withTags(mapOf("ac", "b", "fqrhhuaopppc", "op", "lzdahzxctobgbkdm", "eqx")) + .withAdditionalEgressEndpoints( + Arrays.asList( + new EgressEndpoint().withCategory("ilpjzuaejxdult") + .withEndpoints(Arrays.asList( + new EndpointDependency().withDomainName("zbbtdzumveek").withPort(7699661261462782532L), + new EndpointDependency() + .withDomainName("zuhkfpbsjyof") + .withPort(2440593564933545315L))), + new EgressEndpoint().withCategory("us") + .withEndpoints(Arrays.asList( + new EndpointDependency().withDomainName("touwaboekqv").withPort(2699583635820054770L), + new EndpointDependency().withDomainName("smv").withPort(8384991099911613052L), + new EndpointDependency() + .withDomainName("jsflhhcaalnjix") + .withPort(4911333762565955558L), + new EndpointDependency().withDomainName("awjoyaqcslyjp") + .withPort(7703908538660559056L))), + new EgressEndpoint().withCategory("zyexzn") + .withEndpoints(Arrays.asList( + new EndpointDependency().withDomainName("ixhnrztf").withPort(1865985112447305959L), + new EndpointDependency().withDomainName("nxknalaulp").withPort(3477162422481469913L), + new EndpointDependency().withDomainName("tpnapnyiropuhpig") + .withPort(9191271768964579261L))), + new EgressEndpoint().withCategory("lgqg") + .withEndpoints(Arrays.asList( + new EndpointDependency().withDomainName("xmedjvcsly").withPort(2572160878205453976L), + new EndpointDependency().withDomainName("ncw").withPort(2313446192917643442L))))) + .withEnableDefaultEgressEndpoints(CloudServicesNetworkEnableDefaultEgressEndpoints.FALSE) .withStorageOptions( new CloudServicesNetworkStorageOptionsPatch().withMode(CloudServicesNetworkStorageMode.NONE) - .withSizeMiB(4818628415741720464L) - .withStorageApplianceId("lbyulidwcwvmze")); + .withSizeMiB(6598774338835583357L) + .withStorageApplianceId("apkteoellwptfdyg")); model = BinaryData.fromObject(model).toObject(CloudServicesNetworkPatchParameters.class); - Assertions.assertEquals("nfhjirwgdnqzbr", model.tags().get("kspzhzmtksjcit")); - Assertions.assertEquals("zhzdtxetlgydlhqv", model.additionalEgressEndpoints().get(0).category()); - Assertions.assertEquals("npxybafiq", model.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); - Assertions.assertEquals(963093637527470244L, + Assertions.assertEquals("b", model.tags().get("ac")); + Assertions.assertEquals("ilpjzuaejxdult", model.additionalEgressEndpoints().get(0).category()); + Assertions.assertEquals("zbbtdzumveek", + model.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); + Assertions.assertEquals(7699661261462782532L, model.additionalEgressEndpoints().get(0).endpoints().get(0).port()); - Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.TRUE, + Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.FALSE, model.enableDefaultEgressEndpoints()); Assertions.assertEquals(CloudServicesNetworkStorageMode.NONE, model.storageOptions().mode()); - Assertions.assertEquals(4818628415741720464L, model.storageOptions().sizeMiB()); - Assertions.assertEquals("lbyulidwcwvmze", model.storageOptions().storageApplianceId()); + Assertions.assertEquals(6598774338835583357L, model.storageOptions().sizeMiB()); + Assertions.assertEquals("apkteoellwptfdyg", model.storageOptions().storageApplianceId()); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkPatchPropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkPatchPropertiesTests.java index e6780c4ed2de..7bf19fda70f1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkPatchPropertiesTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkPatchPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -18,18 +18,17 @@ public final class CloudServicesNetworkPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudServicesNetworkPatchProperties model = BinaryData.fromString( - "{\"additionalEgressEndpoints\":[{\"category\":\"sxcdgljplkeuach\",\"endpoints\":[{\"domainName\":\"mflrytswfpfmdgyc\",\"port\":2432394852531944937},{\"domainName\":\"kwhqj\",\"port\":5686621120281636649},{\"domainName\":\"urlpshh\",\"port\":7118645159818528146}]},{\"category\":\"dwqslsrhmpqvw\",\"endpoints\":[{\"domainName\":\"kondcb\",\"port\":7748701616032093225},{\"domainName\":\"uvqejosovyrrle\",\"port\":7121300630557457909},{\"domainName\":\"nu\",\"port\":9017762736115514646}]},{\"category\":\"qobbpihehcec\",\"endpoints\":[{\"domainName\":\"mrqbrjbbmpxdlv\",\"port\":2102350623609121366},{\"domainName\":\"e\",\"port\":6277267210588424602},{\"domainName\":\"eqwjksgh\",\"port\":6552237191455504993}]},{\"category\":\"hxogjggsvoujkxi\",\"endpoints\":[{\"domainName\":\"afhrkmdyomk\",\"port\":1583664453872709326},{\"domainName\":\"fbhdy\",\"port\":8094379454967795002}]}],\"enableDefaultEgressEndpoints\":\"False\",\"storageOptions\":{\"mode\":\"Standard\",\"sizeMiB\":1698098301305470881,\"storageApplianceId\":\"wzovgk\"}}") + "{\"additionalEgressEndpoints\":[{\"category\":\"postmgrcfbunrm\",\"endpoints\":[{\"domainName\":\"jhhkxbp\",\"port\":8074620873162996793},{\"domainName\":\"jhxxjyn\",\"port\":6645046241079336375},{\"domainName\":\"vkr\",\"port\":3673335295650455284}]},{\"category\":\"xqzvszjfa\",\"endpoints\":[{\"domainName\":\"j\",\"port\":7006497464458927834},{\"domainName\":\"ivetvtcq\",\"port\":3137986994872936614}]},{\"category\":\"oqmcbxvwvxyslq\",\"endpoints\":[{\"domainName\":\"sfxobl\",\"port\":417427937976699125},{\"domainName\":\"lmpewwwfbkr\",\"port\":3908578506994645119},{\"domainName\":\"vshqjohxcr\",\"port\":6083212229760286922}]}],\"enableDefaultEgressEndpoints\":\"True\",\"storageOptions\":{\"mode\":\"None\",\"sizeMiB\":780248599028982763,\"storageApplianceId\":\"hsqfsubcgjbirxbp\"}}") .toObject(CloudServicesNetworkPatchProperties.class); - Assertions.assertEquals("sxcdgljplkeuach", model.additionalEgressEndpoints().get(0).category()); - Assertions.assertEquals("mflrytswfpfmdgyc", - model.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); - Assertions.assertEquals(2432394852531944937L, + Assertions.assertEquals("postmgrcfbunrm", model.additionalEgressEndpoints().get(0).category()); + Assertions.assertEquals("jhhkxbp", model.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); + Assertions.assertEquals(8074620873162996793L, model.additionalEgressEndpoints().get(0).endpoints().get(0).port()); - Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.FALSE, + Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.TRUE, model.enableDefaultEgressEndpoints()); - Assertions.assertEquals(CloudServicesNetworkStorageMode.STANDARD, model.storageOptions().mode()); - Assertions.assertEquals(1698098301305470881L, model.storageOptions().sizeMiB()); - Assertions.assertEquals("wzovgk", model.storageOptions().storageApplianceId()); + Assertions.assertEquals(CloudServicesNetworkStorageMode.NONE, model.storageOptions().mode()); + Assertions.assertEquals(780248599028982763L, model.storageOptions().sizeMiB()); + Assertions.assertEquals("hsqfsubcgjbirxbp", model.storageOptions().storageApplianceId()); } @org.junit.jupiter.api.Test @@ -37,44 +36,40 @@ public void testSerialize() throws Exception { CloudServicesNetworkPatchProperties model = new CloudServicesNetworkPatchProperties() .withAdditionalEgressEndpoints( - Arrays.asList( - new EgressEndpoint().withCategory("sxcdgljplkeuach") - .withEndpoints(Arrays.asList( - new EndpointDependency().withDomainName("mflrytswfpfmdgyc") - .withPort(2432394852531944937L), - new EndpointDependency().withDomainName("kwhqj").withPort(5686621120281636649L), - new EndpointDependency().withDomainName("urlpshh").withPort(7118645159818528146L))), - new EgressEndpoint().withCategory("dwqslsrhmpqvw") - .withEndpoints(Arrays.asList( - new EndpointDependency().withDomainName("kondcb").withPort(7748701616032093225L), - new EndpointDependency().withDomainName("uvqejosovyrrle") - .withPort(7121300630557457909L), - new EndpointDependency().withDomainName("nu").withPort(9017762736115514646L))), - new EgressEndpoint().withCategory("qobbpihehcec") - .withEndpoints(Arrays.asList( - new EndpointDependency().withDomainName("mrqbrjbbmpxdlv") - .withPort(2102350623609121366L), - new EndpointDependency().withDomainName("e").withPort(6277267210588424602L), - new EndpointDependency().withDomainName("eqwjksgh").withPort(6552237191455504993L))), - new EgressEndpoint().withCategory("hxogjggsvoujkxi") - .withEndpoints(Arrays.asList( - new EndpointDependency().withDomainName("afhrkmdyomk").withPort(1583664453872709326L), - new EndpointDependency().withDomainName("fbhdy").withPort(8094379454967795002L))))) - .withEnableDefaultEgressEndpoints(CloudServicesNetworkEnableDefaultEgressEndpoints.FALSE) + Arrays + .asList( + new EgressEndpoint().withCategory("postmgrcfbunrm") + .withEndpoints(Arrays.asList( + new EndpointDependency().withDomainName("jhhkxbp").withPort(8074620873162996793L), + new EndpointDependency().withDomainName("jhxxjyn").withPort(6645046241079336375L), + new EndpointDependency().withDomainName("vkr").withPort(3673335295650455284L))), + new EgressEndpoint().withCategory("xqzvszjfa") + .withEndpoints(Arrays.asList( + new EndpointDependency().withDomainName("j").withPort(7006497464458927834L), + new EndpointDependency().withDomainName("ivetvtcq") + .withPort(3137986994872936614L))), + new EgressEndpoint().withCategory("oqmcbxvwvxyslq") + .withEndpoints(Arrays.asList( + new EndpointDependency().withDomainName("sfxobl").withPort(417427937976699125L), + new EndpointDependency() + .withDomainName("lmpewwwfbkr") + .withPort(3908578506994645119L), + new EndpointDependency().withDomainName("vshqjohxcr") + .withPort(6083212229760286922L))))) + .withEnableDefaultEgressEndpoints(CloudServicesNetworkEnableDefaultEgressEndpoints.TRUE) .withStorageOptions( - new CloudServicesNetworkStorageOptionsPatch().withMode(CloudServicesNetworkStorageMode.STANDARD) - .withSizeMiB(1698098301305470881L) - .withStorageApplianceId("wzovgk")); + new CloudServicesNetworkStorageOptionsPatch().withMode(CloudServicesNetworkStorageMode.NONE) + .withSizeMiB(780248599028982763L) + .withStorageApplianceId("hsqfsubcgjbirxbp")); model = BinaryData.fromObject(model).toObject(CloudServicesNetworkPatchProperties.class); - Assertions.assertEquals("sxcdgljplkeuach", model.additionalEgressEndpoints().get(0).category()); - Assertions.assertEquals("mflrytswfpfmdgyc", - model.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); - Assertions.assertEquals(2432394852531944937L, + Assertions.assertEquals("postmgrcfbunrm", model.additionalEgressEndpoints().get(0).category()); + Assertions.assertEquals("jhhkxbp", model.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); + Assertions.assertEquals(8074620873162996793L, model.additionalEgressEndpoints().get(0).endpoints().get(0).port()); - Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.FALSE, + Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.TRUE, model.enableDefaultEgressEndpoints()); - Assertions.assertEquals(CloudServicesNetworkStorageMode.STANDARD, model.storageOptions().mode()); - Assertions.assertEquals(1698098301305470881L, model.storageOptions().sizeMiB()); - Assertions.assertEquals("wzovgk", model.storageOptions().storageApplianceId()); + Assertions.assertEquals(CloudServicesNetworkStorageMode.NONE, model.storageOptions().mode()); + Assertions.assertEquals(780248599028982763L, model.storageOptions().sizeMiB()); + Assertions.assertEquals("hsqfsubcgjbirxbp", model.storageOptions().storageApplianceId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkPropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkPropertiesTests.java index 066b25d7376c..3d9323bb91e6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkPropertiesTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -18,49 +18,56 @@ public final class CloudServicesNetworkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudServicesNetworkProperties model = BinaryData.fromString( - "{\"additionalEgressEndpoints\":[{\"category\":\"plwzbhvgyugu\",\"endpoints\":[{\"domainName\":\"vmkfssxqu\",\"port\":2455965823671467627},{\"domainName\":\"l\",\"port\":5850785611921356044},{\"domainName\":\"xnkjzkdesl\",\"port\":8771297433888765314}]},{\"category\":\"pwiyig\",\"endpoints\":[{\"domainName\":\"pkdwzbai\",\"port\":3567948302595107358}]}],\"associatedResourceIds\":[\"m\",\"yqupedeojnabckh\"],\"clusterId\":\"txp\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"tfhvpesapskrdqmh\",\"enableDefaultEgressEndpoints\":\"False\",\"enabledEgressEndpoints\":[{\"category\":\"ldwkyzxuutkn\",\"endpoints\":[{\"domainName\":\"scwsv\",\"port\":2794265295118963681}]},{\"category\":\"ogtwrupqsxvnmi\",\"endpoints\":[{\"domainName\":\"kvceoveilovnotyf\",\"port\":4491439225933409580},{\"domainName\":\"jbkcnxdhbttkph\",\"port\":6450730438848589350},{\"domainName\":\"vjtoqnermclfp\",\"port\":5643709596531003299}]},{\"category\":\"xus\",\"endpoints\":[{\"domainName\":\"pabgyeps\",\"port\":8481136103419413526},{\"domainName\":\"zq\",\"port\":8605356393131124323}]}],\"hybridAksClustersAssociatedIds\":[\"mueef\",\"zwfqkqujidsuyon\",\"bglaocqxtccm\"],\"interfaceName\":\"udxytlmoyrx\",\"provisioningState\":\"Provisioning\",\"storageOptions\":{\"mode\":\"Standard\",\"sizeMiB\":7047535531175801519,\"storageApplianceId\":\"xhdzhlrqjbhckf\"},\"storageStatus\":{\"mode\":\"None\",\"sizeMiB\":6356911616351908297,\"status\":\"Available\",\"statusMessage\":\"pycanuzbpz\",\"volumeId\":\"fkuwbcrnwbmehhse\"},\"virtualMachinesAssociatedIds\":[\"us\",\"tslhspkdeem\",\"ofmxagkvtmelmqkr\"]}") + "{\"additionalEgressEndpoints\":[{\"category\":\"zq\",\"endpoints\":[{\"domainName\":\"xywpmueefjzwfqkq\",\"port\":2752624738826273376},{\"domainName\":\"suyonobglaocq\",\"port\":2903733515306491145}]},{\"category\":\"mgyudxytlmoyrxv\",\"endpoints\":[{\"domainName\":\"u\",\"port\":1705151259952930874},{\"domainName\":\"ntxhdzhlrqjbhck\",\"port\":3732648798784096291}]},{\"category\":\"rxsbkyvp\",\"endpoints\":[{\"domainName\":\"anuzbpzkafkuw\",\"port\":3739612014503644987}]},{\"category\":\"wbme\",\"endpoints\":[{\"domainName\":\"seyvj\",\"port\":2840663437896188419},{\"domainName\":\"slhs\",\"port\":6698294689469432122}]}],\"enableDefaultEgressEndpoints\":\"False\",\"storageOptions\":{\"mode\":\"None\",\"sizeMiB\":5804956821269941754,\"storageApplianceId\":\"kv\"},\"associatedResourceIds\":[\"lmqkrhahvlj\",\"ahaquh\"],\"clusterId\":\"hmdua\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"qpv\",\"enabledEgressEndpoints\":[{\"category\":\"mwsrcrgvxpvgo\",\"endpoints\":[{\"domainName\":\"lf\",\"port\":2110052424631332756},{\"domainName\":\"wbnb\",\"port\":8988719472980860271},{\"domainName\":\"awkz\",\"port\":301155517903615814},{\"domainName\":\"ourqhakau\",\"port\":5909550063004998256}]},{\"category\":\"sfwxosowzxc\",\"endpoints\":[{\"domainName\":\"i\",\"port\":2404142074196330261},{\"domainName\":\"xdje\",\"port\":4998574770628766131},{\"domainName\":\"cwwfvovbvme\",\"port\":1380137712554146124}]},{\"category\":\"vyhzceuojgjrwj\",\"endpoints\":[{\"domainName\":\"iotwmcdytdxwit\",\"port\":4599897838164298418},{\"domainName\":\"awgqwgxhni\",\"port\":1014443736888703803},{\"domainName\":\"bkpyc\",\"port\":3207887590068682243}]},{\"category\":\"ndnhj\",\"endpoints\":[{\"domainName\":\"uwhvylwzbtdhxujz\",\"port\":9120098526772116433},{\"domainName\":\"ow\",\"port\":8891221399810858011},{\"domainName\":\"zqlveualupjmkhf\",\"port\":3301190446287542210},{\"domainName\":\"cswsrtjri\",\"port\":7224326417185039390}]}],\"hybridAksClustersAssociatedIds\":[\"ewtghfgblcgw\",\"zvlvqhjkbegib\"],\"interfaceName\":\"mxiebw\",\"storageStatus\":{\"mode\":\"None\",\"sizeMiB\":6525239708045322977,\"status\":\"ExpansionFailed\",\"statusMessage\":\"rtzju\",\"volumeId\":\"wyzmhtxon\"},\"virtualMachinesAssociatedIds\":[\"savjcbpwxqps\"],\"provisioningState\":\"Provisioning\"}") .toObject(CloudServicesNetworkProperties.class); - Assertions.assertEquals("plwzbhvgyugu", model.additionalEgressEndpoints().get(0).category()); - Assertions.assertEquals("vmkfssxqu", model.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); - Assertions.assertEquals(2455965823671467627L, + Assertions.assertEquals("zq", model.additionalEgressEndpoints().get(0).category()); + Assertions.assertEquals("xywpmueefjzwfqkq", + model.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); + Assertions.assertEquals(2752624738826273376L, model.additionalEgressEndpoints().get(0).endpoints().get(0).port()); Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.FALSE, model.enableDefaultEgressEndpoints()); - Assertions.assertEquals(CloudServicesNetworkStorageMode.STANDARD, model.storageOptions().mode()); - Assertions.assertEquals(7047535531175801519L, model.storageOptions().sizeMiB()); - Assertions.assertEquals("xhdzhlrqjbhckf", model.storageOptions().storageApplianceId()); + Assertions.assertEquals(CloudServicesNetworkStorageMode.NONE, model.storageOptions().mode()); + Assertions.assertEquals(5804956821269941754L, model.storageOptions().sizeMiB()); + Assertions.assertEquals("kv", model.storageOptions().storageApplianceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CloudServicesNetworkProperties model = new CloudServicesNetworkProperties() - .withAdditionalEgressEndpoints( - Arrays - .asList( - new EgressEndpoint().withCategory("plwzbhvgyugu") - .withEndpoints(Arrays.asList( - new EndpointDependency().withDomainName("vmkfssxqu").withPort(2455965823671467627L), - new EndpointDependency().withDomainName("l").withPort(5850785611921356044L), - new EndpointDependency().withDomainName("xnkjzkdesl") - .withPort(8771297433888765314L))), - new EgressEndpoint().withCategory("pwiyig") - .withEndpoints(Arrays.asList(new EndpointDependency().withDomainName("pkdwzbai") - .withPort(3567948302595107358L))))) + .withAdditionalEgressEndpoints(Arrays.asList( + new EgressEndpoint().withCategory("zq") + .withEndpoints(Arrays.asList( + new EndpointDependency().withDomainName("xywpmueefjzwfqkq").withPort(2752624738826273376L), + new EndpointDependency().withDomainName("suyonobglaocq").withPort(2903733515306491145L))), + new EgressEndpoint().withCategory("mgyudxytlmoyrxv") + .withEndpoints( + Arrays.asList(new EndpointDependency().withDomainName("u").withPort(1705151259952930874L), + new EndpointDependency().withDomainName("ntxhdzhlrqjbhck") + .withPort(3732648798784096291L))), + new EgressEndpoint().withCategory("rxsbkyvp") + .withEndpoints(Arrays.asList( + new EndpointDependency().withDomainName("anuzbpzkafkuw").withPort(3739612014503644987L))), + new EgressEndpoint().withCategory("wbme") + .withEndpoints(Arrays.asList( + new EndpointDependency().withDomainName("seyvj").withPort(2840663437896188419L), + new EndpointDependency().withDomainName("slhs").withPort(6698294689469432122L))))) .withEnableDefaultEgressEndpoints(CloudServicesNetworkEnableDefaultEgressEndpoints.FALSE) .withStorageOptions( - new CloudServicesNetworkStorageOptions().withMode(CloudServicesNetworkStorageMode.STANDARD) - .withSizeMiB(7047535531175801519L) - .withStorageApplianceId("xhdzhlrqjbhckf")); + new CloudServicesNetworkStorageOptions().withMode(CloudServicesNetworkStorageMode.NONE) + .withSizeMiB(5804956821269941754L) + .withStorageApplianceId("kv")); model = BinaryData.fromObject(model).toObject(CloudServicesNetworkProperties.class); - Assertions.assertEquals("plwzbhvgyugu", model.additionalEgressEndpoints().get(0).category()); - Assertions.assertEquals("vmkfssxqu", model.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); - Assertions.assertEquals(2455965823671467627L, + Assertions.assertEquals("zq", model.additionalEgressEndpoints().get(0).category()); + Assertions.assertEquals("xywpmueefjzwfqkq", + model.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); + Assertions.assertEquals(2752624738826273376L, model.additionalEgressEndpoints().get(0).endpoints().get(0).port()); Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.FALSE, model.enableDefaultEgressEndpoints()); - Assertions.assertEquals(CloudServicesNetworkStorageMode.STANDARD, model.storageOptions().mode()); - Assertions.assertEquals(7047535531175801519L, model.storageOptions().sizeMiB()); - Assertions.assertEquals("xhdzhlrqjbhckf", model.storageOptions().storageApplianceId()); + Assertions.assertEquals(CloudServicesNetworkStorageMode.NONE, model.storageOptions().mode()); + Assertions.assertEquals(5804956821269941754L, model.storageOptions().sizeMiB()); + Assertions.assertEquals("kv", model.storageOptions().storageApplianceId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkStorageOptionsPatchTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkStorageOptionsPatchTests.java index 6b56b088fdc8..f0930c91ab86 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkStorageOptionsPatchTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkStorageOptionsPatchTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,22 +13,22 @@ public final class CloudServicesNetworkStorageOptionsPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudServicesNetworkStorageOptionsPatch model = BinaryData - .fromString("{\"mode\":\"Standard\",\"sizeMiB\":715597420280397624,\"storageApplianceId\":\"cjc\"}") + .fromString("{\"mode\":\"Standard\",\"sizeMiB\":9066736792193838127,\"storageApplianceId\":\"fdtwssotft\"}") .toObject(CloudServicesNetworkStorageOptionsPatch.class); Assertions.assertEquals(CloudServicesNetworkStorageMode.STANDARD, model.mode()); - Assertions.assertEquals(715597420280397624L, model.sizeMiB()); - Assertions.assertEquals("cjc", model.storageApplianceId()); + Assertions.assertEquals(9066736792193838127L, model.sizeMiB()); + Assertions.assertEquals("fdtwssotft", model.storageApplianceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CloudServicesNetworkStorageOptionsPatch model = new CloudServicesNetworkStorageOptionsPatch().withMode(CloudServicesNetworkStorageMode.STANDARD) - .withSizeMiB(715597420280397624L) - .withStorageApplianceId("cjc"); + .withSizeMiB(9066736792193838127L) + .withStorageApplianceId("fdtwssotft"); model = BinaryData.fromObject(model).toObject(CloudServicesNetworkStorageOptionsPatch.class); Assertions.assertEquals(CloudServicesNetworkStorageMode.STANDARD, model.mode()); - Assertions.assertEquals(715597420280397624L, model.sizeMiB()); - Assertions.assertEquals("cjc", model.storageApplianceId()); + Assertions.assertEquals(9066736792193838127L, model.sizeMiB()); + Assertions.assertEquals("fdtwssotft", model.storageApplianceId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkStorageOptionsTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkStorageOptionsTests.java index a98dfb9136af..b4aa4c553abe 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkStorageOptionsTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkStorageOptionsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,23 +13,22 @@ public final class CloudServicesNetworkStorageOptionsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudServicesNetworkStorageOptions model = BinaryData - .fromString( - "{\"mode\":\"None\",\"sizeMiB\":2957493200250609198,\"storageApplianceId\":\"beldawkzbaliourq\"}") + .fromString("{\"mode\":\"None\",\"sizeMiB\":6872658649281325491,\"storageApplianceId\":\"rvxdjzlmw\"}") .toObject(CloudServicesNetworkStorageOptions.class); Assertions.assertEquals(CloudServicesNetworkStorageMode.NONE, model.mode()); - Assertions.assertEquals(2957493200250609198L, model.sizeMiB()); - Assertions.assertEquals("beldawkzbaliourq", model.storageApplianceId()); + Assertions.assertEquals(6872658649281325491L, model.sizeMiB()); + Assertions.assertEquals("rvxdjzlmw", model.storageApplianceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CloudServicesNetworkStorageOptions model = new CloudServicesNetworkStorageOptions().withMode(CloudServicesNetworkStorageMode.NONE) - .withSizeMiB(2957493200250609198L) - .withStorageApplianceId("beldawkzbaliourq"); + .withSizeMiB(6872658649281325491L) + .withStorageApplianceId("rvxdjzlmw"); model = BinaryData.fromObject(model).toObject(CloudServicesNetworkStorageOptions.class); Assertions.assertEquals(CloudServicesNetworkStorageMode.NONE, model.mode()); - Assertions.assertEquals(2957493200250609198L, model.sizeMiB()); - Assertions.assertEquals("beldawkzbaliourq", model.storageApplianceId()); + Assertions.assertEquals(6872658649281325491L, model.sizeMiB()); + Assertions.assertEquals("rvxdjzlmw", model.storageApplianceId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkStorageStatusTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkStorageStatusTests.java index 460b642a18a5..bc5102179e00 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkStorageStatusTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworkStorageStatusTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class CloudServicesNetworkStorageStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudServicesNetworkStorageStatus model = BinaryData.fromString( - "{\"mode\":\"Standard\",\"sizeMiB\":131133871653701525,\"status\":\"ExpandingVolume\",\"statusMessage\":\"sfwxosowzxc\",\"volumeId\":\"i\"}") + "{\"mode\":\"Standard\",\"sizeMiB\":1775729051253109920,\"status\":\"Repairing\",\"statusMessage\":\"ovawjvzunlu\",\"volumeId\":\"nnprn\"}") .toObject(CloudServicesNetworkStorageStatus.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CloudServicesNetworkStorageStatus model = new CloudServicesNetworkStorageStatus(); - model = BinaryData.fromObject(model).toObject(CloudServicesNetworkStorageStatus.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksCreateOrUpdateMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksCreateOrUpdateMockTests.java index 22a93bd74072..b6145dfdaf94 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksCreateOrUpdateMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -17,6 +17,7 @@ import com.azure.resourcemanager.networkcloud.models.EgressEndpoint; import com.azure.resourcemanager.networkcloud.models.EndpointDependency; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; @@ -30,7 +31,7 @@ public final class CloudServicesNetworksCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"krvfyifkdschl\",\"extendedLocation\":{\"name\":\"vfictnkjjwgcwn\",\"type\":\"hbkgfyrt\"},\"properties\":{\"additionalEgressEndpoints\":[{\"category\":\"mjpjscdfpdqwty\",\"endpoints\":[{\"domainName\":\"vgwmseharxifvqnr\"}]},{\"category\":\"tmbpjp\",\"endpoints\":[{\"domainName\":\"vwjhrsidqpxlbt\"},{\"domainName\":\"akftng\"},{\"domainName\":\"twmykyut\"},{\"domainName\":\"ym\"}]},{\"category\":\"wmfjhp\",\"endpoints\":[{\"domainName\":\"vjqdvdwkq\"},{\"domainName\":\"ldrlefgnaavua\"}]},{\"category\":\"n\",\"endpoints\":[{\"domainName\":\"taoutnpdct\"},{\"domainName\":\"hspfefyihd\"},{\"domainName\":\"yeuyldph\"}]}],\"associatedResourceIds\":[\"bkcgsuthhllnm\",\"y\",\"efxexlf\",\"i\"],\"clusterId\":\"xtjrrlk\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"jhhxdlajf\",\"enableDefaultEgressEndpoints\":\"False\",\"enabledEgressEndpoints\":[{\"category\":\"cvslxlhuavkrmukm\",\"endpoints\":[{\"domainName\":\"mkxettcsloj\"},{\"domainName\":\"kqidnqtoqx\"},{\"domainName\":\"hqxc\"},{\"domainName\":\"qhtkbt\"}]}],\"hybridAksClustersAssociatedIds\":[\"rngl\"],\"interfaceName\":\"biipsnawwlqkznx\",\"provisioningState\":\"Succeeded\",\"storageOptions\":{\"mode\":\"Standard\",\"sizeMiB\":6103361317261537773,\"storageApplianceId\":\"kwmuqqo\"},\"storageStatus\":{\"mode\":\"Standard\",\"sizeMiB\":255262120126755080,\"status\":\"ExpandingVolume\",\"statusMessage\":\"rwvaexhdc\",\"volumeId\":\"ceqnkbrupobehd\"},\"virtualMachinesAssociatedIds\":[\"zacvu\",\"epj\",\"bibnzpphepifex\",\"eqir\"]},\"location\":\"jclykcg\",\"tags\":{\"punettepdjxq\":\"pjlvczuoda\"},\"id\":\"skoynuiylpc\",\"name\":\"aewse\",\"type\":\"vesk\"}"; + = "{\"properties\":{\"additionalEgressEndpoints\":[{\"category\":\"ftibtyibuyvpirfq\",\"endpoints\":[{\"domainName\":\"n\"}]}],\"enableDefaultEgressEndpoints\":\"True\",\"storageOptions\":{\"mode\":\"None\",\"sizeMiB\":4616192168130446276,\"storageApplianceId\":\"nrexkxbhxv\"},\"associatedResourceIds\":[\"ulgm\"],\"clusterId\":\"jevdyznf\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"kskmqozzkivyhjrl\",\"enabledEgressEndpoints\":[{\"category\":\"jixlqfhefkwabs\",\"endpoints\":[{\"domainName\":\"ron\"},{\"domainName\":\"qlmgnlqxsjxt\"},{\"domainName\":\"lexhv\"}]}],\"hybridAksClustersAssociatedIds\":[\"ozoolzq\"],\"interfaceName\":\"arkuzl\",\"storageStatus\":{\"mode\":\"Standard\",\"sizeMiB\":1124507699372336303,\"status\":\"Initializing\",\"statusMessage\":\"wqy\",\"volumeId\":\"lhdyzmyckzex\"},\"virtualMachinesAssociatedIds\":[\"kck\",\"wymxgaabjk\"],\"provisioningState\":\"Succeeded\"},\"etag\":\"hfaogzv\",\"extendedLocation\":{\"name\":\"iwr\",\"type\":\"CustomLocation\"},\"location\":\"dyjqu\",\"tags\":{\"h\":\"crraueekcsu\"},\"id\":\"gdda\",\"name\":\"bcbgydlqidywmhm\",\"type\":\"tyrilkfbnrqqxvz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -40,47 +41,44 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CloudServicesNetwork response = manager.cloudServicesNetworks() - .define("cndhzxrrfcfs") - .withRegion("wbnfddepl") - .withExistingResourceGroup("qvldaswvppisqqzl") - .withExtendedLocation(new ExtendedLocation().withName("zxlb").withType("xomeikjclwzacn")) - .withTags(mapOf("hsbrcary", "jnsfzygleexahvmy")) + .define("zknxkv") + .withRegion("fsuqtaazyqbxy") + .withExistingResourceGroup("a") + .withExtendedLocation( + new ExtendedLocation().withName("zacn").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withTags(mapOf("qqi", "fp")) .withAdditionalEgressEndpoints(Arrays.asList( - new EgressEndpoint().withCategory("suqtaazyqbx") - .withEndpoints(Arrays.asList(new EndpointDependency().withDomainName("oyfpuq"))), - new EgressEndpoint().withCategory("iqezxlhdj") - .withEndpoints(Arrays.asList(new EndpointDependency().withDomainName("dcadwvpsozjiihjr"), - new EndpointDependency().withDomainName("ybmrzoepnxwd"), - new EndpointDependency().withDomainName("wnjkgvfn"))), - new EgressEndpoint().withCategory("xaurs") - .withEndpoints(Arrays.asList(new EndpointDependency().withDomainName("tibtyi"), - new EndpointDependency().withDomainName("uyvpirf"), - new EndpointDependency().withDomainName("jpnqnoowsbeden"), - new EndpointDependency().withDomainName("exkxbhx"))), - new EgressEndpoint().withCategory("ucnulgmnh") - .withEndpoints(Arrays.asList(new EndpointDependency().withDomainName("vdyznf"), - new EndpointDependency().withDomainName("jsvkskmqozzkivy"))))) - .withEnableDefaultEgressEndpoints(CloudServicesNetworkEnableDefaultEgressEndpoints.FALSE) - .withStorageOptions( - new CloudServicesNetworkStorageOptions().withMode(CloudServicesNetworkStorageMode.STANDARD) - .withSizeMiB(8485618719618232113L) - .withStorageApplianceId("jqu")) - .withIfMatch("gybpmfb") - .withIfNoneMatch("ununm") + new EgressEndpoint().withCategory("tyvkunmignohi") + .withEndpoints(Arrays.asList(new EndpointDependency().withDomainName("gqogjwpindedva"), + new EndpointDependency().withDomainName("bxbhmedeilbj"))), + new EgressEndpoint().withCategory("wfcfxzirzz") + .withEndpoints(Arrays.asList(new EndpointDependency().withDomainName("vwypusuvjsl"), + new EndpointDependency().withDomainName("zwci"))), + new EgressEndpoint().withCategory("djsllfr") + .withEndpoints(Arrays.asList(new EndpointDependency().withDomainName("dmvxadq"), + new EndpointDependency().withDomainName("cfrgnawbabgfbkt"), + new EndpointDependency().withDomainName("jmfczlfsyqkf"))), + new EgressEndpoint().withCategory("bzgowoxqmje") + .withEndpoints(Arrays.asList(new EndpointDependency().withDomainName("cxn"))))) + .withEnableDefaultEgressEndpoints(CloudServicesNetworkEnableDefaultEgressEndpoints.TRUE) + .withStorageOptions(new CloudServicesNetworkStorageOptions().withMode(CloudServicesNetworkStorageMode.NONE) + .withSizeMiB(2336775625074082692L) + .withStorageApplianceId("xisimjceagbj")) + .withIfMatch("pnx") + .withIfNoneMatch("dvwnjkgvfnmxa") .create(); - Assertions.assertEquals("jclykcg", response.location()); - Assertions.assertEquals("pjlvczuoda", response.tags().get("punettepdjxq")); - Assertions.assertEquals("vfictnkjjwgcwn", response.extendedLocation().name()); - Assertions.assertEquals("hbkgfyrt", response.extendedLocation().type()); - Assertions.assertEquals("mjpjscdfpdqwty", response.additionalEgressEndpoints().get(0).category()); - Assertions.assertEquals("vgwmseharxifvqnr", - response.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); - Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.FALSE, + Assertions.assertEquals("dyjqu", response.location()); + Assertions.assertEquals("crraueekcsu", response.tags().get("h")); + Assertions.assertEquals("iwr", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, response.extendedLocation().type()); + Assertions.assertEquals("ftibtyibuyvpirfq", response.additionalEgressEndpoints().get(0).category()); + Assertions.assertEquals("n", response.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); + Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.TRUE, response.enableDefaultEgressEndpoints()); - Assertions.assertEquals(CloudServicesNetworkStorageMode.STANDARD, response.storageOptions().mode()); - Assertions.assertEquals(6103361317261537773L, response.storageOptions().sizeMiB()); - Assertions.assertEquals("kwmuqqo", response.storageOptions().storageApplianceId()); + Assertions.assertEquals(CloudServicesNetworkStorageMode.NONE, response.storageOptions().mode()); + Assertions.assertEquals(4616192168130446276L, response.storageOptions().sizeMiB()); + Assertions.assertEquals("nrexkxbhxv", response.storageOptions().storageApplianceId()); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksGetByResourceGroupWithResponseMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksGetByResourceGroupWithResponseMockTests.java index c097f6a3a037..a28e283082b8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksGetByResourceGroupWithResponseMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksGetByResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,6 +13,7 @@ import com.azure.resourcemanager.networkcloud.models.CloudServicesNetwork; import com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkEnableDefaultEgressEndpoints; import com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkStorageMode; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -23,7 +24,7 @@ public final class CloudServicesNetworksGetByResourceGroupWithResponseMockTests @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"etag\":\"akeciqchx\",\"extendedLocation\":{\"name\":\"tuicds\",\"type\":\"wdfmmpzhzzwvywr\"},\"properties\":{\"additionalEgressEndpoints\":[{\"category\":\"ydg\",\"endpoints\":[{\"domainName\":\"x\"},{\"domainName\":\"cakiqao\"},{\"domainName\":\"djrkclamggl\"}]},{\"category\":\"lmf\",\"endpoints\":[{\"domainName\":\"doqey\"}]},{\"category\":\"gltygxhqfgq\",\"endpoints\":[{\"domainName\":\"yejsxtlg\"},{\"domainName\":\"lwfgziiu\"},{\"domainName\":\"ijjcea\"},{\"domainName\":\"lijjjrtvam\"}]},{\"category\":\"a\",\"endpoints\":[{\"domainName\":\"knxkvccxetyvkunm\"},{\"domainName\":\"gno\"}]}],\"associatedResourceIds\":[\"kgqogjw\"],\"clusterId\":\"nd\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"bbxbhmed\",\"enableDefaultEgressEndpoints\":\"False\",\"enabledEgressEndpoints\":[{\"category\":\"ywfcfxzi\",\"endpoints\":[{\"domainName\":\"zi\"},{\"domainName\":\"vwypusuvjsl\"}]},{\"category\":\"zwci\",\"endpoints\":[{\"domainName\":\"jsllfryvd\"},{\"domainName\":\"vxadqacfrgnawbab\"}]},{\"category\":\"fbktyjmfczlf\",\"endpoints\":[{\"domainName\":\"qkfrbzgowoxqmj\"}]},{\"category\":\"ajcxnyqgxhl\",\"endpoints\":[{\"domainName\":\"rvxisimjceagbj\"}]}],\"hybridAksClustersAssociatedIds\":[\"sumywzashxgonoyj\",\"qipubyz\",\"clkfkee\"],\"interfaceName\":\"vop\",\"provisioningState\":\"Failed\",\"storageOptions\":{\"mode\":\"Standard\",\"sizeMiB\":2974364031880146374,\"storageApplianceId\":\"egqavnigflqqb\"},\"storageStatus\":{\"mode\":\"Standard\",\"sizeMiB\":3519392073349740781,\"status\":\"ExpansionFailed\",\"statusMessage\":\"fvabmvmsxba\",\"volumeId\":\"wjcnkottl\"},\"virtualMachinesAssociatedIds\":[\"vajmailfem\",\"jzakzwjiqull\",\"xbdmvrscmqernd\",\"rnyeofltfnnxrk\"]},\"location\":\"jfynnfmuiiirip\",\"tags\":{\"bcbrwjiutgnjizbe\":\"ykfkx\",\"juyrsrziuctixg\":\"woiymrvz\"},\"id\":\"d\",\"name\":\"uifr\",\"type\":\"vka\"}"; + = "{\"properties\":{\"additionalEgressEndpoints\":[{\"category\":\"wjjufwbe\",\"endpoints\":[{\"domainName\":\"k\"},{\"domainName\":\"orhtss\"}]}],\"enableDefaultEgressEndpoints\":\"False\",\"storageOptions\":{\"mode\":\"Standard\",\"sizeMiB\":8499998021447046395,\"storageApplianceId\":\"c\"},\"associatedResourceIds\":[\"tiq\"],\"clusterId\":\"bqerzwx\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"tdgukvlbp\",\"enabledEgressEndpoints\":[{\"category\":\"dstyouam\",\"endpoints\":[{\"domainName\":\"wreswmowegm\"},{\"domainName\":\"uteyxeyguq\"}]},{\"category\":\"gijiitnspxlzd\",\"endpoints\":[{\"domainName\":\"ygr\"},{\"domainName\":\"jwaiuf\"}]},{\"category\":\"n\",\"endpoints\":[{\"domainName\":\"ybfueqfrojsydgr\"},{\"domainName\":\"ydkygywezskieca\"}]}],\"hybridAksClustersAssociatedIds\":[\"zmxieqvdsmaklix\",\"cahyhx\"],\"interfaceName\":\"ybxawoijpodtblx\",\"storageStatus\":{\"mode\":\"Standard\",\"sizeMiB\":7775527212679978118,\"status\":\"ExpansionFailed\",\"statusMessage\":\"hykinc\",\"volumeId\":\"emehllizh\"},\"virtualMachinesAssociatedIds\":[\"moqodka\",\"ppyi\",\"ngqladywrx\"],\"provisioningState\":\"Failed\"},\"etag\":\"tlu\",\"extendedLocation\":{\"name\":\"vadswzs\",\"type\":\"EdgeZone\"},\"location\":\"emlowuowhl\",\"tags\":{\"lgmokzkl\":\"wyrmouv\",\"vjdrqcrjidhftuk\":\"rfowtdvrfmvlih\"},\"id\":\"hdxlw\",\"name\":\"ojbf\",\"type\":\"zd\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,19 +34,19 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CloudServicesNetwork response = manager.cloudServicesNetworks() - .getByResourceGroupWithResponse("a", "dmkxwxdcvjwcy", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("enwphpzfngq", "clid", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("jfynnfmuiiirip", response.location()); - Assertions.assertEquals("ykfkx", response.tags().get("bcbrwjiutgnjizbe")); - Assertions.assertEquals("tuicds", response.extendedLocation().name()); - Assertions.assertEquals("wdfmmpzhzzwvywr", response.extendedLocation().type()); - Assertions.assertEquals("ydg", response.additionalEgressEndpoints().get(0).category()); - Assertions.assertEquals("x", response.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); + Assertions.assertEquals("emlowuowhl", response.location()); + Assertions.assertEquals("wyrmouv", response.tags().get("lgmokzkl")); + Assertions.assertEquals("vadswzs", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, response.extendedLocation().type()); + Assertions.assertEquals("wjjufwbe", response.additionalEgressEndpoints().get(0).category()); + Assertions.assertEquals("k", response.additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.FALSE, response.enableDefaultEgressEndpoints()); Assertions.assertEquals(CloudServicesNetworkStorageMode.STANDARD, response.storageOptions().mode()); - Assertions.assertEquals(2974364031880146374L, response.storageOptions().sizeMiB()); - Assertions.assertEquals("egqavnigflqqb", response.storageOptions().storageApplianceId()); + Assertions.assertEquals(8499998021447046395L, response.storageOptions().sizeMiB()); + Assertions.assertEquals("c", response.storageOptions().storageApplianceId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListByResourceGroupMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListByResourceGroupMockTests.java index cfaf50019610..9e9f0f5c575f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListByResourceGroupMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListByResourceGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,6 +14,7 @@ import com.azure.resourcemanager.networkcloud.models.CloudServicesNetwork; import com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkEnableDefaultEgressEndpoints; import com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkStorageMode; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -24,7 +25,7 @@ public final class CloudServicesNetworksListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"qxutrpbrruyuua\",\"extendedLocation\":{\"name\":\"vlm\",\"type\":\"jwcolbm\"},\"properties\":{\"additionalEgressEndpoints\":[{\"category\":\"w\",\"endpoints\":[{\"domainName\":\"cpahprzrvxhm\"},{\"domainName\":\"fhocnxzcmj\"},{\"domainName\":\"ngxno\"},{\"domainName\":\"rxtd\"}]},{\"category\":\"sn\",\"endpoints\":[{\"domainName\":\"vhdl\"},{\"domainName\":\"ydidwhepfwwtjf\"},{\"domainName\":\"o\"}]},{\"category\":\"sxxh\",\"endpoints\":[{\"domainName\":\"cdbcky\"},{\"domainName\":\"ikxkxhneg\"},{\"domainName\":\"njzrbhtmeplvu\"}]}],\"associatedResourceIds\":[\"brlbpgs\"],\"clusterId\":\"agnchjhgemuowaky\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"jymxcgqt\",\"enableDefaultEgressEndpoints\":\"False\",\"enabledEgressEndpoints\":[{\"category\":\"lss\",\"endpoints\":[{\"domainName\":\"jomevtfycnlb\"},{\"domainName\":\"gjco\"}]},{\"category\":\"kk\",\"endpoints\":[{\"domainName\":\"iiy\"}]},{\"category\":\"s\",\"endpoints\":[{\"domainName\":\"k\"},{\"domainName\":\"z\"}]},{\"category\":\"cufqbvntnrgmqs\",\"endpoints\":[{\"domainName\":\"hcekxgnlykm\"},{\"domainName\":\"cpwzv\"},{\"domainName\":\"doksqdtiwlwxlbon\"}]}],\"hybridAksClustersAssociatedIds\":[\"azqicqchygtv\",\"byjanep\",\"bdpkxyqvgx\",\"aodetv\"],\"interfaceName\":\"kxdxuwsaifmcwn\",\"provisioningState\":\"Provisioning\",\"storageOptions\":{\"mode\":\"Standard\",\"sizeMiB\":3424480603711325552,\"storageApplianceId\":\"kb\"},\"storageStatus\":{\"mode\":\"Standard\",\"sizeMiB\":3241777548630283263,\"status\":\"ExpansionFailed\",\"statusMessage\":\"xpvelszerqzevxo\",\"volumeId\":\"intxwa\"},\"virtualMachinesAssociatedIds\":[\"lzoblqwaafr\",\"ulhmzyq\",\"hdvafjrqpjiyrqjc\"]},\"location\":\"a\",\"tags\":{\"dfkbnrzorpdltbq\":\"z\",\"zdgvpyigdaqqilz\":\"tqjfgxxsaet\"},\"id\":\"cduwjoedx\",\"name\":\"gucaif\",\"type\":\"aurwwgilfjq\"}]}"; + = "{\"value\":[{\"properties\":{\"additionalEgressEndpoints\":[{\"category\":\"qjrhuzgfxonj\",\"endpoints\":[{\"domainName\":\"usllywpvtiotz\"},{\"domainName\":\"pdbollg\"},{\"domainName\":\"yfqiuasig\"}]}],\"enableDefaultEgressEndpoints\":\"False\",\"storageOptions\":{\"mode\":\"None\",\"sizeMiB\":7221394007503576264,\"storageApplianceId\":\"ygdjboqgrmtqjk\"},\"associatedResourceIds\":[\"adrmmwiuawvcmjzk\",\"iidisczskoswoqiq\"],\"clusterId\":\"ugam\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"rcoiis\",\"enabledEgressEndpoints\":[{\"category\":\"nppcce\",\"endpoints\":[{\"domainName\":\"ztdsbeza\"}]},{\"category\":\"yfukzxuizhyhnepk\",\"endpoints\":[{\"domainName\":\"tiarxqiubxduk\"},{\"domainName\":\"cpxdazvd\"},{\"domainName\":\"ctmmkoszudbl\"},{\"domainName\":\"s\"}]},{\"category\":\"trpc\",\"endpoints\":[{\"domainName\":\"kiofkbt\"}]}],\"hybridAksClustersAssociatedIds\":[\"kl\",\"nldpvcbhhezyquwu\",\"qxutrpbrruyuua\"],\"interfaceName\":\"lmbjwcolbmxlbnw\",\"storageStatus\":{\"mode\":\"None\",\"sizeMiB\":5028307162354182982,\"status\":\"Repairing\",\"statusMessage\":\"vxhmtfhocnxzcmj\",\"volumeId\":\"gxnoqrxtdis\"},\"virtualMachinesAssociatedIds\":[\"vhdl\",\"ydidwhepfwwtjf\",\"o\"],\"provisioningState\":\"Succeeded\"},\"etag\":\"hmwcdbck\",\"extendedLocation\":{\"name\":\"oikxkxhnegk\",\"type\":\"CustomLocation\"},\"location\":\"rbhtmeplvukaobr\",\"tags\":{\"emuowakyw\":\"gsnbagnchjh\"},\"id\":\"lhjym\",\"name\":\"cgqtag\",\"type\":\"rclsso\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,20 +35,22 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.cloudServicesNetworks() - .listByResourceGroup("vcb", 689855206, "ezyquw", com.azure.core.util.Context.NONE); + .listByResourceGroup("fnjyix", 539593043, "fratqxmbjroumzz", com.azure.core.util.Context.NONE); - Assertions.assertEquals("a", response.iterator().next().location()); - Assertions.assertEquals("z", response.iterator().next().tags().get("dfkbnrzorpdltbq")); - Assertions.assertEquals("vlm", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("jwcolbm", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("w", response.iterator().next().additionalEgressEndpoints().get(0).category()); - Assertions.assertEquals("cpahprzrvxhm", + Assertions.assertEquals("rbhtmeplvukaobr", response.iterator().next().location()); + Assertions.assertEquals("gsnbagnchjh", response.iterator().next().tags().get("emuowakyw")); + Assertions.assertEquals("oikxkxhnegk", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, + response.iterator().next().extendedLocation().type()); + Assertions.assertEquals("qjrhuzgfxonj", + response.iterator().next().additionalEgressEndpoints().get(0).category()); + Assertions.assertEquals("usllywpvtiotz", response.iterator().next().additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.FALSE, response.iterator().next().enableDefaultEgressEndpoints()); - Assertions.assertEquals(CloudServicesNetworkStorageMode.STANDARD, + Assertions.assertEquals(CloudServicesNetworkStorageMode.NONE, response.iterator().next().storageOptions().mode()); - Assertions.assertEquals(3424480603711325552L, response.iterator().next().storageOptions().sizeMiB()); - Assertions.assertEquals("kb", response.iterator().next().storageOptions().storageApplianceId()); + Assertions.assertEquals(7221394007503576264L, response.iterator().next().storageOptions().sizeMiB()); + Assertions.assertEquals("ygdjboqgrmtqjk", response.iterator().next().storageOptions().storageApplianceId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListMockTests.java index 43ac59f2c2da..cc4dda921237 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CloudServicesNetworksListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,6 +14,7 @@ import com.azure.resourcemanager.networkcloud.models.CloudServicesNetwork; import com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkEnableDefaultEgressEndpoints; import com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkStorageMode; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -24,7 +25,7 @@ public final class CloudServicesNetworksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"hyhxa\",\"extendedLocation\":{\"name\":\"ybxawoijpodtblx\",\"type\":\"kkwjdjodq\"},\"properties\":{\"additionalEgressEndpoints\":[{\"category\":\"ncn\",\"endpoints\":[{\"domainName\":\"mehllizhceu\"},{\"domainName\":\"oqodkadpp\"},{\"domainName\":\"ibngqladyw\"}]},{\"category\":\"xwhydtluvv\",\"endpoints\":[{\"domainName\":\"swzsnuyemlowuo\"}]}],\"associatedResourceIds\":[\"xlnwyrmouvblgmo\",\"zkltrfowtdvrfmv\",\"ih\"],\"clusterId\":\"jdrqcrjidhftu\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"xlwyoj\",\"enableDefaultEgressEndpoints\":\"True\",\"enabledEgressEndpoints\":[{\"category\":\"kfnjyixhafrat\",\"endpoints\":[{\"domainName\":\"mbjrou\"},{\"domainName\":\"zznval\"}]}],\"hybridAksClustersAssociatedIds\":[\"huzgfxo\",\"jtpusllywpvtiotz\",\"pdbollg\",\"yfqiuasig\"],\"interfaceName\":\"wsocnequygdjbo\",\"provisioningState\":\"Provisioning\",\"storageOptions\":{\"mode\":\"Standard\",\"sizeMiB\":1549338402690522493,\"storageApplianceId\":\"vadrmm\"},\"storageStatus\":{\"mode\":\"Standard\",\"sizeMiB\":8356210374499862798,\"status\":\"Available\",\"statusMessage\":\"kxiidisczskoswo\",\"volumeId\":\"qazu\"},\"virtualMachinesAssociatedIds\":[\"xzkrrcoi\",\"sbamnppcc\"]},\"location\":\"u\",\"tags\":{\"hnepkpeti\":\"sbezaxyfukzxuizh\",\"iubxdukec\":\"rx\",\"hctmmkosz\":\"xdazv\"},\"id\":\"dblnsntrp\",\"name\":\"aqkiofkb\",\"type\":\"fmhklbnld\"}]}"; + = "{\"value\":[{\"properties\":{\"additionalEgressEndpoints\":[{\"category\":\"jcodkkgjiiytssi\",\"endpoints\":[{\"domainName\":\"z\"},{\"domainName\":\"cufqbvntnrgmqs\"},{\"domainName\":\"rhcekxgnly\"},{\"domainName\":\"mxcpwzvmdoks\"}]}],\"enableDefaultEgressEndpoints\":\"False\",\"storageOptions\":{\"mode\":\"Standard\",\"sizeMiB\":6420721020164105387,\"storageApplianceId\":\"oncqbazqicqch\"},\"associatedResourceIds\":[\"v\"],\"clusterId\":\"yjanepubdp\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"vgxiaodetvo\",\"enabledEgressEndpoints\":[{\"category\":\"dxuwsaifm\",\"endpoints\":[{\"domainName\":\"nosbz\"},{\"domainName\":\"ehgcvkbcknjo\"},{\"domainName\":\"gjyy\"},{\"domainName\":\"pvelszerqze\"}]},{\"category\":\"xoqeintxwalj\",\"endpoints\":[{\"domainName\":\"zoblq\"},{\"domainName\":\"aafrqulhmzyqbhd\"},{\"domainName\":\"afjrqpjiyrqjcrg\"}]},{\"category\":\"xwmzwdfkbnrz\",\"endpoints\":[{\"domainName\":\"pdltbq\"},{\"domainName\":\"tqjfgxxsaet\"}]}],\"hybridAksClustersAssociatedIds\":[\"gvpyigdaqqilzdc\",\"uwjoedxnguca\"],\"interfaceName\":\"pa\",\"storageStatus\":{\"mode\":\"Standard\",\"sizeMiB\":2398801133957052928,\"status\":\"ExpandingVolume\",\"statusMessage\":\"qacdmkxwxdcvjwcy\",\"volumeId\":\"akeciqchx\"},\"virtualMachinesAssociatedIds\":[\"icdsiwd\",\"m\",\"p\",\"hzzwvywrgyngy\"],\"provisioningState\":\"Accepted\"},\"etag\":\"x\",\"extendedLocation\":{\"name\":\"cakiqao\",\"type\":\"CustomLocation\"},\"location\":\"rkclamg\",\"tags\":{\"jdoq\":\"lmf\",\"gxhqfgqkayejs\":\"ykglt\"},\"id\":\"tlgflwfgz\",\"name\":\"iucijjcea\",\"type\":\"lijjjrtvam\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,20 +35,22 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.cloudServicesNetworks().list(351715944, "vdsmaklixq", com.azure.core.util.Context.NONE); + = manager.cloudServicesNetworks().list(844543958, "omevtfycn", com.azure.core.util.Context.NONE); - Assertions.assertEquals("u", response.iterator().next().location()); - Assertions.assertEquals("sbezaxyfukzxuizh", response.iterator().next().tags().get("hnepkpeti")); - Assertions.assertEquals("ybxawoijpodtblx", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("kkwjdjodq", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("ncn", response.iterator().next().additionalEgressEndpoints().get(0).category()); - Assertions.assertEquals("mehllizhceu", + Assertions.assertEquals("rkclamg", response.iterator().next().location()); + Assertions.assertEquals("lmf", response.iterator().next().tags().get("jdoq")); + Assertions.assertEquals("cakiqao", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, + response.iterator().next().extendedLocation().type()); + Assertions.assertEquals("jcodkkgjiiytssi", + response.iterator().next().additionalEgressEndpoints().get(0).category()); + Assertions.assertEquals("z", response.iterator().next().additionalEgressEndpoints().get(0).endpoints().get(0).domainName()); - Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.TRUE, + Assertions.assertEquals(CloudServicesNetworkEnableDefaultEgressEndpoints.FALSE, response.iterator().next().enableDefaultEgressEndpoints()); Assertions.assertEquals(CloudServicesNetworkStorageMode.STANDARD, response.iterator().next().storageOptions().mode()); - Assertions.assertEquals(1549338402690522493L, response.iterator().next().storageOptions().sizeMiB()); - Assertions.assertEquals("vadrmm", response.iterator().next().storageOptions().storageApplianceId()); + Assertions.assertEquals(6420721020164105387L, response.iterator().next().storageOptions().sizeMiB()); + Assertions.assertEquals("oncqbazqicqch", response.iterator().next().storageOptions().storageApplianceId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterAvailableUpgradeVersionTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterAvailableUpgradeVersionTests.java index 3ab34ecc6a84..8dff1dd02732 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterAvailableUpgradeVersionTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterAvailableUpgradeVersionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class ClusterAvailableUpgradeVersionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterAvailableUpgradeVersion model = BinaryData.fromString( - "{\"controlImpact\":\"False\",\"expectedDuration\":\"qwcsdbnwdcfhuc\",\"impactDescription\":\"pfuvglsbjjca\",\"supportExpiryDate\":\"xbvtvudu\",\"targetClusterVersion\":\"cormr\",\"workloadImpact\":\"False\"}") + "{\"controlImpact\":\"False\",\"expectedDuration\":\"bizikayuhq\",\"impactDescription\":\"jbsybbqw\",\"supportExpiryDate\":\"t\",\"targetClusterVersion\":\"gmfpgvmp\",\"workloadImpact\":\"True\"}") .toObject(ClusterAvailableUpgradeVersion.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAvailableUpgradeVersion model = new ClusterAvailableUpgradeVersion(); - model = BinaryData.fromObject(model).toObject(ClusterAvailableUpgradeVersion.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterAvailableVersionTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterAvailableVersionTests.java index 48e8d3a9957c..d4cef3d6cdf6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterAvailableVersionTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterAvailableVersionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -10,14 +10,8 @@ public final class ClusterAvailableVersionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ClusterAvailableVersion model - = BinaryData.fromString("{\"supportExpiryDate\":\"ywsuwsy\",\"targetClusterVersion\":\"ndsytgadg\"}") - .toObject(ClusterAvailableVersion.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAvailableVersion model = new ClusterAvailableVersion(); - model = BinaryData.fromObject(model).toObject(ClusterAvailableVersion.class); + ClusterAvailableVersion model = BinaryData + .fromString("{\"supportExpiryDate\":\"gjltdtbnnhado\",\"targetClusterVersion\":\"rkvcikhnvpa\"}") + .toObject(ClusterAvailableVersion.class); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterCapacityTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterCapacityTests.java index a18c93857940..a7820c0a50d8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterCapacityTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterCapacityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,36 +12,15 @@ public final class ClusterCapacityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterCapacity model = BinaryData.fromString( - "{\"availableApplianceStorageGB\":8394550494358137871,\"availableCoreCount\":3241697141108746890,\"availableHostStorageGB\":1145950628020920111,\"availableMemoryGB\":8816145000808176457,\"totalApplianceStorageGB\":1135305711029815277,\"totalCoreCount\":1267263221635298895,\"totalHostStorageGB\":2632587708988993515,\"totalMemoryGB\":4185910785735665912}") + "{\"availableApplianceStorageGB\":4296644221535118167,\"availableCoreCount\":6457618834128738796,\"availableHostStorageGB\":768699206851816710,\"availableMemoryGB\":1719080951832586604,\"totalApplianceStorageGB\":5146168087971383539,\"totalCoreCount\":7650102264601836563,\"totalHostStorageGB\":916338777908991753,\"totalMemoryGB\":354803960712615163}") .toObject(ClusterCapacity.class); - Assertions.assertEquals(8394550494358137871L, model.availableApplianceStorageGB()); - Assertions.assertEquals(3241697141108746890L, model.availableCoreCount()); - Assertions.assertEquals(1145950628020920111L, model.availableHostStorageGB()); - Assertions.assertEquals(8816145000808176457L, model.availableMemoryGB()); - Assertions.assertEquals(1135305711029815277L, model.totalApplianceStorageGB()); - Assertions.assertEquals(1267263221635298895L, model.totalCoreCount()); - Assertions.assertEquals(2632587708988993515L, model.totalHostStorageGB()); - Assertions.assertEquals(4185910785735665912L, model.totalMemoryGB()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterCapacity model = new ClusterCapacity().withAvailableApplianceStorageGB(8394550494358137871L) - .withAvailableCoreCount(3241697141108746890L) - .withAvailableHostStorageGB(1145950628020920111L) - .withAvailableMemoryGB(8816145000808176457L) - .withTotalApplianceStorageGB(1135305711029815277L) - .withTotalCoreCount(1267263221635298895L) - .withTotalHostStorageGB(2632587708988993515L) - .withTotalMemoryGB(4185910785735665912L); - model = BinaryData.fromObject(model).toObject(ClusterCapacity.class); - Assertions.assertEquals(8394550494358137871L, model.availableApplianceStorageGB()); - Assertions.assertEquals(3241697141108746890L, model.availableCoreCount()); - Assertions.assertEquals(1145950628020920111L, model.availableHostStorageGB()); - Assertions.assertEquals(8816145000808176457L, model.availableMemoryGB()); - Assertions.assertEquals(1135305711029815277L, model.totalApplianceStorageGB()); - Assertions.assertEquals(1267263221635298895L, model.totalCoreCount()); - Assertions.assertEquals(2632587708988993515L, model.totalHostStorageGB()); - Assertions.assertEquals(4185910785735665912L, model.totalMemoryGB()); + Assertions.assertEquals(4296644221535118167L, model.availableApplianceStorageGB()); + Assertions.assertEquals(6457618834128738796L, model.availableCoreCount()); + Assertions.assertEquals(768699206851816710L, model.availableHostStorageGB()); + Assertions.assertEquals(1719080951832586604L, model.availableMemoryGB()); + Assertions.assertEquals(5146168087971383539L, model.totalApplianceStorageGB()); + Assertions.assertEquals(7650102264601836563L, model.totalCoreCount()); + Assertions.assertEquals(916338777908991753L, model.totalHostStorageGB()); + Assertions.assertEquals(354803960712615163L, model.totalMemoryGB()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterContinueUpdateVersionParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterContinueUpdateVersionParametersTests.java index e1037066f9e3..7e38115413c6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterContinueUpdateVersionParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterContinueUpdateVersionParametersTests.java @@ -1,30 +1,34 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.networkcloud.models.ClusterContinueUpdateVersionMachineGroupTargetingMode; import com.azure.resourcemanager.networkcloud.models.ClusterContinueUpdateVersionParameters; +import com.azure.resourcemanager.networkcloud.models.ClusterContinueUpdateVersionSafeguardMode; import org.junit.jupiter.api.Assertions; public final class ClusterContinueUpdateVersionParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterContinueUpdateVersionParameters model - = BinaryData.fromString("{\"machineGroupTargetingMode\":\"AlphaByRack\"}") + = BinaryData.fromString("{\"machineGroupTargetingMode\":\"AlphaByRack\",\"safeguardMode\":\"None\"}") .toObject(ClusterContinueUpdateVersionParameters.class); Assertions.assertEquals(ClusterContinueUpdateVersionMachineGroupTargetingMode.ALPHA_BY_RACK, model.machineGroupTargetingMode()); + Assertions.assertEquals(ClusterContinueUpdateVersionSafeguardMode.NONE, model.safeguardMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ClusterContinueUpdateVersionParameters model = new ClusterContinueUpdateVersionParameters() - .withMachineGroupTargetingMode(ClusterContinueUpdateVersionMachineGroupTargetingMode.ALPHA_BY_RACK); + .withMachineGroupTargetingMode(ClusterContinueUpdateVersionMachineGroupTargetingMode.ALPHA_BY_RACK) + .withSafeguardMode(ClusterContinueUpdateVersionSafeguardMode.NONE); model = BinaryData.fromObject(model).toObject(ClusterContinueUpdateVersionParameters.class); Assertions.assertEquals(ClusterContinueUpdateVersionMachineGroupTargetingMode.ALPHA_BY_RACK, model.machineGroupTargetingMode()); + Assertions.assertEquals(ClusterContinueUpdateVersionSafeguardMode.NONE, model.safeguardMode()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterDeployParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterDeployParametersTests.java index 56ff088ff56f..9167ccfe360d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterDeployParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterDeployParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,17 +12,17 @@ public final class ClusterDeployParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ClusterDeployParameters model = BinaryData - .fromString("{\"skipValidationsForMachines\":[\"qpqojxcxzrzd\",\"gdzbenr\",\"bcawetz\",\"ddtjwfljhznam\"]}") - .toObject(ClusterDeployParameters.class); - Assertions.assertEquals("qpqojxcxzrzd", model.skipValidationsForMachines().get(0)); + ClusterDeployParameters model + = BinaryData.fromString("{\"skipValidationsForMachines\":[\"vrhmzk\",\"pjgwwspug\",\"ftqsxhqxujxuk\"]}") + .toObject(ClusterDeployParameters.class); + Assertions.assertEquals("vrhmzk", model.skipValidationsForMachines().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ClusterDeployParameters model = new ClusterDeployParameters() - .withSkipValidationsForMachines(Arrays.asList("qpqojxcxzrzd", "gdzbenr", "bcawetz", "ddtjwfljhznam")); + .withSkipValidationsForMachines(Arrays.asList("vrhmzk", "pjgwwspug", "ftqsxhqxujxuk")); model = BinaryData.fromObject(model).toObject(ClusterDeployParameters.class); - Assertions.assertEquals("qpqojxcxzrzd", model.skipValidationsForMachines().get(0)); + Assertions.assertEquals("vrhmzk", model.skipValidationsForMachines().get(0)); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterInspectParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterInspectParametersTests.java new file mode 100644 index 000000000000..6631bf8c580c --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterInspectParametersTests.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.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.models.ClusterInspectAdditionalAction; +import com.azure.resourcemanager.networkcloud.models.ClusterInspectParameters; +import com.azure.resourcemanager.networkcloud.models.FilterDevices; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ClusterInspectParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ClusterInspectParameters model = BinaryData.fromString( + "{\"additionalActions\":[\"ResetHardware\",\"ResetHardware\"],\"filterDevices\":{\"bareMetalMachineNames\":[\"guufzd\",\"syqtfi\"],\"rackNames\":[\"botzingamvppho\",\"zqzudph\",\"amvdkfwynwcvtbv\",\"ayhmtnvyqiatkz\"]}}") + .toObject(ClusterInspectParameters.class); + Assertions.assertEquals(ClusterInspectAdditionalAction.RESET_HARDWARE, model.additionalActions().get(0)); + Assertions.assertEquals("guufzd", model.filterDevices().bareMetalMachineNames().get(0)); + Assertions.assertEquals("botzingamvppho", model.filterDevices().rackNames().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ClusterInspectParameters model = new ClusterInspectParameters() + .withAdditionalActions(Arrays.asList(ClusterInspectAdditionalAction.RESET_HARDWARE, + ClusterInspectAdditionalAction.RESET_HARDWARE)) + .withFilterDevices(new FilterDevices().withBareMetalMachineNames(Arrays.asList("guufzd", "syqtfi")) + .withRackNames(Arrays.asList("botzingamvppho", "zqzudph", "amvdkfwynwcvtbv", "ayhmtnvyqiatkz"))); + model = BinaryData.fromObject(model).toObject(ClusterInspectParameters.class); + Assertions.assertEquals(ClusterInspectAdditionalAction.RESET_HARDWARE, model.additionalActions().get(0)); + Assertions.assertEquals("guufzd", model.filterDevices().bareMetalMachineNames().get(0)); + Assertions.assertEquals("botzingamvppho", model.filterDevices().rackNames().get(0)); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerInnerTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerInnerTests.java index 9fa963453214..6223cbf6c6ed 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerInnerTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerInnerTests.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.networkcloud.fluent.models.ClusterManagerInner; +import com.azure.resourcemanager.networkcloud.models.DeploymentType; import com.azure.resourcemanager.networkcloud.models.ManagedResourceGroupConfiguration; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentity; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentityType; @@ -19,42 +20,45 @@ public final class ClusterManagerInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterManagerInner model = BinaryData.fromString( - "{\"etag\":\"dmhdlxyjr\",\"identity\":{\"principalId\":\"336d209f-33d0-4c8f-b546-973d0a4bd9ae\",\"tenantId\":\"c955d6f2-a4c1-4201-942d-c7c6d9c56e9e\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"hgw\":{\"principalId\":\"c80e4133-0e19-48ee-ba2d-61052c1f51c7\",\"clientId\":\"203a8fb5-5d65-4b92-a81c-62dd718f8285\"},\"nedgfbc\":{\"principalId\":\"f353d525-4348-42d5-bd02-e05f05b4f470\",\"clientId\":\"35438b58-665d-4fe8-b6d4-eb9cbc0ff976\"},\"vq\":{\"principalId\":\"e4c6854a-031a-487c-82c4-b688bb029210\",\"clientId\":\"822e6098-b6d7-4bde-af39-131f22f2286c\"},\"eqdcv\":{\"principalId\":\"472c6b35-3812-4928-b34b-c7188ca188bf\",\"clientId\":\"f9fc7cda-9642-4a91-8542-5ea42304baba\"}}},\"properties\":{\"analyticsWorkspaceId\":\"hvoodsotbobzd\",\"availabilityZones\":[\"j\",\"vnhdldwmgxcxr\"],\"clusterVersions\":[{\"supportExpiryDate\":\"utwu\",\"targetClusterVersion\":\"grpkhjwniyqs\"},{\"supportExpiryDate\":\"i\",\"targetClusterVersion\":\"dggkzzlvmbmpa\"}],\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"fv\",\"fabricControllerId\":\"efyw\",\"managedResourceGroupConfiguration\":{\"location\":\"fvmwy\",\"name\":\"fouyf\"},\"managerExtendedLocation\":{\"name\":\"akcp\",\"type\":\"iyzvqtmnub\"},\"provisioningState\":\"Failed\",\"vmSize\":\"zksmondj\"},\"location\":\"uxvypomgkopkwh\",\"tags\":{\"cmbqfqvmk\":\"pajqgxysm\"},\"id\":\"xozap\",\"name\":\"helxprglya\",\"type\":\"dd\"}") + "{\"properties\":{\"analyticsWorkspaceId\":\"gx\",\"availabilityZones\":[\"slpmutwuo\",\"grpkhjwniyqs\",\"uicpd\"],\"clusterVersions\":[{\"supportExpiryDate\":\"zl\",\"targetClusterVersion\":\"bmpaxmodfvu\"},{\"supportExpiryDate\":\"yw\",\"targetClusterVersion\":\"pfvmwyhrfou\"},{\"supportExpiryDate\":\"taakc\",\"targetClusterVersion\":\"iyzvqtmnub\"},{\"supportExpiryDate\":\"kpzksmondjmq\",\"targetClusterVersion\":\"vypomgkopkwho\"}],\"detailedStatus\":\"ProvisioningFailed\",\"detailedStatusMessage\":\"jqg\",\"fabricControllerId\":\"ysmocmbqfqvmkcxo\",\"managedResourceGroupConfiguration\":{\"location\":\"vhelxprglyatdd\",\"name\":\"cbcuejrjxgciqi\"},\"managerExtendedLocation\":{\"name\":\"hos\",\"type\":\"CustomLocation\"},\"provisioningState\":\"Failed\",\"relayConfiguration\":{\"relayNamespaceId\":\"zoymibmrqyibahw\"},\"vmSize\":\"uszdtmhrkwof\"},\"etag\":\"voqacpiexpbt\",\"identity\":{\"principalId\":\"bwoenwashrt\",\"tenantId\":\"kcnqxwbpo\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"byuqerpqlp\":{\"principalId\":\"ujw\",\"clientId\":\"sipqii\"}}},\"kind\":\"AzureLocal\",\"location\":\"iuqgbdbutauv\",\"tags\":{\"hykojoxafnndlpic\":\"kuwhh\",\"h\":\"koymkcd\",\"reqnovvqfov\":\"pkkpw\",\"rsndsytgadgvra\":\"jxywsuws\"},\"id\":\"aeneqnzarrwl\",\"name\":\"uu\",\"type\":\"jfqka\"}") .toObject(ClusterManagerInner.class); - Assertions.assertEquals("uxvypomgkopkwh", model.location()); - Assertions.assertEquals("pajqgxysm", model.tags().get("cmbqfqvmk")); + Assertions.assertEquals("iuqgbdbutauv", model.location()); + Assertions.assertEquals("kuwhh", model.tags().get("hykojoxafnndlpic")); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("hvoodsotbobzd", model.analyticsWorkspaceId()); - Assertions.assertEquals("j", model.availabilityZones().get(0)); - Assertions.assertEquals("efyw", model.fabricControllerId()); - Assertions.assertEquals("fvmwy", model.managedResourceGroupConfiguration().location()); - Assertions.assertEquals("fouyf", model.managedResourceGroupConfiguration().name()); - Assertions.assertEquals("zksmondj", model.vmSize()); + Assertions.assertEquals(DeploymentType.AZURE_LOCAL, model.kind()); + Assertions.assertEquals("gx", model.analyticsWorkspaceId()); + Assertions.assertEquals("slpmutwuo", model.availabilityZones().get(0)); + Assertions.assertEquals("ysmocmbqfqvmkcxo", model.fabricControllerId()); + Assertions.assertEquals("vhelxprglyatdd", model.managedResourceGroupConfiguration().location()); + Assertions.assertEquals("cbcuejrjxgciqi", model.managedResourceGroupConfiguration().name()); + Assertions.assertEquals("uszdtmhrkwof", model.vmSize()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterManagerInner model = new ClusterManagerInner().withLocation("uxvypomgkopkwh") - .withTags(mapOf("cmbqfqvmk", "pajqgxysm")) + ClusterManagerInner model = new ClusterManagerInner().withLocation("iuqgbdbutauv") + .withTags(mapOf("hykojoxafnndlpic", "kuwhh", "h", "koymkcd", "reqnovvqfov", "pkkpw", "rsndsytgadgvra", + "jxywsuws")) .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("hgw", new UserAssignedIdentity(), "nedgfbc", - new UserAssignedIdentity(), "vq", new UserAssignedIdentity(), "eqdcv", new UserAssignedIdentity()))) - .withAnalyticsWorkspaceId("hvoodsotbobzd") - .withAvailabilityZones(Arrays.asList("j", "vnhdldwmgxcxr")) - .withFabricControllerId("efyw") + .withUserAssignedIdentities(mapOf("byuqerpqlp", new UserAssignedIdentity()))) + .withKind(DeploymentType.AZURE_LOCAL) + .withAnalyticsWorkspaceId("gx") + .withAvailabilityZones(Arrays.asList("slpmutwuo", "grpkhjwniyqs", "uicpd")) + .withFabricControllerId("ysmocmbqfqvmkcxo") .withManagedResourceGroupConfiguration( - new ManagedResourceGroupConfiguration().withLocation("fvmwy").withName("fouyf")) - .withVmSize("zksmondj"); + new ManagedResourceGroupConfiguration().withLocation("vhelxprglyatdd").withName("cbcuejrjxgciqi")) + .withVmSize("uszdtmhrkwof"); model = BinaryData.fromObject(model).toObject(ClusterManagerInner.class); - Assertions.assertEquals("uxvypomgkopkwh", model.location()); - Assertions.assertEquals("pajqgxysm", model.tags().get("cmbqfqvmk")); + Assertions.assertEquals("iuqgbdbutauv", model.location()); + Assertions.assertEquals("kuwhh", model.tags().get("hykojoxafnndlpic")); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("hvoodsotbobzd", model.analyticsWorkspaceId()); - Assertions.assertEquals("j", model.availabilityZones().get(0)); - Assertions.assertEquals("efyw", model.fabricControllerId()); - Assertions.assertEquals("fvmwy", model.managedResourceGroupConfiguration().location()); - Assertions.assertEquals("fouyf", model.managedResourceGroupConfiguration().name()); - Assertions.assertEquals("zksmondj", model.vmSize()); + Assertions.assertEquals(DeploymentType.AZURE_LOCAL, model.kind()); + Assertions.assertEquals("gx", model.analyticsWorkspaceId()); + Assertions.assertEquals("slpmutwuo", model.availabilityZones().get(0)); + Assertions.assertEquals("ysmocmbqfqvmkcxo", model.fabricControllerId()); + Assertions.assertEquals("vhelxprglyatdd", model.managedResourceGroupConfiguration().location()); + Assertions.assertEquals("cbcuejrjxgciqi", model.managedResourceGroupConfiguration().name()); + Assertions.assertEquals("uszdtmhrkwof", model.vmSize()); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerListTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerListTests.java index 9698c106389e..954573076ef2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerListTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerListTests.java @@ -1,113 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.networkcloud.fluent.models.ClusterManagerInner; -import com.azure.resourcemanager.networkcloud.models.ClusterManagerList; -import com.azure.resourcemanager.networkcloud.models.ManagedResourceGroupConfiguration; -import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentity; +import com.azure.resourcemanager.networkcloud.implementation.models.ClusterManagerList; +import com.azure.resourcemanager.networkcloud.models.DeploymentType; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.networkcloud.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class ClusterManagerListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterManagerList model = BinaryData.fromString( - "{\"nextLink\":\"ooxdjebwpuc\",\"value\":[{\"etag\":\"ovbvmeueciv\",\"identity\":{\"principalId\":\"22be1758-9e0e-46a0-9911-a74067087a8e\",\"tenantId\":\"fc341620-7bc9-44f9-b3ab-0ae4156c3a36\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"jrwjueiotwm\":{\"principalId\":\"a5777140-424b-40b2-ad23-adecceaf3830\",\"clientId\":\"55746705-f03e-45c1-98e0-e26c1e0c58ca\"},\"tdx\":{\"principalId\":\"a810830e-3998-4063-83f2-b2e53c45ba91\",\"clientId\":\"4f8b8879-ec83-4526-85f7-8b43905d1699\"},\"xnrj\":{\"principalId\":\"3f81c812-d2b9-410a-9451-66f3bd76b8d2\",\"clientId\":\"6ab2e5fd-d47e-40fa-900a-fb1a17f69e34\"},\"qwgxhniskx\":{\"principalId\":\"8be3dbcd-20c7-4a33-9cc2-27677d6e1340\",\"clientId\":\"187839ee-f11f-4824-9931-f3af0ab56b37\"}}},\"properties\":{\"analyticsWorkspaceId\":\"kpycgklwndnhjd\",\"availabilityZones\":[\"hvylwzbt\",\"h\"],\"clusterVersions\":[{\"supportExpiryDate\":\"nbmpowuwprzq\",\"targetClusterVersion\":\"eualupjmkhf\"}],\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"cswsrtjri\",\"fabricControllerId\":\"lrbpbewtghfgbl\",\"managedResourceGroupConfiguration\":{\"location\":\"xzvlvqhjkbegib\",\"name\":\"mxiebw\"},\"managerExtendedLocation\":{\"name\":\"loayqcgw\",\"type\":\"tzjuzgwyzmhtxo\"},\"provisioningState\":\"Accepted\",\"vmSize\":\"savjcbpwxqps\"},\"location\":\"nftguvriuhpr\",\"tags\":{\"bexrmcq\":\"yvxqtayriwwroy\",\"e\":\"bycnojvkn\",\"zhpvgqzcjrvxd\":\"qsgzvahapj\"},\"id\":\"zlmwlxkvugfhz\",\"name\":\"vawjvzunlu\",\"type\":\"hnnpr\"},{\"etag\":\"i\",\"identity\":{\"principalId\":\"0593d887-b7ab-4bbc-a778-a86f0d857d88\",\"tenantId\":\"c75df036-bf27-44a3-8043-cad63ae6b5cf\",\"type\":\"None\",\"userAssignedIdentities\":{\"e\":{\"principalId\":\"7b9b7058-1f81-4b89-8350-5b8210b6c8df\",\"clientId\":\"3567814c-2f3d-40eb-ab3e-3c3711617966\"},\"ultskzbbtdz\":{\"principalId\":\"c09a932e-2f54-40cf-829d-664df135cc44\",\"clientId\":\"dca72e7a-2c05-49b5-9df3-258d8ff1bddb\"}}},\"properties\":{\"analyticsWorkspaceId\":\"veekgpwozuhkfp\",\"availabilityZones\":[\"yofd\",\"luu\",\"dttouwaboekqvkel\",\"smv\"],\"clusterVersions\":[{\"supportExpiryDate\":\"jsflhhcaalnjix\",\"targetClusterVersion\":\"xyawj\"},{\"supportExpiryDate\":\"aq\",\"targetClusterVersion\":\"lyjpk\"},{\"supportExpiryDate\":\"dzyexznelixh\",\"targetClusterVersion\":\"ztfolhbnxk\"},{\"supportExpiryDate\":\"laulppg\",\"targetClusterVersion\":\"tpnapnyiropuhpig\"}],\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"lgqg\",\"fabricControllerId\":\"txmedj\",\"managedResourceGroupConfiguration\":{\"location\":\"lynqwwncwzzh\",\"name\":\"ktrmgucnapkt\"},\"managerExtendedLocation\":{\"name\":\"ellwptfdy\",\"type\":\"pfqbuaceopzf\"},\"provisioningState\":\"Provisioning\",\"vmSize\":\"uaopppcqeq\"},\"location\":\"lzdahzxctobgbkdm\",\"tags\":{\"qjhhkxbpv\":\"postmgrcfbunrm\",\"swbxqz\":\"ymjhxxjyngudivkr\",\"t\":\"szjfauvjfdxxivet\"},\"id\":\"qaqtdoqmcbxvwvxy\",\"name\":\"lqbhsf\",\"type\":\"obl\"},{\"etag\":\"k\",\"identity\":{\"principalId\":\"f278d887-03bd-41f4-bc3a-c75b0a0e1143\",\"tenantId\":\"5052e3a7-b9e1-4b9a-86c8-54201a56442f\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"bkrvrnsvshqj\":{\"principalId\":\"5b879c77-113f-4220-85b1-dc96ed336a73\",\"clientId\":\"d704cd1f-5621-4084-af26-3115098a52ea\"},\"crsbfovasr\":{\"principalId\":\"61c5373a-b84a-426f-9d95-6119b01b15c9\",\"clientId\":\"08f43fe9-48c5-4605-975e-73726a3c053f\"},\"wbhsqfsub\":{\"principalId\":\"f3c429f2-f094-4098-8eb2-58740a0f9bd2\",\"clientId\":\"494efc68-9400-4b43-abc6-ddafc35728a9\"},\"birx\":{\"principalId\":\"bfbe2f64-cdd1-4d77-a6a5-faef9ce76315\",\"clientId\":\"6849cbdf-4057-4387-822b-8008473fc186\"}}},\"properties\":{\"analyticsWorkspaceId\":\"ybsrfbjfdtwss\",\"availabilityZones\":[\"tpvjzbexilzznfqq\",\"vwpm\",\"taruoujmkcj\"],\"clusterVersions\":[{\"supportExpiryDate\":\"tjrybnwjewgdr\",\"targetClusterVersion\":\"rvnaenqpeh\"},{\"supportExpiryDate\":\"doy\",\"targetClusterVersion\":\"ifthnz\"},{\"supportExpiryDate\":\"dslgnayqigynduh\",\"targetClusterVersion\":\"hqlkthumaqo\"},{\"supportExpiryDate\":\"gycdu\",\"targetClusterVersion\":\"r\"}],\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"y\",\"fabricControllerId\":\"vaolpsslqlf\",\"managedResourceGroupConfiguration\":{\"location\":\"n\",\"name\":\"glzpswiydm\"},\"managerExtendedLocation\":{\"name\":\"yhz\",\"type\":\"xssadbzmnvdf\"},\"provisioningState\":\"Provisioning\",\"vmSize\":\"ao\"},\"location\":\"xzb\",\"tags\":{\"hxsrzdzucersc\":\"lylpstdb\",\"iwjmygtdssls\":\"ntnev\",\"emwabnet\":\"tmweriofzpyq\"},\"id\":\"hhszh\",\"name\":\"d\",\"type\":\"lvwiwubmwmbesl\"},{\"etag\":\"k\",\"identity\":{\"principalId\":\"5f3e3218-2c9d-4cf3-ba73-134e66b020d7\",\"tenantId\":\"45819e42-96e3-4ad6-8076-f84617b0506a\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"xogaokonzmnsikv\":{\"principalId\":\"b2e30f8f-9349-48f7-8d1d-21f56a4ccc5a\",\"clientId\":\"b290967e-faa9-42d8-82b0-3dd09aee805b\"},\"ze\":{\"principalId\":\"ee9c8ed0-3c9f-4275-a3c8-b7bae6c51ad7\",\"clientId\":\"7892966c-9c5b-4a40-9b14-9cc403e12e56\"}}},\"properties\":{\"analyticsWorkspaceId\":\"kdltfzxmhhvhg\",\"availabilityZones\":[\"odkwobd\",\"gxtibqdxbxw\",\"kbogqxndlkzgx\"],\"clusterVersions\":[{\"supportExpiryDate\":\"plbpodxun\",\"targetClusterVersion\":\"ebxmubyynt\"}],\"detailedStatus\":\"UpdateFailed\",\"detailedStatusMessage\":\"qtkoievs\",\"fabricControllerId\":\"otgqrlltmu\",\"managedResourceGroupConfiguration\":{\"location\":\"uwz\",\"name\":\"xbmp\"},\"managerExtendedLocation\":{\"name\":\"jefuzmuvpbttdumo\",\"type\":\"p\"},\"provisioningState\":\"Updating\",\"vmSize\":\"mnzb\"},\"location\":\"hjpglkf\",\"tags\":{\"lfphsdyhtozfikd\":\"dneu\",\"zonosgg\":\"wwquuvxzxclvithh\",\"ljuti\":\"hcohfwdsjnk\"},\"id\":\"swacffgdkzz\",\"name\":\"wkfvhqcrailvp\",\"type\":\"ppfufl\"}]}") + "{\"value\":[{\"properties\":{\"analyticsWorkspaceId\":\"wzsyyceuzs\",\"availabilityZones\":[\"judpfrxt\",\"thzvaytdwkqbrqu\",\"paxh\",\"xiilivpdtiirqt\"],\"clusterVersions\":[{\"supportExpiryDate\":\"xoruzfgsquyfxrx\",\"targetClusterVersion\":\"eptra\"},{\"supportExpiryDate\":\"jezwlwnw\",\"targetClusterVersion\":\"qlcvydy\"},{\"supportExpiryDate\":\"tdooaoj\",\"targetClusterVersion\":\"iodkooebwnujhem\"}],\"detailedStatus\":\"Updating\",\"detailedStatusMessage\":\"dkcrodt\",\"fabricControllerId\":\"infwjlfltkacjve\",\"managedResourceGroupConfiguration\":{\"location\":\"lfoakg\",\"name\":\"fpagaowpulp\"},\"managerExtendedLocation\":{\"name\":\"lyls\",\"type\":\"CustomLocation\"},\"provisioningState\":\"Accepted\",\"relayConfiguration\":{\"relayNamespaceId\":\"sjervti\"},\"vmSize\":\"xsdszuempsb\"},\"etag\":\"f\",\"identity\":{\"principalId\":\"yvpnqicvinvkjj\",\"tenantId\":\"xrbuukzclew\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"whxxbuyqax\":{\"principalId\":\"paztzpofncck\",\"clientId\":\"fz\"}}},\"kind\":\"Nexus\",\"location\":\"ztppriolxorjalto\",\"tags\":{\"bnwdcfh\":\"cwsobqwcs\",\"lsbjjcanvxbv\":\"cqdpfuv\"},\"id\":\"vudutncor\",\"name\":\"r\",\"type\":\"xqtvcofu\"},{\"properties\":{\"analyticsWorkspaceId\":\"lvkgju\",\"availabilityZones\":[\"knnqvsaznq\",\"tor\",\"dsg\"],\"clusterVersions\":[{\"supportExpiryDate\":\"kycgrauwj\",\"targetClusterVersion\":\"taeburuvdm\"}],\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"zlxwabmqoefkifr\",\"fabricControllerId\":\"tpuqujmq\",\"managedResourceGroupConfiguration\":{\"location\":\"fbtndoaong\",\"name\":\"cn\"},\"managerExtendedLocation\":{\"name\":\"jitcjedftwwaez\",\"type\":\"CustomLocation\"},\"provisioningState\":\"Updating\",\"relayConfiguration\":{\"relayNamespaceId\":\"pzfoqoui\"},\"vmSize\":\"bxarzgszufoxci\"},\"etag\":\"p\",\"identity\":{\"principalId\":\"amcio\",\"tenantId\":\"khazxkhnzbonlwn\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"qgsfraoyzkoow\":{\"principalId\":\"kdwbwhkszz\",\"clientId\":\"rvexztvb\"},\"ykutwpf\":{\"principalId\":\"mnguxawqaldsyu\",\"clientId\":\"imerqfobwyznk\"},\"doakgtdlmkkzevdl\":{\"principalId\":\"a\",\"clientId\":\"hrskdsnfd\"}}},\"kind\":\"AzureLocal\",\"location\":\"usdsttwv\",\"tags\":{\"akufgmjz\":\"bbejdcngqqm\",\"grtwae\":\"wr\",\"zkopb\":\"u\"},\"id\":\"inrfdwoyu\",\"name\":\"hziuiefozbhdms\",\"type\":\"l\"}],\"nextLink\":\"qhoftrmaequiah\"}") .toObject(ClusterManagerList.class); - Assertions.assertEquals("ooxdjebwpuc", model.nextLink()); - Assertions.assertEquals("nftguvriuhpr", model.value().get(0).location()); - Assertions.assertEquals("yvxqtayriwwroy", model.value().get(0).tags().get("bexrmcq")); + Assertions.assertEquals("ztppriolxorjalto", model.value().get(0).location()); + Assertions.assertEquals("cwsobqwcs", model.value().get(0).tags().get("bnwdcfh")); Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("kpycgklwndnhjd", model.value().get(0).analyticsWorkspaceId()); - Assertions.assertEquals("hvylwzbt", model.value().get(0).availabilityZones().get(0)); - Assertions.assertEquals("lrbpbewtghfgbl", model.value().get(0).fabricControllerId()); - Assertions.assertEquals("xzvlvqhjkbegib", model.value().get(0).managedResourceGroupConfiguration().location()); - Assertions.assertEquals("mxiebw", model.value().get(0).managedResourceGroupConfiguration().name()); - Assertions.assertEquals("savjcbpwxqps", model.value().get(0).vmSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterManagerList model = new ClusterManagerList().withNextLink("ooxdjebwpuc") - .withValue(Arrays.asList( - new ClusterManagerInner().withLocation("nftguvriuhpr") - .withTags(mapOf("bexrmcq", "yvxqtayriwwroy", "e", "bycnojvkn", "zhpvgqzcjrvxd", "qsgzvahapj")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("jrwjueiotwm", new UserAssignedIdentity(), "tdx", new UserAssignedIdentity(), "xnrj", - new UserAssignedIdentity(), "qwgxhniskx", new UserAssignedIdentity()))) - .withAnalyticsWorkspaceId("kpycgklwndnhjd") - .withAvailabilityZones(Arrays.asList("hvylwzbt", "h")) - .withFabricControllerId("lrbpbewtghfgbl") - .withManagedResourceGroupConfiguration( - new ManagedResourceGroupConfiguration().withLocation("xzvlvqhjkbegib").withName("mxiebw")) - .withVmSize("savjcbpwxqps"), - new ClusterManagerInner().withLocation("lzdahzxctobgbkdm") - .withTags( - mapOf("qjhhkxbpv", "postmgrcfbunrm", "swbxqz", "ymjhxxjyngudivkr", "t", "szjfauvjfdxxivet")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("e", new UserAssignedIdentity(), "ultskzbbtdz", new UserAssignedIdentity()))) - .withAnalyticsWorkspaceId("veekgpwozuhkfp") - .withAvailabilityZones(Arrays.asList("yofd", "luu", "dttouwaboekqvkel", "smv")) - .withFabricControllerId("txmedj") - .withManagedResourceGroupConfiguration( - new ManagedResourceGroupConfiguration().withLocation("lynqwwncwzzh").withName("ktrmgucnapkt")) - .withVmSize("uaopppcqeq"), - new ClusterManagerInner().withLocation("xzb") - .withTags(mapOf("hxsrzdzucersc", "lylpstdb", "iwjmygtdssls", "ntnev", "emwabnet", "tmweriofzpyq")) - .withIdentity( - new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("bkrvrnsvshqj", new UserAssignedIdentity(), "crsbfovasr", - new UserAssignedIdentity(), "wbhsqfsub", new UserAssignedIdentity(), "birx", - new UserAssignedIdentity()))) - .withAnalyticsWorkspaceId("ybsrfbjfdtwss") - .withAvailabilityZones(Arrays.asList("tpvjzbexilzznfqq", "vwpm", "taruoujmkcj")) - .withFabricControllerId("vaolpsslqlf") - .withManagedResourceGroupConfiguration( - new ManagedResourceGroupConfiguration().withLocation("n").withName("glzpswiydm")) - .withVmSize("ao"), - new ClusterManagerInner().withLocation("hjpglkf") - .withTags(mapOf("lfphsdyhtozfikd", "dneu", "zonosgg", "wwquuvxzxclvithh", "ljuti", "hcohfwdsjnk")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("xogaokonzmnsikv", new UserAssignedIdentity(), "ze", new UserAssignedIdentity()))) - .withAnalyticsWorkspaceId("kdltfzxmhhvhg") - .withAvailabilityZones(Arrays.asList("odkwobd", "gxtibqdxbxw", "kbogqxndlkzgx")) - .withFabricControllerId("otgqrlltmu") - .withManagedResourceGroupConfiguration( - new ManagedResourceGroupConfiguration().withLocation("uwz").withName("xbmp")) - .withVmSize("mnzb"))); - model = BinaryData.fromObject(model).toObject(ClusterManagerList.class); - Assertions.assertEquals("ooxdjebwpuc", model.nextLink()); - Assertions.assertEquals("nftguvriuhpr", model.value().get(0).location()); - Assertions.assertEquals("yvxqtayriwwroy", model.value().get(0).tags().get("bexrmcq")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("kpycgklwndnhjd", model.value().get(0).analyticsWorkspaceId()); - Assertions.assertEquals("hvylwzbt", model.value().get(0).availabilityZones().get(0)); - Assertions.assertEquals("lrbpbewtghfgbl", model.value().get(0).fabricControllerId()); - Assertions.assertEquals("xzvlvqhjkbegib", model.value().get(0).managedResourceGroupConfiguration().location()); - Assertions.assertEquals("mxiebw", model.value().get(0).managedResourceGroupConfiguration().name()); - Assertions.assertEquals("savjcbpwxqps", model.value().get(0).vmSize()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(DeploymentType.NEXUS, model.value().get(0).kind()); + Assertions.assertEquals("wzsyyceuzs", model.value().get(0).analyticsWorkspaceId()); + Assertions.assertEquals("judpfrxt", model.value().get(0).availabilityZones().get(0)); + Assertions.assertEquals("infwjlfltkacjve", model.value().get(0).fabricControllerId()); + Assertions.assertEquals("lfoakg", model.value().get(0).managedResourceGroupConfiguration().location()); + Assertions.assertEquals("fpagaowpulp", model.value().get(0).managedResourceGroupConfiguration().name()); + Assertions.assertEquals("xsdszuempsb", model.value().get(0).vmSize()); + Assertions.assertEquals("qhoftrmaequiah", model.nextLink()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerPatchParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerPatchParametersTests.java index d1aca835c81b..66acd40b556f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerPatchParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerPatchParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -17,21 +17,24 @@ public final class ClusterManagerPatchParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterManagerPatchParameters model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"9f83432b-3baf-4421-9892-eb01530118af\",\"tenantId\":\"f5b47c06-63a3-4b79-ab45-f1976ba25ab7\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"owxwcomli\":{\"principalId\":\"54f461e1-6499-4c3f-b38a-0aef8d5f2e38\",\"clientId\":\"bacf6124-9455-44f4-a608-c74ddd77ed00\"}}},\"tags\":{\"yfdvlvhbwrnfxtgd\":\"wvczcswkacve\"}}") + "{\"identity\":{\"principalId\":\"oz\",\"tenantId\":\"sphyoulpjrvxa\",\"type\":\"None\",\"userAssignedIdentities\":{\"zzikhlyfjhdg\":{\"principalId\":\"mjwosytx\",\"clientId\":\"cskfcktqumiekk\"},\"dsuvarmywdmjsjqb\":{\"principalId\":\"gebdunygaeq\",\"clientId\":\"bqfatpxllrxcyjmo\"}}},\"tags\":{\"kxkgymareqna\":\"yxxrwlycoduh\",\"ssofwqmzqa\":\"xqugjhkycubedd\",\"nbyxbaaabjyv\":\"krmnjijpxacqqud\",\"xnevfdnwn\":\"yffimrzrtuzqogs\"}}") .toObject(ClusterManagerPatchParameters.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("wvczcswkacve", model.tags().get("yfdvlvhbwrnfxtgd")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); + Assertions.assertEquals("yxxrwlycoduh", model.tags().get("kxkgymareqna")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterManagerPatchParameters model = new ClusterManagerPatchParameters() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("owxwcomli", new UserAssignedIdentity()))) - .withTags(mapOf("yfdvlvhbwrnfxtgd", "wvczcswkacve")); + ClusterManagerPatchParameters model + = new ClusterManagerPatchParameters() + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("zzikhlyfjhdg", new UserAssignedIdentity(), "dsuvarmywdmjsjqb", + new UserAssignedIdentity()))) + .withTags(mapOf("kxkgymareqna", "yxxrwlycoduh", "ssofwqmzqa", "xqugjhkycubedd", "nbyxbaaabjyv", + "krmnjijpxacqqud", "xnevfdnwn", "yffimrzrtuzqogs")); model = BinaryData.fromObject(model).toObject(ClusterManagerPatchParameters.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("wvczcswkacve", model.tags().get("yfdvlvhbwrnfxtgd")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); + Assertions.assertEquals("yxxrwlycoduh", model.tags().get("kxkgymareqna")); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerPropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerPropertiesTests.java index 1ee0116fa7b8..3a3cc42375f4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerPropertiesTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,30 +14,30 @@ public final class ClusterManagerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterManagerProperties model = BinaryData.fromString( - "{\"analyticsWorkspaceId\":\"bahwfl\",\"availabilityZones\":[\"dtmhrkwofyyvoqa\",\"piexpbtgiw\",\"wo\"],\"clusterVersions\":[{\"supportExpiryDate\":\"shrtdtkcnqxwb\",\"targetClusterVersion\":\"kulpiujwaasi\"},{\"supportExpiryDate\":\"i\",\"targetClusterVersion\":\"byuqerpqlp\"}],\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"iuqgbdbutauv\",\"fabricControllerId\":\"btkuwhh\",\"managedResourceGroupConfiguration\":{\"location\":\"k\",\"name\":\"oxafn\"},\"managerExtendedLocation\":{\"name\":\"lpichk\",\"type\":\"ymkcdyhb\"},\"provisioningState\":\"Canceled\",\"vmSize\":\"wdreqnovvqfovl\"}") + "{\"analyticsWorkspaceId\":\"wiipfpub\",\"availabilityZones\":[\"wwiftohqkvpuv\",\"sgplsakn\"],\"clusterVersions\":[{\"supportExpiryDate\":\"ynl\",\"targetClusterVersion\":\"huopxodlqiynto\"},{\"supportExpiryDate\":\"ihleos\",\"targetClusterVersion\":\"w\"},{\"supportExpiryDate\":\"mslyzrpzbchckqqz\",\"targetClusterVersion\":\"ox\"}],\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"iizynkedyatrwyh\",\"fabricControllerId\":\"mibzyhwitsmypyyn\",\"managedResourceGroupConfiguration\":{\"location\":\"pumnz\",\"name\":\"wznm\"},\"managerExtendedLocation\":{\"name\":\"iknsorgjh\",\"type\":\"EdgeZone\"},\"provisioningState\":\"Failed\",\"relayConfiguration\":{\"relayNamespaceId\":\"wwrlkdmtncv\"},\"vmSize\":\"otllxdyhgsyo\"}") .toObject(ClusterManagerProperties.class); - Assertions.assertEquals("bahwfl", model.analyticsWorkspaceId()); - Assertions.assertEquals("dtmhrkwofyyvoqa", model.availabilityZones().get(0)); - Assertions.assertEquals("btkuwhh", model.fabricControllerId()); - Assertions.assertEquals("k", model.managedResourceGroupConfiguration().location()); - Assertions.assertEquals("oxafn", model.managedResourceGroupConfiguration().name()); - Assertions.assertEquals("wdreqnovvqfovl", model.vmSize()); + Assertions.assertEquals("wiipfpub", model.analyticsWorkspaceId()); + Assertions.assertEquals("wwiftohqkvpuv", model.availabilityZones().get(0)); + Assertions.assertEquals("mibzyhwitsmypyyn", model.fabricControllerId()); + Assertions.assertEquals("pumnz", model.managedResourceGroupConfiguration().location()); + Assertions.assertEquals("wznm", model.managedResourceGroupConfiguration().name()); + Assertions.assertEquals("otllxdyhgsyo", model.vmSize()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterManagerProperties model = new ClusterManagerProperties().withAnalyticsWorkspaceId("bahwfl") - .withAvailabilityZones(Arrays.asList("dtmhrkwofyyvoqa", "piexpbtgiw", "wo")) - .withFabricControllerId("btkuwhh") + ClusterManagerProperties model = new ClusterManagerProperties().withAnalyticsWorkspaceId("wiipfpub") + .withAvailabilityZones(Arrays.asList("wwiftohqkvpuv", "sgplsakn")) + .withFabricControllerId("mibzyhwitsmypyyn") .withManagedResourceGroupConfiguration( - new ManagedResourceGroupConfiguration().withLocation("k").withName("oxafn")) - .withVmSize("wdreqnovvqfovl"); + new ManagedResourceGroupConfiguration().withLocation("pumnz").withName("wznm")) + .withVmSize("otllxdyhgsyo"); model = BinaryData.fromObject(model).toObject(ClusterManagerProperties.class); - Assertions.assertEquals("bahwfl", model.analyticsWorkspaceId()); - Assertions.assertEquals("dtmhrkwofyyvoqa", model.availabilityZones().get(0)); - Assertions.assertEquals("btkuwhh", model.fabricControllerId()); - Assertions.assertEquals("k", model.managedResourceGroupConfiguration().location()); - Assertions.assertEquals("oxafn", model.managedResourceGroupConfiguration().name()); - Assertions.assertEquals("wdreqnovvqfovl", model.vmSize()); + Assertions.assertEquals("wiipfpub", model.analyticsWorkspaceId()); + Assertions.assertEquals("wwiftohqkvpuv", model.availabilityZones().get(0)); + Assertions.assertEquals("mibzyhwitsmypyyn", model.fabricControllerId()); + Assertions.assertEquals("pumnz", model.managedResourceGroupConfiguration().location()); + Assertions.assertEquals("wznm", model.managedResourceGroupConfiguration().name()); + Assertions.assertEquals("otllxdyhgsyo", model.vmSize()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerRelayConfigurationTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerRelayConfigurationTests.java new file mode 100644 index 000000000000..55ad5ad998be --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerRelayConfigurationTests.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.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.models.ClusterManagerRelayConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class ClusterManagerRelayConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ClusterManagerRelayConfiguration model = BinaryData.fromString("{\"relayNamespaceId\":\"cjzkzivgvvcna\"}") + .toObject(ClusterManagerRelayConfiguration.class); + Assertions.assertEquals("cjzkzivgvvcna", model.relayNamespaceId()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerUpdateRelayPrivateEndpointConnectionParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerUpdateRelayPrivateEndpointConnectionParametersTests.java new file mode 100644 index 000000000000..611a1083ff10 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagerUpdateRelayPrivateEndpointConnectionParametersTests.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.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.models.ClusterManagerUpdateRelayPrivateEndpointConnectionParameters; +import com.azure.resourcemanager.networkcloud.models.RelayPrivateEndpointConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class ClusterManagerUpdateRelayPrivateEndpointConnectionParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters model = BinaryData.fromString( + "{\"connectionState\":\"Approved\",\"description\":\"slfaoqzpiyyl\",\"privateEndpointResourceId\":\"alnswhccsphk\"}") + .toObject(ClusterManagerUpdateRelayPrivateEndpointConnectionParameters.class); + Assertions.assertEquals(RelayPrivateEndpointConnectionState.APPROVED, model.connectionState()); + Assertions.assertEquals("slfaoqzpiyyl", model.description()); + Assertions.assertEquals("alnswhccsphk", model.privateEndpointResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters model + = new ClusterManagerUpdateRelayPrivateEndpointConnectionParameters() + .withConnectionState(RelayPrivateEndpointConnectionState.APPROVED) + .withDescription("slfaoqzpiyyl") + .withPrivateEndpointResourceId("alnswhccsphk"); + model + = BinaryData.fromObject(model).toObject(ClusterManagerUpdateRelayPrivateEndpointConnectionParameters.class); + Assertions.assertEquals(RelayPrivateEndpointConnectionState.APPROVED, model.connectionState()); + Assertions.assertEquals("slfaoqzpiyyl", model.description()); + Assertions.assertEquals("alnswhccsphk", model.privateEndpointResourceId()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersCreateOrUpdateMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersCreateOrUpdateMockTests.java index 5e5018440796..57582f205267 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersCreateOrUpdateMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,6 +11,7 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; import com.azure.resourcemanager.networkcloud.models.ClusterManager; +import com.azure.resourcemanager.networkcloud.models.DeploymentType; import com.azure.resourcemanager.networkcloud.models.ManagedResourceGroupConfiguration; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentity; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentityType; @@ -28,7 +29,7 @@ public final class ClusterManagersCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"jzudrtpzk\",\"identity\":{\"principalId\":\"19c209e9-2462-4760-8fcf-146cae39fbf6\",\"tenantId\":\"acdb03ff-10f1-4595-a7a8-ec545fc29e30\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"zzqrhmngqbedy\":{\"principalId\":\"c828392d-3a1a-42c3-b786-83ca1ad92cd5\",\"clientId\":\"cc6d702b-ad32-423c-bfb1-802d174e1a19\"},\"rzwnyk\":{\"principalId\":\"b02a034a-4cb1-4b5f-b67f-6786b63622ae\",\"clientId\":\"43bde164-3d4c-4738-8d89-bf0701473625\"},\"jch\":{\"principalId\":\"b5e23b4a-ece9-45f5-926a-99abde2da6b1\",\"clientId\":\"cddfa36b-fd4f-4f3d-b9b7-43aa816a2a63\"}}},\"properties\":{\"analyticsWorkspaceId\":\"mpwctoflds\",\"availabilityZones\":[\"dhztxkbr\"],\"clusterVersions\":[{\"supportExpiryDate\":\"wjiyewhfjsrwq\",\"targetClusterVersion\":\"etfgcwvrrmdqntyc\"},{\"supportExpiryDate\":\"wthv\",\"targetClusterVersion\":\"xgnuyeamcmhu\"}],\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"cehokw\",\"fabricControllerId\":\"pqtwloesqrggvrb\",\"managedResourceGroupConfiguration\":{\"location\":\"ukoila\",\"name\":\"duwjleipjlhwy\"},\"managerExtendedLocation\":{\"name\":\"zr\",\"type\":\"z\"},\"provisioningState\":\"Succeeded\",\"vmSize\":\"kkwhbgxvellvulnx\"},\"location\":\"nitmujdtvmclyymf\",\"tags\":{\"xfzuvrzmzqmzj\":\"jpddn\",\"pv\":\"rb\",\"pglaoh\":\"mdyfoebojtj\"},\"id\":\"qk\",\"name\":\"jtnqjil\",\"type\":\"ywkdcwmqsy\"}"; + = "{\"properties\":{\"analyticsWorkspaceId\":\"kyzbfvxovqkxiux\",\"availabilityZones\":[\"vqrnhyhlwcjsqgg\",\"hffbxrq\",\"kijpeuqlsdxeqztv\"],\"clusterVersions\":[{\"supportExpiryDate\":\"wmjswenaww\",\"targetClusterVersion\":\"ecleqioulndhzyo\"},{\"supportExpiryDate\":\"jhtollh\",\"targetClusterVersion\":\"idmytzln\"},{\"supportExpiryDate\":\"xpno\",\"targetClusterVersion\":\"oanfbcswqagyw\"}],\"detailedStatus\":\"ProvisioningFailed\",\"detailedStatusMessage\":\"gvjrktpgaeuky\",\"fabricControllerId\":\"wohpmwhqnucs\",\"managedResourceGroupConfiguration\":{\"location\":\"sidsjtd\",\"name\":\"bninjgazlsvbzfc\"},\"managerExtendedLocation\":{\"name\":\"o\",\"type\":\"EdgeZone\"},\"provisioningState\":\"Succeeded\",\"relayConfiguration\":{\"relayNamespaceId\":\"ciklh\"},\"vmSize\":\"ekrdr\"},\"etag\":\"xolriy\",\"identity\":{\"principalId\":\"beivdlhydwbdbfg\",\"tenantId\":\"punytjl\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"wllbv\":{\"principalId\":\"pathubt\",\"clientId\":\"deani\"},\"ktjtgra\":{\"principalId\":\"zsffte\",\"clientId\":\"us\"}}},\"kind\":\"AzureLocal\",\"location\":\"gfkbebauzlqbtxx\",\"tags\":{\"jzudrtpzk\":\"h\"},\"id\":\"meboywhczzq\",\"name\":\"hmngqb\",\"type\":\"dygisrzwnykd\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -38,32 +39,34 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ClusterManager response = manager.clusterManagers() - .define("uzowpuohdkcpr") - .withRegion("ekrdr") - .withExistingResourceGroup("flanfkgxsyao") - .withFabricControllerId("wohpmwhqnucs") - .withTags(mapOf("yehqbeivdlhydwb", "olr", "mpathubtah", "bfgrlpunytjlkes")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("mqrud", new UserAssignedIdentity(), "cbfzmc", - new UserAssignedIdentity(), "fhi", new UserAssignedIdentity()))) - .withAnalyticsWorkspaceId("nmfbc") - .withAvailabilityZones(Arrays.asList("ktkrumzuedky", "bfvxovqkxiuxq", "gvqrnhyhlwcj", "qggjhf")) + .define("aokbavlyttaaknwf") + .withRegion("ibmq") + .withExistingResourceGroup("budbt") + .withFabricControllerId("yqe") + .withTags(mapOf("svvoqsbpkflanfk", "ymqruqguhfupet", "kc", "xsyaowuzowpuoh")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities( + mapOf("gfb", new UserAssignedIdentity(), "calincryqxz", new UserAssignedIdentity()))) + .withKind(DeploymentType.NEXUS) + .withAnalyticsWorkspaceId("ebsmhpdujdigato") + .withAvailabilityZones(Arrays.asList("scbctnanqim")) .withManagedResourceGroupConfiguration( - new ManagedResourceGroupConfiguration().withLocation("sidsjtd").withName("bninjgazlsvbzfc")) - .withVmSize("ciklh") - .withIfMatch("gravaqogfkbebauz") - .withIfNoneMatch("qbtxxwpf") + new ManagedResourceGroupConfiguration().withLocation("odlikcdrdaasax").withName("bsmfkwiyjvz")) + .withVmSize("ndoabhjxwxqweuip") + .withIfMatch("mcrunfhiucn") + .withIfNoneMatch("fbcpaqktkrumzu") .create(); - Assertions.assertEquals("nitmujdtvmclyymf", response.location()); - Assertions.assertEquals("jpddn", response.tags().get("xfzuvrzmzqmzj")); + Assertions.assertEquals("gfkbebauzlqbtxx", response.location()); + Assertions.assertEquals("h", response.tags().get("jzudrtpzk")); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("mpwctoflds", response.analyticsWorkspaceId()); - Assertions.assertEquals("dhztxkbr", response.availabilityZones().get(0)); - Assertions.assertEquals("pqtwloesqrggvrb", response.fabricControllerId()); - Assertions.assertEquals("ukoila", response.managedResourceGroupConfiguration().location()); - Assertions.assertEquals("duwjleipjlhwy", response.managedResourceGroupConfiguration().name()); - Assertions.assertEquals("kkwhbgxvellvulnx", response.vmSize()); + Assertions.assertEquals(DeploymentType.AZURE_LOCAL, response.kind()); + Assertions.assertEquals("kyzbfvxovqkxiux", response.analyticsWorkspaceId()); + Assertions.assertEquals("vqrnhyhlwcjsqgg", response.availabilityZones().get(0)); + Assertions.assertEquals("wohpmwhqnucs", response.fabricControllerId()); + Assertions.assertEquals("sidsjtd", response.managedResourceGroupConfiguration().location()); + Assertions.assertEquals("bninjgazlsvbzfc", response.managedResourceGroupConfiguration().name()); + Assertions.assertEquals("ekrdr", response.vmSize()); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersGetByResourceGroupWithResponseMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersGetByResourceGroupWithResponseMockTests.java index 8585db54ea57..8464f4ee4ad0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersGetByResourceGroupWithResponseMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersGetByResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,6 +11,7 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; import com.azure.resourcemanager.networkcloud.models.ClusterManager; +import com.azure.resourcemanager.networkcloud.models.DeploymentType; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentityType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,7 +23,7 @@ public final class ClusterManagersGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"etag\":\"mwbzxpdc\",\"identity\":{\"principalId\":\"3a7b76e2-78ed-4a07-904c-15e6c89dd903\",\"tenantId\":\"27614d8b-0e0b-441d-bae5-ff1701ee9548\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"laimouxwk\":{\"principalId\":\"3fb28c05-8d2c-48f8-99e3-e63bf57b3366\",\"clientId\":\"bfd51f42-01f7-4780-a99a-b03a5af93005\"}}},\"properties\":{\"analyticsWorkspaceId\":\"mud\",\"availabilityZones\":[\"oibi\",\"ziuswsw\",\"rk\",\"qsj\"],\"clusterVersions\":[{\"supportExpiryDate\":\"q\",\"targetClusterVersion\":\"fs\"},{\"supportExpiryDate\":\"rfwb\",\"targetClusterVersion\":\"qvogfuyz\"}],\"detailedStatus\":\"ProvisioningFailed\",\"detailedStatusMessage\":\"limbyqecroodlik\",\"fabricControllerId\":\"drdaasa\",\"managedResourceGroupConfiguration\":{\"location\":\"bsmfkwiyjvz\",\"name\":\"osrnawnvzmlnkoy\"},\"managerExtendedLocation\":{\"name\":\"xvjabjq\",\"type\":\"axuyvymcnud\"},\"provisioningState\":\"Provisioning\",\"vmSize\":\"bhjxwxqweuipmpv\"},\"location\":\"m\",\"tags\":{\"fhyrfrakk\":\"sqxtltclkrdpq\",\"rcwfcmfcnrjajq\":\"d\"},\"id\":\"atxjtiel\",\"name\":\"zqgxx\",\"type\":\"fbbmtlp\"}"; + = "{\"properties\":{\"analyticsWorkspaceId\":\"lswbnf\",\"availabilityZones\":[\"pld\"],\"clusterVersions\":[{\"supportExpiryDate\":\"sfzygleexahv\",\"targetClusterVersion\":\"whsbrcary\"},{\"supportExpiryDate\":\"jjzyvoaqajuve\",\"targetClusterVersion\":\"ptdmkrrbhmpful\"},{\"supportExpiryDate\":\"efgybpmfbfununmp\",\"targetClusterVersion\":\"rvfyifkdsch\"},{\"supportExpiryDate\":\"vfictnkjjwgcwn\",\"targetClusterVersion\":\"bkgfyrtogmhmjpjs\"}],\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"dqwty\",\"fabricControllerId\":\"ev\",\"managedResourceGroupConfiguration\":{\"location\":\"sehar\",\"name\":\"fv\"},\"managerExtendedLocation\":{\"name\":\"rxtmbpjptnvw\",\"type\":\"EdgeZone\"},\"provisioningState\":\"Updating\",\"relayConfiguration\":{\"relayNamespaceId\":\"qpxlb\"},\"vmSize\":\"akftng\"},\"etag\":\"wmykyutry\",\"identity\":{\"principalId\":\"mfjhpycvjqdvdwkq\",\"tenantId\":\"drlefgnaavuag\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"phm\":{\"principalId\":\"outnpdctuhspfefy\",\"clientId\":\"duyeuyl\"},\"jrr\":{\"principalId\":\"bkcgsuthhllnm\",\"clientId\":\"nefxexlfciatx\"},\"jmkxettcslojf\":{\"principalId\":\"mdskjhhxdlajfoxc\",\"clientId\":\"cvslxlhuavkrmukm\"}}},\"kind\":\"Nexus\",\"location\":\"nqtoqx\",\"tags\":{\"qhtkbt\":\"xc\",\"ld\":\"qlrn\",\"hllxricctkw\":\"biipsnawwlqkznx\",\"eiyglesrwvaexhdc\":\"uqqoaj\"},\"id\":\"rceqnkbrupob\",\"name\":\"hdmljz\",\"type\":\"cvumepjpbi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,17 +33,18 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ClusterManager response = manager.clusterManagers() - .getByResourceGroupWithResponse("ujd", "gatolekscbctnan", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("pbnfnqtx", "to", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("m", response.location()); - Assertions.assertEquals("sqxtltclkrdpq", response.tags().get("fhyrfrakk")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("mud", response.analyticsWorkspaceId()); - Assertions.assertEquals("oibi", response.availabilityZones().get(0)); - Assertions.assertEquals("drdaasa", response.fabricControllerId()); - Assertions.assertEquals("bsmfkwiyjvz", response.managedResourceGroupConfiguration().location()); - Assertions.assertEquals("osrnawnvzmlnkoy", response.managedResourceGroupConfiguration().name()); - Assertions.assertEquals("bhjxwxqweuipmpv", response.vmSize()); + Assertions.assertEquals("nqtoqx", response.location()); + Assertions.assertEquals("xc", response.tags().get("qhtkbt")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals(DeploymentType.NEXUS, response.kind()); + Assertions.assertEquals("lswbnf", response.analyticsWorkspaceId()); + Assertions.assertEquals("pld", response.availabilityZones().get(0)); + Assertions.assertEquals("ev", response.fabricControllerId()); + Assertions.assertEquals("sehar", response.managedResourceGroupConfiguration().location()); + Assertions.assertEquals("fv", response.managedResourceGroupConfiguration().name()); + Assertions.assertEquals("akftng", response.vmSize()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListByResourceGroupMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListByResourceGroupMockTests.java index 1c108ccf1066..a2d894fd5924 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListByResourceGroupMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListByResourceGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,6 +12,7 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; import com.azure.resourcemanager.networkcloud.models.ClusterManager; +import com.azure.resourcemanager.networkcloud.models.DeploymentType; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentityType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -23,7 +24,7 @@ public final class ClusterManagersListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"ubtlmjtg\",\"identity\":{\"principalId\":\"ef734fe1-0ead-46b3-b9f4-00689c2ec19e\",\"tenantId\":\"62a37feb-7db1-4240-9e96-dc716543bedc\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"kmfd\":{\"principalId\":\"648e932f-03cd-4984-a43d-cdf585d45a56\",\"clientId\":\"df332ecf-287b-4324-82c7-e0bc4e5ea1aa\"},\"xgbkkqvjcteo\":{\"principalId\":\"4096a918-3bdb-4aad-8030-9b598b0f7aa9\",\"clientId\":\"d6e25a60-9e60-443b-87d9-ee08f203a6d3\"},\"rslskkzp\":{\"principalId\":\"a806e390-dc43-422d-b01b-131c81f65639\",\"clientId\":\"d2662aa6-ca85-4633-9735-a9678ec404e1\"},\"nzdpvoco\":{\"principalId\":\"c5c3f6db-110c-4b54-91a3-3907b7efdaac\",\"clientId\":\"b29ae816-237a-4ad9-b275-293673b72cc1\"}}},\"properties\":{\"analyticsWorkspaceId\":\"pcnab\",\"availabilityZones\":[\"snggytexvzilmhiv\",\"kwwwnckn\",\"zdajlskzptjxu\",\"weucyrth\"],\"clusterVersions\":[{\"supportExpiryDate\":\"h\",\"targetClusterVersion\":\"gcj\"},{\"supportExpiryDate\":\"n\",\"targetClusterVersion\":\"hokamvfej\"},{\"supportExpiryDate\":\"nttmbq\",\"targetClusterVersion\":\"bzfivfok\"},{\"supportExpiryDate\":\"sthhzagjfwy\",\"targetClusterVersion\":\"lhgenuzejgvkv\"}],\"detailedStatus\":\"UpdateFailed\",\"detailedStatusMessage\":\"szllrzlsmmdqgmi\",\"fabricControllerId\":\"zpimcqrhn\",\"managedResourceGroupConfiguration\":{\"location\":\"inklogxs\",\"name\":\"zarhzvqnsqktcmbj\"},\"managerExtendedLocation\":{\"name\":\"zoslpkybtgl\",\"type\":\"kzpgaj\"},\"provisioningState\":\"Succeeded\",\"vmSize\":\"emqbmfuvqarwzxuq\"},\"location\":\"bluimmbw\",\"tags\":{\"kraokq\":\"gtdmbvx\",\"aokbavlyttaaknwf\":\"budbt\"},\"id\":\"ke\",\"name\":\"sm\",\"type\":\"p\"}]}"; + = "{\"value\":[{\"properties\":{\"analyticsWorkspaceId\":\"jclykcg\",\"availabilityZones\":[\"pjlvczuoda\"],\"clusterVersions\":[{\"supportExpiryDate\":\"ettepdjxqe\",\"targetClusterVersion\":\"oy\"}],\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"lpckaewsedves\",\"fabricControllerId\":\"w\",\"managedResourceGroupConfiguration\":{\"location\":\"qphr\",\"name\":\"nzhctmjtsgh\"},\"managerExtendedLocation\":{\"name\":\"c\",\"type\":\"EdgeZone\"},\"provisioningState\":\"Provisioning\",\"relayConfiguration\":{\"relayNamespaceId\":\"pzeqacdldtz\"},\"vmSize\":\"ypefcpczshnuqnda\"},\"etag\":\"upfkhuytuszxhmtv\",\"identity\":{\"principalId\":\"gw\",\"tenantId\":\"ukvzwydwttha\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"u\":{\"principalId\":\"kjivbs\",\"clientId\":\"ajq\"}}},\"kind\":\"AzureLocal\",\"location\":\"xpgeumilhwuitr\",\"tags\":{\"fninbdbzs\":\"yion\"},\"id\":\"cw\",\"name\":\"qrs\",\"type\":\"pcbbprtugav\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,18 +34,18 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.clusterManagers() - .listByResourceGroup("zqbglcjkays", 1856331055, "hz", com.azure.core.util.Context.NONE); + .listByResourceGroup("nzpphepife", 1941908927, "eqir", com.azure.core.util.Context.NONE); - Assertions.assertEquals("bluimmbw", response.iterator().next().location()); - Assertions.assertEquals("gtdmbvx", response.iterator().next().tags().get("kraokq")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, + Assertions.assertEquals("xpgeumilhwuitr", response.iterator().next().location()); + Assertions.assertEquals("yion", response.iterator().next().tags().get("fninbdbzs")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("pcnab", response.iterator().next().analyticsWorkspaceId()); - Assertions.assertEquals("snggytexvzilmhiv", response.iterator().next().availabilityZones().get(0)); - Assertions.assertEquals("zpimcqrhn", response.iterator().next().fabricControllerId()); - Assertions.assertEquals("inklogxs", response.iterator().next().managedResourceGroupConfiguration().location()); - Assertions.assertEquals("zarhzvqnsqktcmbj", - response.iterator().next().managedResourceGroupConfiguration().name()); - Assertions.assertEquals("emqbmfuvqarwzxuq", response.iterator().next().vmSize()); + Assertions.assertEquals(DeploymentType.AZURE_LOCAL, response.iterator().next().kind()); + Assertions.assertEquals("jclykcg", response.iterator().next().analyticsWorkspaceId()); + Assertions.assertEquals("pjlvczuoda", response.iterator().next().availabilityZones().get(0)); + Assertions.assertEquals("w", response.iterator().next().fabricControllerId()); + Assertions.assertEquals("qphr", response.iterator().next().managedResourceGroupConfiguration().location()); + Assertions.assertEquals("nzhctmjtsgh", response.iterator().next().managedResourceGroupConfiguration().name()); + Assertions.assertEquals("ypefcpczshnuqnda", response.iterator().next().vmSize()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListMockTests.java index 7231355723eb..f405bd02ead7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterManagersListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,6 +12,7 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; import com.azure.resourcemanager.networkcloud.models.ClusterManager; +import com.azure.resourcemanager.networkcloud.models.DeploymentType; import com.azure.resourcemanager.networkcloud.models.ManagedServiceIdentityType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -23,7 +24,7 @@ public final class ClusterManagersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"sghpbcbcpzarpze\",\"identity\":{\"principalId\":\"8194bb0c-7549-438c-8016-fe282c17775e\",\"tenantId\":\"4419b758-7a33-479f-a73a-a5d53f87bbb6\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"pypefcpczshnuq\":{\"principalId\":\"26b9328a-794f-4385-a13c-5595d864b151\",\"clientId\":\"87ea4b3c-7120-4e54-a4fb-30f6522cbac6\"}}},\"properties\":{\"analyticsWorkspaceId\":\"aizu\",\"availabilityZones\":[\"huytuszx\"],\"clusterVersions\":[{\"supportExpiryDate\":\"tvegwqiukvzwy\",\"targetClusterVersion\":\"tthaokgkskj\"}],\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"shajqf\",\"fabricControllerId\":\"kpeexpgeumilh\",\"managedResourceGroupConfiguration\":{\"location\":\"trdexyionofnin\",\"name\":\"bzsx\"},\"managerExtendedLocation\":{\"name\":\"qqrsmpcbbprtugav\",\"type\":\"zbcyksiv\"},\"provisioningState\":\"Updating\",\"vmSize\":\"dr\"},\"location\":\"fcmkr\",\"tags\":{\"xkecifhocj\":\"jcwjjxsgmbawvif\",\"txvcm\":\"wkloozr\",\"yeyng\":\"funlcpxxvi\",\"rquv\":\"g\"},\"id\":\"ygg\",\"name\":\"pmcrdcuelj\",\"type\":\"iahxmfqryarvs\"}]}"; + = "{\"value\":[{\"properties\":{\"analyticsWorkspaceId\":\"bfcmkrfts\",\"availabilityZones\":[\"jjxsg\",\"bawvif\"],\"clusterVersions\":[{\"supportExpiryDate\":\"cifhocjxwkl\",\"targetClusterVersion\":\"zrvtx\"},{\"supportExpiryDate\":\"mufun\",\"targetClusterVersion\":\"px\"},{\"supportExpiryDate\":\"ir\",\"targetClusterVersion\":\"yngjgvrquvpygglp\"},{\"supportExpiryDate\":\"rdcueljtiahx\",\"targetClusterVersion\":\"q\"}],\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"vsxzqbglcjka\",\"fabricControllerId\":\"spthzodubtlmjtgb\",\"managedResourceGroupConfiguration\":{\"location\":\"skkfmk\",\"name\":\"djxyxgbkkqvjcteo\"},\"managerExtendedLocation\":{\"name\":\"l\",\"type\":\"EdgeZone\"},\"provisioningState\":\"Provisioning\",\"relayConfiguration\":{\"relayNamespaceId\":\"zpxvjnzdpvoc\"},\"vmSize\":\"hpcnabxzfsn\"},\"etag\":\"ytexvzilmhivzk\",\"identity\":{\"principalId\":\"ncknrzdajlsk\",\"tenantId\":\"tjxul\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ejvqnt\":{\"principalId\":\"rthxqlehmcg\",\"clientId\":\"einuehokamv\"},\"fwy\":{\"principalId\":\"bqd\",\"clientId\":\"zfivfokpysthhzag\"},\"mmdqgmihzpimc\":{\"principalId\":\"lhgenuzejgvkv\",\"clientId\":\"aqszllrzl\"}}},\"kind\":\"Nexus\",\"location\":\"xtminklogxsvtzar\",\"tags\":{\"wzzoslpk\":\"qnsqktcmb\",\"emqbmfuvqarwzxuq\":\"btglwkzpgajsqj\"},\"id\":\"ebluimmbwx\",\"name\":\"fgtdmbvx\",\"type\":\"kraokq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,17 +34,19 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.clusterManagers().list(1665407892, "egqphrgfnzhctm", com.azure.core.util.Context.NONE); + = manager.clusterManagers().list(2066287030, "bcyksivmfogd", com.azure.core.util.Context.NONE); - Assertions.assertEquals("fcmkr", response.iterator().next().location()); - Assertions.assertEquals("jcwjjxsgmbawvif", response.iterator().next().tags().get("xkecifhocj")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("aizu", response.iterator().next().analyticsWorkspaceId()); - Assertions.assertEquals("huytuszx", response.iterator().next().availabilityZones().get(0)); - Assertions.assertEquals("kpeexpgeumilh", response.iterator().next().fabricControllerId()); - Assertions.assertEquals("trdexyionofnin", - response.iterator().next().managedResourceGroupConfiguration().location()); - Assertions.assertEquals("bzsx", response.iterator().next().managedResourceGroupConfiguration().name()); - Assertions.assertEquals("dr", response.iterator().next().vmSize()); + Assertions.assertEquals("xtminklogxsvtzar", response.iterator().next().location()); + Assertions.assertEquals("qnsqktcmb", response.iterator().next().tags().get("wzzoslpk")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, + response.iterator().next().identity().type()); + Assertions.assertEquals(DeploymentType.NEXUS, response.iterator().next().kind()); + Assertions.assertEquals("bfcmkrfts", response.iterator().next().analyticsWorkspaceId()); + Assertions.assertEquals("jjxsg", response.iterator().next().availabilityZones().get(0)); + Assertions.assertEquals("spthzodubtlmjtgb", response.iterator().next().fabricControllerId()); + Assertions.assertEquals("skkfmk", response.iterator().next().managedResourceGroupConfiguration().location()); + Assertions.assertEquals("djxyxgbkkqvjcteo", + response.iterator().next().managedResourceGroupConfiguration().name()); + Assertions.assertEquals("hpcnabxzfsn", response.iterator().next().vmSize()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationInnerTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationInnerTests.java index 742e4ce9cc2f..07336018fb79 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationInnerTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationInnerTests.java @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.networkcloud.fluent.models.ClusterMetricsConfigurationInner; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -16,31 +17,31 @@ public final class ClusterMetricsConfigurationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterMetricsConfigurationInner model = BinaryData.fromString( - "{\"etag\":\"sjuscvsfxigctmg\",\"extendedLocation\":{\"name\":\"uupb\",\"type\":\"zqccydrtce\"},\"properties\":{\"collectionInterval\":1496049981033669629,\"detailedStatus\":\"Processing\",\"detailedStatusMessage\":\"yihztgeqmg\",\"disabledMetrics\":[\"wldoychi\",\"lcecfeh\"],\"enabledMetrics\":[\"oaguhic\",\"llizs\",\"ac\"],\"provisioningState\":\"Accepted\"},\"location\":\"rweft\",\"tags\":{\"cxtczhupeukn\":\"ejpmvssehaepwa\",\"c\":\"jduyyespydjfb\",\"hulrtywikdmhla\":\"v\",\"ufr\":\"uflgbhgauacdixm\"},\"id\":\"ryjqgdkf\",\"name\":\"ozo\",\"type\":\"oqbvjhvefgwbmqj\"}") + "{\"properties\":{\"enabledMetrics\":[\"pwamcxtczhupeuk\",\"ijdu\",\"yespydjfbocyv\"],\"collectionInterval\":6661930398442284318,\"detailedStatus\":\"Applied\",\"detailedStatusMessage\":\"ywikd\",\"disabledMetrics\":[\"akuflgbhgauacdix\",\"xufrsryjqgdk\",\"nozoeoq\",\"vjhvefgwbm\"],\"provisioningState\":\"Failed\"},\"etag\":\"ntasfaymxbu\",\"extendedLocation\":{\"name\":\"pzealbmqkyojw\",\"type\":\"EdgeZone\"},\"location\":\"kmbtsuahx\",\"tags\":{\"wsdrnpxqwodif\":\"jcmmzrrscub\",\"jogjonmc\":\"jxcjrmmuabwib\",\"oyzbamwineofvf\":\"e\"},\"id\":\"akpoldtvevbo\",\"name\":\"lz\",\"type\":\"zjknyuxg\"}") .toObject(ClusterMetricsConfigurationInner.class); - Assertions.assertEquals("rweft", model.location()); - Assertions.assertEquals("ejpmvssehaepwa", model.tags().get("cxtczhupeukn")); - Assertions.assertEquals("uupb", model.extendedLocation().name()); - Assertions.assertEquals("zqccydrtce", model.extendedLocation().type()); - Assertions.assertEquals(1496049981033669629L, model.collectionInterval()); - Assertions.assertEquals("oaguhic", model.enabledMetrics().get(0)); + Assertions.assertEquals("kmbtsuahx", model.location()); + Assertions.assertEquals("jcmmzrrscub", model.tags().get("wsdrnpxqwodif")); + Assertions.assertEquals("pzealbmqkyojw", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.extendedLocation().type()); + Assertions.assertEquals("pwamcxtczhupeuk", model.enabledMetrics().get(0)); + Assertions.assertEquals(6661930398442284318L, model.collectionInterval()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterMetricsConfigurationInner model = new ClusterMetricsConfigurationInner().withLocation("rweft") - .withTags(mapOf("cxtczhupeukn", "ejpmvssehaepwa", "c", "jduyyespydjfb", "hulrtywikdmhla", "v", "ufr", - "uflgbhgauacdixm")) - .withExtendedLocation(new ExtendedLocation().withName("uupb").withType("zqccydrtce")) - .withCollectionInterval(1496049981033669629L) - .withEnabledMetrics(Arrays.asList("oaguhic", "llizs", "ac")); + ClusterMetricsConfigurationInner model = new ClusterMetricsConfigurationInner().withLocation("kmbtsuahx") + .withTags(mapOf("wsdrnpxqwodif", "jcmmzrrscub", "jogjonmc", "jxcjrmmuabwib", "oyzbamwineofvf", "e")) + .withExtendedLocation( + new ExtendedLocation().withName("pzealbmqkyojw").withType(ExtendedLocationType.EDGE_ZONE)) + .withEnabledMetrics(Arrays.asList("pwamcxtczhupeuk", "ijdu", "yespydjfbocyv")) + .withCollectionInterval(6661930398442284318L); model = BinaryData.fromObject(model).toObject(ClusterMetricsConfigurationInner.class); - Assertions.assertEquals("rweft", model.location()); - Assertions.assertEquals("ejpmvssehaepwa", model.tags().get("cxtczhupeukn")); - Assertions.assertEquals("uupb", model.extendedLocation().name()); - Assertions.assertEquals("zqccydrtce", model.extendedLocation().type()); - Assertions.assertEquals(1496049981033669629L, model.collectionInterval()); - Assertions.assertEquals("oaguhic", model.enabledMetrics().get(0)); + Assertions.assertEquals("kmbtsuahx", model.location()); + Assertions.assertEquals("jcmmzrrscub", model.tags().get("wsdrnpxqwodif")); + Assertions.assertEquals("pzealbmqkyojw", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.extendedLocation().type()); + Assertions.assertEquals("pwamcxtczhupeuk", model.enabledMetrics().get(0)); + Assertions.assertEquals(6661930398442284318L, model.collectionInterval()); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationListTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationListTests.java index 53a8f009ca26..cc892ff446b5 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationListTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationListTests.java @@ -1,72 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.networkcloud.fluent.models.ClusterMetricsConfigurationInner; -import com.azure.resourcemanager.networkcloud.models.ClusterMetricsConfigurationList; -import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.networkcloud.implementation.models.ClusterMetricsConfigurationList; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import org.junit.jupiter.api.Assertions; public final class ClusterMetricsConfigurationListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterMetricsConfigurationList model = BinaryData.fromString( - "{\"nextLink\":\"atmzw\",\"value\":[{\"etag\":\"cqtjzmi\",\"extendedLocation\":{\"name\":\"vgbgatzuuvbxng\",\"type\":\"ebwgga\"},\"properties\":{\"collectionInterval\":7706886753825293030,\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"wvajq\",\"disabledMetrics\":[\"lx\"],\"enabledMetrics\":[\"zasunwqrjzfrgq\",\"aohcmbuocn\",\"r\",\"hmbpyryxamebly\"],\"provisioningState\":\"Succeeded\"},\"location\":\"fkmroc\",\"tags\":{\"cygvoavyunssx\":\"hvsmtodlfpyap\"},\"id\":\"ghiee\",\"name\":\"jlgvvpase\",\"type\":\"sgb\"},{\"etag\":\"antuygdhgaqipirp\",\"extendedLocation\":{\"name\":\"wrq\",\"type\":\"fulopmjnlexwhcb\"},\"properties\":{\"collectionInterval\":1020727472199134963,\"detailedStatus\":\"Processing\",\"detailedStatusMessage\":\"phuuuerctato\",\"disabledMetrics\":[\"tqpbrlcy\",\"duczkgof\"],\"enabledMetrics\":[\"srucvcrrpcjtt\",\"st\"],\"provisioningState\":\"Canceled\"},\"location\":\"qnrmvvfko\",\"tags\":{\"zlpdwwex\":\"ghktuidvrm\",\"wvqsgny\":\"mzvlazipbh\",\"patlbijp\":\"uuzivensrpmeyyvp\"},\"id\":\"gsksrfhf\",\"name\":\"olmk\",\"type\":\"bnxwc\"},{\"etag\":\"mmpvf\",\"extendedLocation\":{\"name\":\"awz\",\"type\":\"gbrt\"},\"properties\":{\"collectionInterval\":7623316120611454984,\"detailedStatus\":\"Applied\",\"detailedStatusMessage\":\"kiexhajlfnthiq\",\"disabledMetrics\":[\"t\",\"diygbpvnwswmtxky\",\"twwgzwx\"],\"enabledMetrics\":[\"ecvo\",\"ygzyvneezaifght\",\"oqqtl\",\"fhzbkr\"],\"provisioningState\":\"Provisioning\"},\"location\":\"avfqnvhnqoewdogi\",\"tags\":{\"t\":\"esypvidbztjh\",\"vnynkb\":\"b\",\"aupia\":\"etnjuhpsprkz\",\"uovmaonurjt\":\"cxnafbwqrooh\"},\"id\":\"mghihp\",\"name\":\"ecmslclbl\",\"type\":\"jxl\"}]}") + "{\"value\":[{\"properties\":{\"enabledMetrics\":[\"jymrhbg\",\"zozk\",\"ewnf\",\"zhhh\"],\"collectionInterval\":193678667924431617,\"detailedStatus\":\"Processing\",\"detailedStatusMessage\":\"jkutycyarnr\",\"disabledMetrics\":[\"g\",\"abzoghktdpyczhco\",\"ocnhzqrottjzcfyj\",\"pt\"],\"provisioningState\":\"Failed\"},\"etag\":\"h\",\"extendedLocation\":{\"name\":\"pqinf\",\"type\":\"CustomLocation\"},\"location\":\"yglqdhmrjzral\",\"tags\":{\"ypsjoq\":\"jb\"},\"id\":\"jenkyh\",\"name\":\"qzvs\",\"type\":\"xfxjelgcmpzqj\"},{\"properties\":{\"enabledMetrics\":[\"qxuwyvca\"],\"collectionInterval\":1032994937109612261,\"detailedStatus\":\"Applied\",\"detailedStatusMessage\":\"bsizus\",\"disabledMetrics\":[\"lbscmnlz\",\"jiu\",\"ehgmvflnwyv\"],\"provisioningState\":\"Canceled\"},\"etag\":\"erlniylylyfw\",\"extendedLocation\":{\"name\":\"zutgqztwhghmupg\",\"type\":\"CustomLocation\"},\"location\":\"tcdxabbujftaben\",\"tags\":{\"ucafedd\":\"lqpx\",\"gnhgook\":\"wnlzafwxu\"},\"id\":\"talvnbwgp\",\"name\":\"emeluclv\",\"type\":\"jjukyrdnqodxah\"},{\"properties\":{\"enabledMetrics\":[\"qfaqnvzoqg\",\"ipemchgavscz\"],\"collectionInterval\":8325184084775626540,\"detailedStatus\":\"Applied\",\"detailedStatusMessage\":\"ptlghwzhomewjjst\",\"disabledMetrics\":[\"hqawmo\",\"ia\",\"cz\"],\"provisioningState\":\"Failed\"},\"etag\":\"rrslblxydkx\",\"extendedLocation\":{\"name\":\"xvv\",\"type\":\"CustomLocation\"},\"location\":\"wkgfbqljnqkh\",\"tags\":{\"urqlrqffawey\":\"ocokule\"},\"id\":\"rkphyjdxr\",\"name\":\"vjuqdbrxmrgchb\",\"type\":\"pxkiyf\"}],\"nextLink\":\"kbajbu\"}") .toObject(ClusterMetricsConfigurationList.class); - Assertions.assertEquals("atmzw", model.nextLink()); - Assertions.assertEquals("fkmroc", model.value().get(0).location()); - Assertions.assertEquals("hvsmtodlfpyap", model.value().get(0).tags().get("cygvoavyunssx")); - Assertions.assertEquals("vgbgatzuuvbxng", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("ebwgga", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(7706886753825293030L, model.value().get(0).collectionInterval()); - Assertions.assertEquals("zasunwqrjzfrgq", model.value().get(0).enabledMetrics().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterMetricsConfigurationList model = new ClusterMetricsConfigurationList().withNextLink("atmzw") - .withValue(Arrays.asList( - new ClusterMetricsConfigurationInner().withLocation("fkmroc") - .withTags(mapOf("cygvoavyunssx", "hvsmtodlfpyap")) - .withExtendedLocation(new ExtendedLocation().withName("vgbgatzuuvbxng").withType("ebwgga")) - .withCollectionInterval(7706886753825293030L) - .withEnabledMetrics(Arrays.asList("zasunwqrjzfrgq", "aohcmbuocn", "r", "hmbpyryxamebly")), - new ClusterMetricsConfigurationInner().withLocation("qnrmvvfko") - .withTags(mapOf("zlpdwwex", "ghktuidvrm", "wvqsgny", "mzvlazipbh", "patlbijp", "uuzivensrpmeyyvp")) - .withExtendedLocation(new ExtendedLocation().withName("wrq").withType("fulopmjnlexwhcb")) - .withCollectionInterval(1020727472199134963L) - .withEnabledMetrics(Arrays.asList("srucvcrrpcjtt", "st")), - new ClusterMetricsConfigurationInner().withLocation("avfqnvhnqoewdogi") - .withTags(mapOf("t", "esypvidbztjh", "vnynkb", "b", "aupia", "etnjuhpsprkz", "uovmaonurjt", - "cxnafbwqrooh")) - .withExtendedLocation(new ExtendedLocation().withName("awz").withType("gbrt")) - .withCollectionInterval(7623316120611454984L) - .withEnabledMetrics(Arrays.asList("ecvo", "ygzyvneezaifght", "oqqtl", "fhzbkr")))); - model = BinaryData.fromObject(model).toObject(ClusterMetricsConfigurationList.class); - Assertions.assertEquals("atmzw", model.nextLink()); - Assertions.assertEquals("fkmroc", model.value().get(0).location()); - Assertions.assertEquals("hvsmtodlfpyap", model.value().get(0).tags().get("cygvoavyunssx")); - Assertions.assertEquals("vgbgatzuuvbxng", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("ebwgga", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(7706886753825293030L, model.value().get(0).collectionInterval()); - Assertions.assertEquals("zasunwqrjzfrgq", model.value().get(0).enabledMetrics().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("yglqdhmrjzral", model.value().get(0).location()); + Assertions.assertEquals("jb", model.value().get(0).tags().get("ypsjoq")); + Assertions.assertEquals("pqinf", model.value().get(0).extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); + Assertions.assertEquals("jymrhbg", model.value().get(0).enabledMetrics().get(0)); + Assertions.assertEquals(193678667924431617L, model.value().get(0).collectionInterval()); + Assertions.assertEquals("kbajbu", model.nextLink()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationPatchParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationPatchParametersTests.java index 9d2e8d1a85cd..0ba685d3b724 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationPatchParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationPatchParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -15,24 +15,23 @@ public final class ClusterMetricsConfigurationPatchParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterMetricsConfigurationPatchParameters model = BinaryData.fromString( - "{\"properties\":{\"collectionInterval\":9101534338635329443,\"enabledMetrics\":[\"wodiffjxc\",\"rmmuabwibvjo\",\"jonmc\"]},\"tags\":{\"akpoldtvevbo\":\"oyzbamwineofvf\",\"zjknyuxg\":\"lz\",\"mrdixtreki\":\"ttxpnrupza\",\"lukkutvlxhrpqhvm\":\"swyskbruffg\"}}") + "{\"properties\":{\"collectionInterval\":5355138275534081298,\"enabledMetrics\":[\"xldykalsygaolnjp\",\"nbmjksibjgsjjxxa\",\"mr\",\"ad\"]},\"tags\":{\"kgqxn\":\"egxyivpinbmhwbji\",\"znj\":\"mbk\",\"cwkdtaaw\":\"ujvaannggi\"}}") .toObject(ClusterMetricsConfigurationPatchParameters.class); - Assertions.assertEquals("oyzbamwineofvf", model.tags().get("akpoldtvevbo")); - Assertions.assertEquals(9101534338635329443L, model.collectionInterval()); - Assertions.assertEquals("wodiffjxc", model.enabledMetrics().get(0)); + Assertions.assertEquals("egxyivpinbmhwbji", model.tags().get("kgqxn")); + Assertions.assertEquals(5355138275534081298L, model.collectionInterval()); + Assertions.assertEquals("xldykalsygaolnjp", model.enabledMetrics().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ClusterMetricsConfigurationPatchParameters model = new ClusterMetricsConfigurationPatchParameters() - .withTags(mapOf("akpoldtvevbo", "oyzbamwineofvf", "zjknyuxg", "lz", "mrdixtreki", "ttxpnrupza", - "lukkutvlxhrpqhvm", "swyskbruffg")) - .withCollectionInterval(9101534338635329443L) - .withEnabledMetrics(Arrays.asList("wodiffjxc", "rmmuabwibvjo", "jonmc")); + .withTags(mapOf("kgqxn", "egxyivpinbmhwbji", "znj", "mbk", "cwkdtaaw", "ujvaannggi")) + .withCollectionInterval(5355138275534081298L) + .withEnabledMetrics(Arrays.asList("xldykalsygaolnjp", "nbmjksibjgsjjxxa", "mr", "ad")); model = BinaryData.fromObject(model).toObject(ClusterMetricsConfigurationPatchParameters.class); - Assertions.assertEquals("oyzbamwineofvf", model.tags().get("akpoldtvevbo")); - Assertions.assertEquals(9101534338635329443L, model.collectionInterval()); - Assertions.assertEquals("wodiffjxc", model.enabledMetrics().get(0)); + Assertions.assertEquals("egxyivpinbmhwbji", model.tags().get("kgqxn")); + Assertions.assertEquals(5355138275534081298L, model.collectionInterval()); + Assertions.assertEquals("xldykalsygaolnjp", model.enabledMetrics().get(0)); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationPatchPropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationPatchPropertiesTests.java index 5d7d6c23760b..f9c604c26e7a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationPatchPropertiesTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationPatchPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,21 +12,20 @@ public final class ClusterMetricsConfigurationPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ClusterMetricsConfigurationPatchProperties model = BinaryData - .fromString( - "{\"collectionInterval\":7768267397174343768,\"enabledMetrics\":[\"ehbhb\",\"dsz\",\"ryrando\"]}") + ClusterMetricsConfigurationPatchProperties model = BinaryData.fromString( + "{\"collectionInterval\":1668879333001310287,\"enabledMetrics\":[\"umrrqmbzm\",\"kratbnxwbj\",\"idbirkfpkso\",\"dgo\"]}") .toObject(ClusterMetricsConfigurationPatchProperties.class); - Assertions.assertEquals(7768267397174343768L, model.collectionInterval()); - Assertions.assertEquals("ehbhb", model.enabledMetrics().get(0)); + Assertions.assertEquals(1668879333001310287L, model.collectionInterval()); + Assertions.assertEquals("umrrqmbzm", model.enabledMetrics().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ClusterMetricsConfigurationPatchProperties model - = new ClusterMetricsConfigurationPatchProperties().withCollectionInterval(7768267397174343768L) - .withEnabledMetrics(Arrays.asList("ehbhb", "dsz", "ryrando")); + = new ClusterMetricsConfigurationPatchProperties().withCollectionInterval(1668879333001310287L) + .withEnabledMetrics(Arrays.asList("umrrqmbzm", "kratbnxwbj", "idbirkfpkso", "dgo")); model = BinaryData.fromObject(model).toObject(ClusterMetricsConfigurationPatchProperties.class); - Assertions.assertEquals(7768267397174343768L, model.collectionInterval()); - Assertions.assertEquals("ehbhb", model.enabledMetrics().get(0)); + Assertions.assertEquals(1668879333001310287L, model.collectionInterval()); + Assertions.assertEquals("umrrqmbzm", model.enabledMetrics().get(0)); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationPropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationPropertiesTests.java index 5cedba85d7d3..d7ca83a9e957 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationPropertiesTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterMetricsConfigurationPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,19 +13,19 @@ public final class ClusterMetricsConfigurationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterMetricsConfigurationProperties model = BinaryData.fromString( - "{\"collectionInterval\":1984488233204809218,\"detailedStatus\":\"Applied\",\"detailedStatusMessage\":\"faymxbulpz\",\"disabledMetrics\":[\"b\"],\"enabledMetrics\":[\"yojwyvfkmbtsu\",\"hxsgxj\",\"mmzrrscub\"],\"provisioningState\":\"Canceled\"}") + "{\"enabledMetrics\":[\"xpn\",\"upzaamrdixtre\",\"ids\"],\"collectionInterval\":8193583344516352516,\"detailedStatus\":\"Processing\",\"detailedStatusMessage\":\"uffgllukkutvlx\",\"disabledMetrics\":[\"qhvmblcouqe\",\"bhbcdszir\",\"randoypmb\",\"t\"],\"provisioningState\":\"Succeeded\"}") .toObject(ClusterMetricsConfigurationProperties.class); - Assertions.assertEquals(1984488233204809218L, model.collectionInterval()); - Assertions.assertEquals("yojwyvfkmbtsu", model.enabledMetrics().get(0)); + Assertions.assertEquals("xpn", model.enabledMetrics().get(0)); + Assertions.assertEquals(8193583344516352516L, model.collectionInterval()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterMetricsConfigurationProperties model - = new ClusterMetricsConfigurationProperties().withCollectionInterval(1984488233204809218L) - .withEnabledMetrics(Arrays.asList("yojwyvfkmbtsu", "hxsgxj", "mmzrrscub")); + ClusterMetricsConfigurationProperties model = new ClusterMetricsConfigurationProperties() + .withEnabledMetrics(Arrays.asList("xpn", "upzaamrdixtre", "ids")) + .withCollectionInterval(8193583344516352516L); model = BinaryData.fromObject(model).toObject(ClusterMetricsConfigurationProperties.class); - Assertions.assertEquals(1984488233204809218L, model.collectionInterval()); - Assertions.assertEquals("yojwyvfkmbtsu", model.enabledMetrics().get(0)); + Assertions.assertEquals("xpn", model.enabledMetrics().get(0)); + Assertions.assertEquals(8193583344516352516L, model.collectionInterval()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterScanRuntimeParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterScanRuntimeParametersTests.java index c6263325091c..1ada9796be2d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterScanRuntimeParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterScanRuntimeParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterUpdateStrategyTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterUpdateStrategyTests.java index 59e67e444244..873ebee8b663 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterUpdateStrategyTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterUpdateStrategyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,27 +14,27 @@ public final class ClusterUpdateStrategyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterUpdateStrategy model = BinaryData.fromString( - "{\"maxUnavailable\":357668176155118259,\"strategyType\":\"Rack\",\"thresholdType\":\"CountSuccess\",\"thresholdValue\":8684744606268928331,\"waitTimeMinutes\":9021745847558937122}") + "{\"maxUnavailable\":3366734959795178232,\"strategyType\":\"Rack\",\"thresholdType\":\"PercentSuccess\",\"thresholdValue\":3126604233844319478,\"waitTimeMinutes\":5834017362879750194}") .toObject(ClusterUpdateStrategy.class); - Assertions.assertEquals(357668176155118259L, model.maxUnavailable()); + Assertions.assertEquals(3366734959795178232L, model.maxUnavailable()); Assertions.assertEquals(ClusterUpdateStrategyType.RACK, model.strategyType()); - Assertions.assertEquals(ValidationThresholdType.COUNT_SUCCESS, model.thresholdType()); - Assertions.assertEquals(8684744606268928331L, model.thresholdValue()); - Assertions.assertEquals(9021745847558937122L, model.waitTimeMinutes()); + Assertions.assertEquals(ValidationThresholdType.PERCENT_SUCCESS, model.thresholdType()); + Assertions.assertEquals(3126604233844319478L, model.thresholdValue()); + Assertions.assertEquals(5834017362879750194L, model.waitTimeMinutes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterUpdateStrategy model = new ClusterUpdateStrategy().withMaxUnavailable(357668176155118259L) + ClusterUpdateStrategy model = new ClusterUpdateStrategy().withMaxUnavailable(3366734959795178232L) .withStrategyType(ClusterUpdateStrategyType.RACK) - .withThresholdType(ValidationThresholdType.COUNT_SUCCESS) - .withThresholdValue(8684744606268928331L) - .withWaitTimeMinutes(9021745847558937122L); + .withThresholdType(ValidationThresholdType.PERCENT_SUCCESS) + .withThresholdValue(3126604233844319478L) + .withWaitTimeMinutes(5834017362879750194L); model = BinaryData.fromObject(model).toObject(ClusterUpdateStrategy.class); - Assertions.assertEquals(357668176155118259L, model.maxUnavailable()); + Assertions.assertEquals(3366734959795178232L, model.maxUnavailable()); Assertions.assertEquals(ClusterUpdateStrategyType.RACK, model.strategyType()); - Assertions.assertEquals(ValidationThresholdType.COUNT_SUCCESS, model.thresholdType()); - Assertions.assertEquals(8684744606268928331L, model.thresholdValue()); - Assertions.assertEquals(9021745847558937122L, model.waitTimeMinutes()); + Assertions.assertEquals(ValidationThresholdType.PERCENT_SUCCESS, model.thresholdType()); + Assertions.assertEquals(3126604233844319478L, model.thresholdValue()); + Assertions.assertEquals(5834017362879750194L, model.waitTimeMinutes()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterUpdateVersionParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterUpdateVersionParametersTests.java index 5b5153bf3a3f..bbf38bc36df7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterUpdateVersionParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ClusterUpdateVersionParametersTests.java @@ -1,25 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.networkcloud.models.ClusterUpdateVersionParameters; +import com.azure.resourcemanager.networkcloud.models.ClusterUpdateVersionSafeguardMode; import org.junit.jupiter.api.Assertions; public final class ClusterUpdateVersionParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ClusterUpdateVersionParameters model = BinaryData.fromString("{\"targetClusterVersion\":\"blto\"}") - .toObject(ClusterUpdateVersionParameters.class); - Assertions.assertEquals("blto", model.targetClusterVersion()); + ClusterUpdateVersionParameters model + = BinaryData.fromString("{\"safeguardMode\":\"None\",\"targetClusterVersion\":\"kyhkobopg\"}") + .toObject(ClusterUpdateVersionParameters.class); + Assertions.assertEquals(ClusterUpdateVersionSafeguardMode.NONE, model.safeguardMode()); + Assertions.assertEquals("kyhkobopg", model.targetClusterVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterUpdateVersionParameters model = new ClusterUpdateVersionParameters().withTargetClusterVersion("blto"); + ClusterUpdateVersionParameters model + = new ClusterUpdateVersionParameters().withSafeguardMode(ClusterUpdateVersionSafeguardMode.NONE) + .withTargetClusterVersion("kyhkobopg"); model = BinaryData.fromObject(model).toObject(ClusterUpdateVersionParameters.class); - Assertions.assertEquals("blto", model.targetClusterVersion()); + Assertions.assertEquals(ClusterUpdateVersionSafeguardMode.NONE, model.safeguardMode()); + Assertions.assertEquals("kyhkobopg", model.targetClusterVersion()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CommandOutputOverrideTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CommandOutputOverrideTests.java index ca082a429502..2e61b954c281 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CommandOutputOverrideTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CommandOutputOverrideTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -15,14 +15,13 @@ public final class CommandOutputOverrideTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CommandOutputOverride model = BinaryData.fromString( - "{\"associatedIdentity\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"ftwwaezkojvdc\"},\"commandOutputType\":\"BareMetalMachineRunDataExtractsRestricted\",\"containerUrl\":\"qouicybxarzgsz\"}") + "{\"associatedIdentity\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"wkqnyhg\"},\"commandOutputType\":\"BareMetalMachineRunCommand\",\"containerUrl\":\"jivfxzsjabib\"}") .toObject(CommandOutputOverride.class); Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, model.associatedIdentity().identityType()); - Assertions.assertEquals("ftwwaezkojvdc", model.associatedIdentity().userAssignedIdentityResourceId()); - Assertions.assertEquals(CommandOutputType.BARE_METAL_MACHINE_RUN_DATA_EXTRACTS_RESTRICTED, - model.commandOutputType()); - Assertions.assertEquals("qouicybxarzgsz", model.containerUrl()); + Assertions.assertEquals("wkqnyhg", model.associatedIdentity().userAssignedIdentityResourceId()); + Assertions.assertEquals(CommandOutputType.BARE_METAL_MACHINE_RUN_COMMAND, model.commandOutputType()); + Assertions.assertEquals("jivfxzsjabib", model.containerUrl()); } @org.junit.jupiter.api.Test @@ -30,15 +29,14 @@ public void testSerialize() throws Exception { CommandOutputOverride model = new CommandOutputOverride() .withAssociatedIdentity( new IdentitySelector().withIdentityType(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY) - .withUserAssignedIdentityResourceId("ftwwaezkojvdc")) - .withCommandOutputType(CommandOutputType.BARE_METAL_MACHINE_RUN_DATA_EXTRACTS_RESTRICTED) - .withContainerUrl("qouicybxarzgsz"); + .withUserAssignedIdentityResourceId("wkqnyhg")) + .withCommandOutputType(CommandOutputType.BARE_METAL_MACHINE_RUN_COMMAND) + .withContainerUrl("jivfxzsjabib"); model = BinaryData.fromObject(model).toObject(CommandOutputOverride.class); Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, model.associatedIdentity().identityType()); - Assertions.assertEquals("ftwwaezkojvdc", model.associatedIdentity().userAssignedIdentityResourceId()); - Assertions.assertEquals(CommandOutputType.BARE_METAL_MACHINE_RUN_DATA_EXTRACTS_RESTRICTED, - model.commandOutputType()); - Assertions.assertEquals("qouicybxarzgsz", model.containerUrl()); + Assertions.assertEquals("wkqnyhg", model.associatedIdentity().userAssignedIdentityResourceId()); + Assertions.assertEquals(CommandOutputType.BARE_METAL_MACHINE_RUN_COMMAND, model.commandOutputType()); + Assertions.assertEquals("jivfxzsjabib", model.containerUrl()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CommandOutputSettingsTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CommandOutputSettingsTests.java index 484057cdcca7..319efb98fb1b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CommandOutputSettingsTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/CommandOutputSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -17,18 +17,19 @@ public final class CommandOutputSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CommandOutputSettings model = BinaryData.fromString( - "{\"associatedIdentity\":{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"etaebu\"},\"containerUrl\":\"vdmovsmzlxwabm\",\"overrides\":[{\"associatedIdentity\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"rvtp\"},\"commandOutputType\":\"StorageRunReadCommands\",\"containerUrl\":\"mqlgk\"},{\"associatedIdentity\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"oaongbjc\"},\"commandOutputType\":\"BareMetalMachineRunDataExtractsRestricted\",\"containerUrl\":\"i\"}]}") + "{\"associatedIdentity\":{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"itykhevx\"},\"containerUrl\":\"edcpnmdyodnwzxl\",\"overrides\":[{\"associatedIdentity\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"tiugcxnav\"},\"commandOutputType\":\"StorageRunReadCommands\",\"containerUrl\":\"ibyqunyowxwlmdj\"},{\"associatedIdentity\":{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"bvfvpdbod\"},\"commandOutputType\":\"BareMetalMachineRunReadCommands\",\"containerUrl\":\"sjq\"},{\"associatedIdentity\":{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"ibdeibq\"},\"commandOutputType\":\"ClusterSupportAdministrativeActions\",\"containerUrl\":\"ghvxndzwmkrefa\"}]}") .toObject(CommandOutputSettings.class); Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, model.associatedIdentity().identityType()); - Assertions.assertEquals("etaebu", model.associatedIdentity().userAssignedIdentityResourceId()); - Assertions.assertEquals("vdmovsmzlxwabm", model.containerUrl()); + Assertions.assertEquals("itykhevx", model.associatedIdentity().userAssignedIdentityResourceId()); + Assertions.assertEquals("edcpnmdyodnwzxl", model.containerUrl()); Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, model.overrides().get(0).associatedIdentity().identityType()); - Assertions.assertEquals("rvtp", model.overrides().get(0).associatedIdentity().userAssignedIdentityResourceId()); + Assertions.assertEquals("tiugcxnav", + model.overrides().get(0).associatedIdentity().userAssignedIdentityResourceId()); Assertions.assertEquals(CommandOutputType.STORAGE_RUN_READ_COMMANDS, model.overrides().get(0).commandOutputType()); - Assertions.assertEquals("mqlgk", model.overrides().get(0).containerUrl()); + Assertions.assertEquals("ibyqunyowxwlmdj", model.overrides().get(0).containerUrl()); } @org.junit.jupiter.api.Test @@ -36,31 +37,38 @@ public void testSerialize() throws Exception { CommandOutputSettings model = new CommandOutputSettings() .withAssociatedIdentity( new IdentitySelector().withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) - .withUserAssignedIdentityResourceId("etaebu")) - .withContainerUrl("vdmovsmzlxwabm") + .withUserAssignedIdentityResourceId("itykhevx")) + .withContainerUrl("edcpnmdyodnwzxl") .withOverrides(Arrays.asList( new CommandOutputOverride() .withAssociatedIdentity(new IdentitySelector() .withIdentityType(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY) - .withUserAssignedIdentityResourceId("rvtp")) + .withUserAssignedIdentityResourceId("tiugcxnav")) .withCommandOutputType(CommandOutputType.STORAGE_RUN_READ_COMMANDS) - .withContainerUrl("mqlgk"), + .withContainerUrl("ibyqunyowxwlmdj"), + new CommandOutputOverride() + .withAssociatedIdentity(new IdentitySelector() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId("bvfvpdbod")) + .withCommandOutputType(CommandOutputType.BARE_METAL_MACHINE_RUN_READ_COMMANDS) + .withContainerUrl("sjq"), new CommandOutputOverride() .withAssociatedIdentity(new IdentitySelector() .withIdentityType(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY) - .withUserAssignedIdentityResourceId("oaongbjc")) - .withCommandOutputType(CommandOutputType.BARE_METAL_MACHINE_RUN_DATA_EXTRACTS_RESTRICTED) - .withContainerUrl("i"))); + .withUserAssignedIdentityResourceId("ibdeibq")) + .withCommandOutputType(CommandOutputType.CLUSTER_SUPPORT_ADMINISTRATIVE_ACTIONS) + .withContainerUrl("ghvxndzwmkrefa"))); model = BinaryData.fromObject(model).toObject(CommandOutputSettings.class); Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, model.associatedIdentity().identityType()); - Assertions.assertEquals("etaebu", model.associatedIdentity().userAssignedIdentityResourceId()); - Assertions.assertEquals("vdmovsmzlxwabm", model.containerUrl()); + Assertions.assertEquals("itykhevx", model.associatedIdentity().userAssignedIdentityResourceId()); + Assertions.assertEquals("edcpnmdyodnwzxl", model.containerUrl()); Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, model.overrides().get(0).associatedIdentity().identityType()); - Assertions.assertEquals("rvtp", model.overrides().get(0).associatedIdentity().userAssignedIdentityResourceId()); + Assertions.assertEquals("tiugcxnav", + model.overrides().get(0).associatedIdentity().userAssignedIdentityResourceId()); Assertions.assertEquals(CommandOutputType.STORAGE_RUN_READ_COMMANDS, model.overrides().get(0).commandOutputType()); - Assertions.assertEquals("mqlgk", model.overrides().get(0).containerUrl()); + Assertions.assertEquals("ibyqunyowxwlmdj", model.overrides().get(0).containerUrl()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/EgressEndpointTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/EgressEndpointTests.java index 932299ddad0d..6f2cf2cd23ea 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/EgressEndpointTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/EgressEndpointTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,22 +14,25 @@ public final class EgressEndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EgressEndpoint model = BinaryData.fromString( - "{\"category\":\"ahvljuaha\",\"endpoints\":[{\"domainName\":\"hcdhmdual\",\"port\":495813413204095798},{\"domainName\":\"pvfadmwsrcr\",\"port\":5411587900664634399}]}") + "{\"category\":\"ftguv\",\"endpoints\":[{\"domainName\":\"uhprwmdyvxqt\",\"port\":7866554672769434254},{\"domainName\":\"ww\",\"port\":7269998904219193773},{\"domainName\":\"bexrmcq\",\"port\":6144174767385086572},{\"domainName\":\"nojvknmefqsg\",\"port\":2097123359842677496}]}") .toObject(EgressEndpoint.class); - Assertions.assertEquals("ahvljuaha", model.category()); - Assertions.assertEquals("hcdhmdual", model.endpoints().get(0).domainName()); - Assertions.assertEquals(495813413204095798L, model.endpoints().get(0).port()); + Assertions.assertEquals("ftguv", model.category()); + Assertions.assertEquals("uhprwmdyvxqt", model.endpoints().get(0).domainName()); + Assertions.assertEquals(7866554672769434254L, model.endpoints().get(0).port()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EgressEndpoint model = new EgressEndpoint().withCategory("ahvljuaha") - .withEndpoints( - Arrays.asList(new EndpointDependency().withDomainName("hcdhmdual").withPort(495813413204095798L), - new EndpointDependency().withDomainName("pvfadmwsrcr").withPort(5411587900664634399L))); + EgressEndpoint model + = new EgressEndpoint().withCategory("ftguv") + .withEndpoints(Arrays.asList( + new EndpointDependency().withDomainName("uhprwmdyvxqt").withPort(7866554672769434254L), + new EndpointDependency().withDomainName("ww").withPort(7269998904219193773L), + new EndpointDependency().withDomainName("bexrmcq").withPort(6144174767385086572L), + new EndpointDependency().withDomainName("nojvknmefqsg").withPort(2097123359842677496L))); model = BinaryData.fromObject(model).toObject(EgressEndpoint.class); - Assertions.assertEquals("ahvljuaha", model.category()); - Assertions.assertEquals("hcdhmdual", model.endpoints().get(0).domainName()); - Assertions.assertEquals(495813413204095798L, model.endpoints().get(0).port()); + Assertions.assertEquals("ftguv", model.category()); + Assertions.assertEquals("uhprwmdyvxqt", model.endpoints().get(0).domainName()); + Assertions.assertEquals(7866554672769434254L, model.endpoints().get(0).port()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/EndpointDependencyTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/EndpointDependencyTests.java index b0eb153594ec..0c5fe4dd0f58 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/EndpointDependencyTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/EndpointDependencyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,17 +11,17 @@ public final class EndpointDependencyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EndpointDependency model = BinaryData.fromString("{\"domainName\":\"vgomz\",\"port\":8511094552590420060}") + EndpointDependency model = BinaryData.fromString("{\"domainName\":\"apj\",\"port\":6014757460282216799}") .toObject(EndpointDependency.class); - Assertions.assertEquals("vgomz", model.domainName()); - Assertions.assertEquals(8511094552590420060L, model.port()); + Assertions.assertEquals("apj", model.domainName()); + Assertions.assertEquals(6014757460282216799L, model.port()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EndpointDependency model = new EndpointDependency().withDomainName("vgomz").withPort(8511094552590420060L); + EndpointDependency model = new EndpointDependency().withDomainName("apj").withPort(6014757460282216799L); model = BinaryData.fromObject(model).toObject(EndpointDependency.class); - Assertions.assertEquals("vgomz", model.domainName()); - Assertions.assertEquals(8511094552590420060L, model.port()); + Assertions.assertEquals("apj", model.domainName()); + Assertions.assertEquals(6014757460282216799L, model.port()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ExtendedLocationTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ExtendedLocationTests.java index f077afbca999..2953c6d071fc 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ExtendedLocationTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ExtendedLocationTests.java @@ -1,27 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import org.junit.jupiter.api.Assertions; public final class ExtendedLocationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExtendedLocation model = BinaryData.fromString("{\"name\":\"gjzzdatqxhocdg\",\"type\":\"ablgphuticndvk\"}") + ExtendedLocation model = BinaryData.fromString("{\"name\":\"rtumkdosvq\",\"type\":\"CustomLocation\"}") .toObject(ExtendedLocation.class); - Assertions.assertEquals("gjzzdatqxhocdg", model.name()); - Assertions.assertEquals("ablgphuticndvk", model.type()); + Assertions.assertEquals("rtumkdosvq", model.name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExtendedLocation model = new ExtendedLocation().withName("gjzzdatqxhocdg").withType("ablgphuticndvk"); + ExtendedLocation model + = new ExtendedLocation().withName("rtumkdosvq").withType(ExtendedLocationType.CUSTOM_LOCATION); model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("gjzzdatqxhocdg", model.name()); - Assertions.assertEquals("ablgphuticndvk", model.type()); + Assertions.assertEquals("rtumkdosvq", model.name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.type()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/FeatureStatusTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/FeatureStatusTests.java index 99025ef84722..459d959e7344 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/FeatureStatusTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/FeatureStatusTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class FeatureStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeatureStatus model = BinaryData.fromString( - "{\"detailedStatus\":\"Failed\",\"detailedStatusMessage\":\"ukyhejhzis\",\"name\":\"fpel\",\"version\":\"p\"}") + "{\"detailedStatus\":\"Unknown\",\"detailedStatusMessage\":\"mbtxhwgf\",\"name\":\"rtawcoezb\",\"version\":\"ubskhudygoookkq\"}") .toObject(FeatureStatus.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureStatus model = new FeatureStatus(); - model = BinaryData.fromObject(model).toObject(FeatureStatus.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/FilterDevicesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/FilterDevicesTests.java new file mode 100644 index 000000000000..765fcb934633 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/FilterDevicesTests.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.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.models.FilterDevices; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class FilterDevicesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FilterDevices model = BinaryData.fromString( + "{\"bareMetalMachineNames\":[\"npwzcjaes\",\"vvsccyajguq\",\"hwyg\",\"lvdnkfx\"],\"rackNames\":[\"mdwzrmuhapfcqdps\",\"xqv\",\"svuo\",\"mgccelvezrypq\"]}") + .toObject(FilterDevices.class); + Assertions.assertEquals("npwzcjaes", model.bareMetalMachineNames().get(0)); + Assertions.assertEquals("mdwzrmuhapfcqdps", model.rackNames().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FilterDevices model = new FilterDevices() + .withBareMetalMachineNames(Arrays.asList("npwzcjaes", "vvsccyajguq", "hwyg", "lvdnkfx")) + .withRackNames(Arrays.asList("mdwzrmuhapfcqdps", "xqv", "svuo", "mgccelvezrypq")); + model = BinaryData.fromObject(model).toObject(FilterDevices.class); + Assertions.assertEquals("npwzcjaes", model.bareMetalMachineNames().get(0)); + Assertions.assertEquals("mdwzrmuhapfcqdps", model.rackNames().get(0)); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/HardwareInventoryNetworkInterfaceTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/HardwareInventoryNetworkInterfaceTests.java index 1d7f0957d5da..31fee52672b6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/HardwareInventoryNetworkInterfaceTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/HardwareInventoryNetworkInterfaceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class HardwareInventoryNetworkInterfaceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HardwareInventoryNetworkInterface model = BinaryData.fromString( - "{\"linkStatus\":\"zrkgqhcjrefovg\",\"macAddress\":\"qsl\",\"name\":\"yvxyqjp\",\"networkInterfaceId\":\"attpngjcrcczsq\"}") + "{\"linkStatus\":\"jmvxie\",\"macAddress\":\"ugidyjrr\",\"name\":\"y\",\"networkInterfaceId\":\"svexcsonpclhoco\"}") .toObject(HardwareInventoryNetworkInterface.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HardwareInventoryNetworkInterface model = new HardwareInventoryNetworkInterface(); - model = BinaryData.fromObject(model).toObject(HardwareInventoryNetworkInterface.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/HardwareInventoryTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/HardwareInventoryTests.java index fc763dd2ea7e..a8cc4279b360 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/HardwareInventoryTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/HardwareInventoryTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class HardwareInventoryTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HardwareInventory model = BinaryData.fromString( - "{\"additionalHostInformation\":\"qfbow\",\"interfaces\":[{\"linkStatus\":\"yktz\",\"macAddress\":\"u\",\"name\":\"wgqyw\",\"networkInterfaceId\":\"drvyn\"},{\"linkStatus\":\"gpphrcgyn\",\"macAddress\":\"cpecfvmmcoofs\",\"name\":\"zevgb\",\"networkInterfaceId\":\"jqabcypmivkwlzuv\"},{\"linkStatus\":\"fwnfnb\",\"macAddress\":\"fionl\",\"name\":\"x\",\"networkInterfaceId\":\"qgtz\"},{\"linkStatus\":\"pnqbqqwxrjfe\",\"macAddress\":\"lnwsubisn\",\"name\":\"mpmngnzscxaqwoo\",\"networkInterfaceId\":\"cbonqvpk\"}],\"nics\":[{\"lldpNeighbor\":{\"portDescription\":\"jease\",\"portName\":\"heoflokeyyienjbd\",\"systemDescription\":\"tgrhpdjpjumas\",\"systemName\":\"zj\"},\"macAddress\":\"yegu\",\"name\":\"hb\"},{\"lldpNeighbor\":{\"portDescription\":\"e\",\"portName\":\"zzvdudgwds\",\"systemDescription\":\"hotwmcynpwlbjnp\",\"systemName\":\"cftadeh\"},\"macAddress\":\"ltyfsop\",\"name\":\"suesnzw\"},{\"lldpNeighbor\":{\"portDescription\":\"bavo\",\"portName\":\"zdmohctbqvu\",\"systemDescription\":\"xdn\",\"systemName\":\"vo\"},\"macAddress\":\"ujjugwdkcglh\",\"name\":\"azjdyggd\"},{\"lldpNeighbor\":{\"portDescription\":\"xhbkuofq\",\"portName\":\"yk\",\"systemDescription\":\"enevfyexfwhybci\",\"systemName\":\"yvdcsitynnaa\"},\"macAddress\":\"ectehf\",\"name\":\"scjeypv\"}]}") + "{\"additionalHostInformation\":\"u\",\"interfaces\":[{\"linkStatus\":\"fu\",\"macAddress\":\"aodsfcpkv\",\"name\":\"dpuozmyz\",\"networkInterfaceId\":\"agfuaxbezyiu\"},{\"linkStatus\":\"ktwh\",\"macAddress\":\"xw\",\"name\":\"wqsmbsur\",\"networkInterfaceId\":\"imoryocfsfksym\"},{\"linkStatus\":\"ys\",\"macAddress\":\"i\",\"name\":\"xhqyudxorrqnb\",\"networkInterfaceId\":\"czvyifq\"},{\"linkStatus\":\"kdvjsll\",\"macAddress\":\"vvdfwatkpnpul\",\"name\":\"xbczwtruwiqz\",\"networkInterfaceId\":\"j\"}],\"nics\":[{\"lldpNeighbor\":{\"portDescription\":\"yokacspkw\",\"portName\":\"zdobpxjmflbvvnch\",\"systemDescription\":\"cciw\",\"systemName\":\"juqk\"},\"macAddress\":\"sa\",\"name\":\"wkuofoskghsauu\"}]}") .toObject(HardwareInventory.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HardwareInventory model = new HardwareInventory(); - model = BinaryData.fromObject(model).toObject(HardwareInventory.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/HardwareValidationStatusTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/HardwareValidationStatusTests.java index 6728d65964cc..bcc6fa3225c2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/HardwareValidationStatusTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/HardwareValidationStatusTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class HardwareValidationStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HardwareValidationStatus model - = BinaryData.fromString("{\"lastValidationTime\":\"2021-02-16T11:08:22Z\",\"result\":\"Pass\"}") + = BinaryData.fromString("{\"lastValidationTime\":\"2021-05-28T21:07:43Z\",\"result\":\"Fail\"}") .toObject(HardwareValidationStatus.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HardwareValidationStatus model = new HardwareValidationStatus(); - model = BinaryData.fromObject(model).toObject(HardwareValidationStatus.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/IdentitySelectorTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/IdentitySelectorTests.java index 2285c55dc2e3..1682a8ab3ba1 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/IdentitySelectorTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/IdentitySelectorTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,20 +13,19 @@ public final class IdentitySelectorTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IdentitySelector model = BinaryData - .fromString( - "{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"jaltolmnc\"}") + .fromString("{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"ehtwdwrft\"}") .toObject(IdentitySelector.class); - Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, model.identityType()); - Assertions.assertEquals("jaltolmnc", model.userAssignedIdentityResourceId()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, model.identityType()); + Assertions.assertEquals("ehtwdwrft", model.userAssignedIdentityResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { IdentitySelector model - = new IdentitySelector().withIdentityType(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY) - .withUserAssignedIdentityResourceId("jaltolmnc"); + = new IdentitySelector().withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId("ehtwdwrft"); model = BinaryData.fromObject(model).toObject(IdentitySelector.class); - Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, model.identityType()); - Assertions.assertEquals("jaltolmnc", model.userAssignedIdentityResourceId()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, model.identityType()); + Assertions.assertEquals("ehtwdwrft", model.userAssignedIdentityResourceId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/IpAddressPoolTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/IpAddressPoolTests.java index edbabb7cde61..7a44340faaac 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/IpAddressPoolTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/IpAddressPoolTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,25 +14,24 @@ public final class IpAddressPoolTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpAddressPool model = BinaryData.fromString( - "{\"addresses\":[\"jejveg\",\"hbpnaixexccbd\",\"eaxhcexdrrvqahqk\"],\"autoAssign\":\"True\",\"name\":\"pwijnhy\",\"onlyUseHostIps\":\"True\"}") + "{\"addresses\":[\"gx\",\"wrck\"],\"autoAssign\":\"True\",\"name\":\"lyhpluodpvruud\",\"onlyUseHostIps\":\"True\"}") .toObject(IpAddressPool.class); - Assertions.assertEquals("jejveg", model.addresses().get(0)); + Assertions.assertEquals("gx", model.addresses().get(0)); Assertions.assertEquals(BfdEnabled.TRUE, model.autoAssign()); - Assertions.assertEquals("pwijnhy", model.name()); + Assertions.assertEquals("lyhpluodpvruud", model.name()); Assertions.assertEquals(BfdEnabled.TRUE, model.onlyUseHostIps()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpAddressPool model - = new IpAddressPool().withAddresses(Arrays.asList("jejveg", "hbpnaixexccbd", "eaxhcexdrrvqahqk")) - .withAutoAssign(BfdEnabled.TRUE) - .withName("pwijnhy") - .withOnlyUseHostIps(BfdEnabled.TRUE); + IpAddressPool model = new IpAddressPool().withAddresses(Arrays.asList("gx", "wrck")) + .withAutoAssign(BfdEnabled.TRUE) + .withName("lyhpluodpvruud") + .withOnlyUseHostIps(BfdEnabled.TRUE); model = BinaryData.fromObject(model).toObject(IpAddressPool.class); - Assertions.assertEquals("jejveg", model.addresses().get(0)); + Assertions.assertEquals("gx", model.addresses().get(0)); Assertions.assertEquals(BfdEnabled.TRUE, model.autoAssign()); - Assertions.assertEquals("pwijnhy", model.name()); + Assertions.assertEquals("lyhpluodpvruud", model.name()); Assertions.assertEquals(BfdEnabled.TRUE, model.onlyUseHostIps()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KeySetUserStatusTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KeySetUserStatusTests.java index 7c79c758de33..3d04b5d174d6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KeySetUserStatusTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KeySetUserStatusTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,8 @@ public final class KeySetUserStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { KeySetUserStatus model = BinaryData - .fromString("{\"azureUserName\":\"guamlj\",\"status\":\"Invalid\",\"statusMessage\":\"msplzgaufcshhvn\"}") + .fromString( + "{\"azureUserName\":\"zdcgdzbenr\",\"status\":\"Invalid\",\"statusMessage\":\"wetzqddtjwfljh\"}") .toObject(KeySetUserStatus.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KeySetUserStatus model = new KeySetUserStatus(); - model = BinaryData.fromObject(model).toObject(KeySetUserStatus.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterRestartNodeParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterRestartNodeParametersTests.java index d100b8283a3b..9d143cd05d70 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterRestartNodeParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesClusterRestartNodeParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,16 +11,16 @@ public final class KubernetesClusterRestartNodeParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - KubernetesClusterRestartNodeParameters model = BinaryData.fromString("{\"nodeName\":\"bklqpxz\"}") + KubernetesClusterRestartNodeParameters model = BinaryData.fromString("{\"nodeName\":\"rxgibbd\"}") .toObject(KubernetesClusterRestartNodeParameters.class); - Assertions.assertEquals("bklqpxz", model.nodeName()); + Assertions.assertEquals("rxgibbd", model.nodeName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { KubernetesClusterRestartNodeParameters model - = new KubernetesClusterRestartNodeParameters().withNodeName("bklqpxz"); + = new KubernetesClusterRestartNodeParameters().withNodeName("rxgibbd"); model = BinaryData.fromObject(model).toObject(KubernetesClusterRestartNodeParameters.class); - Assertions.assertEquals("bklqpxz", model.nodeName()); + Assertions.assertEquals("rxgibbd", model.nodeName()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionInnerTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionInnerTests.java new file mode 100644 index 000000000000..234abfe3e92c --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionInnerTests.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.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.fluent.models.KubernetesVersionInner; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class KubernetesVersionInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + KubernetesVersionInner model = BinaryData.fromString( + "{\"properties\":{\"values\":[{\"description\":\"nfo\",\"version\":\"uors\"},{\"description\":\"okwbqplh\",\"version\":\"nuuepzlrp\"},{\"description\":\"zsoldwey\",\"version\":\"dunvmnnrwrbiorkt\"}],\"provisioningState\":\"Failed\"},\"etag\":\"jhhgdnhxmsi\",\"extendedLocation\":{\"name\":\"fomiloxgg\",\"type\":\"CustomLocation\"},\"location\":\"iqndieuzaofj\",\"tags\":{\"ubiipuipwoqonma\":\"cyyysfgdot\"},\"id\":\"jeknizshq\",\"name\":\"cimpevfg\",\"type\":\"b\"}") + .toObject(KubernetesVersionInner.class); + Assertions.assertEquals("iqndieuzaofj", model.location()); + Assertions.assertEquals("cyyysfgdot", model.tags().get("ubiipuipwoqonma")); + Assertions.assertEquals("fomiloxgg", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.extendedLocation().type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + KubernetesVersionInner model = new KubernetesVersionInner().withLocation("iqndieuzaofj") + .withTags(mapOf("ubiipuipwoqonma", "cyyysfgdot")) + .withExtendedLocation( + new ExtendedLocation().withName("fomiloxgg").withType(ExtendedLocationType.CUSTOM_LOCATION)); + model = BinaryData.fromObject(model).toObject(KubernetesVersionInner.class); + Assertions.assertEquals("iqndieuzaofj", model.location()); + Assertions.assertEquals("cyyysfgdot", model.tags().get("ubiipuipwoqonma")); + Assertions.assertEquals("fomiloxgg", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.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/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionListTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionListTests.java new file mode 100644 index 000000000000..905f8ee903fb --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionListTests.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.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.implementation.models.KubernetesVersionList; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; +import org.junit.jupiter.api.Assertions; + +public final class KubernetesVersionListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + KubernetesVersionList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"values\":[{\"description\":\"izqzdwlvwlyou\",\"version\":\"gfbkjubdyh\"},{\"description\":\"fminsgowzf\",\"version\":\"sttktlahbqa\"},{\"description\":\"xtgzukxitmmqtgqq\",\"version\":\"hrnxrxc\"}],\"provisioningState\":\"Canceled\"},\"etag\":\"savokqdzf\",\"extendedLocation\":{\"name\":\"azivjlfrqttbajl\",\"type\":\"CustomLocation\"},\"location\":\"nwxyiop\",\"tags\":{\"cxkdmligovi\":\"qqfkuv\",\"goorbteo\":\"rxkpmloazuruoc\"},\"id\":\"bfhjxakvvjgsl\",\"name\":\"r\",\"type\":\"il\"},{\"properties\":{\"values\":[{\"description\":\"t\",\"version\":\"kxn\"},{\"description\":\"dabg\",\"version\":\"udtjuewbc\"}],\"provisioningState\":\"Canceled\"},\"etag\":\"uwhcjyxccybv\",\"extendedLocation\":{\"name\":\"ayakkudzpx\",\"type\":\"EdgeZone\"},\"location\":\"plmag\",\"tags\":{\"jkmnwq\":\"yohpfkyrkdbdgiog\",\"m\":\"nobaiyhddviacegf\",\"vbalxlllc\":\"tfpmvmemfnczdw\",\"ukuv\":\"podbzevwrdnh\"},\"id\":\"jcswsmys\",\"name\":\"uluqypfc\",\"type\":\"lerchpq\"}],\"nextLink\":\"f\"}") + .toObject(KubernetesVersionList.class); + Assertions.assertEquals("nwxyiop", model.value().get(0).location()); + Assertions.assertEquals("qqfkuv", model.value().get(0).tags().get("cxkdmligovi")); + Assertions.assertEquals("azivjlfrqttbajl", model.value().get(0).extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); + Assertions.assertEquals("f", model.nextLink()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionPatchParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionPatchParametersTests.java new file mode 100644 index 000000000000..cd6d22c15c09 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionPatchParametersTests.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.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.models.KubernetesVersionPatchParameters; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class KubernetesVersionPatchParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + KubernetesVersionPatchParameters model = BinaryData.fromString("{\"tags\":{\"cgxxlxs\":\"mlqoljx\"}}") + .toObject(KubernetesVersionPatchParameters.class); + Assertions.assertEquals("mlqoljx", model.tags().get("cgxxlxs")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + KubernetesVersionPatchParameters model + = new KubernetesVersionPatchParameters().withTags(mapOf("cgxxlxs", "mlqoljx")); + model = BinaryData.fromObject(model).toObject(KubernetesVersionPatchParameters.class); + Assertions.assertEquals("mlqoljx", model.tags().get("cgxxlxs")); + } + + // 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/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionPropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionPropertiesTests.java new file mode 100644 index 000000000000..f8cc550180f9 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionPropertiesTests.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.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.fluent.models.KubernetesVersionProperties; + +public final class KubernetesVersionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + KubernetesVersionProperties model = BinaryData.fromString( + "{\"values\":[{\"description\":\"lbywdxsm\",\"version\":\"cwrwfs\"},{\"description\":\"fnynszqujizdvoqy\",\"version\":\"byowbblgyavutp\"}],\"provisioningState\":\"Canceled\"}") + .toObject(KubernetesVersionProperties.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + KubernetesVersionProperties model = new KubernetesVersionProperties(); + model = BinaryData.fromObject(model).toObject(KubernetesVersionProperties.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionValueTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionValueTests.java new file mode 100644 index 000000000000..7088937dab0a --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionValueTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.models.KubernetesVersionValue; + +public final class KubernetesVersionValueTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + KubernetesVersionValue model = BinaryData.fromString("{\"description\":\"xoi\",\"version\":\"sks\"}") + .toObject(KubernetesVersionValue.class); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsCreateOrUpdateMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..c58b72caeae3 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsCreateOrUpdateMockTests.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.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.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; +import com.azure.resourcemanager.networkcloud.models.KubernetesVersion; +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 KubernetesVersionsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"values\":[{\"description\":\"vpaklozkxbz\",\"version\":\"ejpl\"}],\"provisioningState\":\"Succeeded\"},\"etag\":\"bttt\",\"extendedLocation\":{\"name\":\"gs\",\"type\":\"CustomLocation\"},\"location\":\"nrswgkpjhboyik\",\"tags\":{\"lokhueoijyzcqyp\":\"uhkslg\",\"xptpqaya\":\"qzufgsyfejyvdwt\",\"cf\":\"k\"},\"id\":\"ybmx\",\"name\":\"nxocuul\",\"type\":\"ojkpoyh\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetworkCloudManager manager = NetworkCloudManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + KubernetesVersion response = manager.kubernetesVersions() + .define("aedrympmlqoin") + .withRegion("bafo") + .withExistingResourceGroup("sqywwwmhkru") + .withExtendedLocation(new ExtendedLocation().withName("swhgsaodk").withType(ExtendedLocationType.EDGE_ZONE)) + .withTags(mapOf("nvkervq", "hzhaquvwsxb", "pabdsrg", "hoadhrsxqvzv")) + .withIfMatch("uwdxvqzxoebwgj") + .withIfNoneMatch("bibanbau") + .create(); + + Assertions.assertEquals("nrswgkpjhboyik", response.location()); + Assertions.assertEquals("uhkslg", response.tags().get("lokhueoijyzcqyp")); + Assertions.assertEquals("gs", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.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/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsGetByResourceGroupWithResponseMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsGetByResourceGroupWithResponseMockTests.java new file mode 100644 index 000000000000..ea70b048ac1d --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsGetByResourceGroupWithResponseMockTests.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.networkcloud.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.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; +import com.azure.resourcemanager.networkcloud.models.KubernetesVersion; +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 KubernetesVersionsGetByResourceGroupWithResponseMockTests { + @Test + public void testGetByResourceGroupWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"values\":[{\"description\":\"wzdanojisgglmvo\",\"version\":\"tuz\"},{\"description\":\"ctibpvbka\",\"version\":\"xsmzygdf\"},{\"description\":\"kwseivmakxhyso\",\"version\":\"juxlkbectvtfjm\"}],\"provisioningState\":\"Failed\"},\"etag\":\"hmaiubavlzwpvg\",\"extendedLocation\":{\"name\":\"falkzazm\",\"type\":\"EdgeZone\"},\"location\":\"e\",\"tags\":{\"etw\":\"qafkmkrokzrth\",\"iezeagm\":\"qrtvaoznqni\",\"lzmb\":\"eituugedhfpjs\"},\"id\":\"syjdeolctae\",\"name\":\"fsyrledjc\",\"type\":\"stbvtqig\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetworkCloudManager manager = NetworkCloudManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + KubernetesVersion response = manager.kubernetesVersions() + .getByResourceGroupWithResponse("ltxkpb", "hvfdqqj", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("e", response.location()); + Assertions.assertEquals("qafkmkrokzrth", response.tags().get("etw")); + Assertions.assertEquals("falkzazm", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, response.extendedLocation().type()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsListByResourceGroupMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsListByResourceGroupMockTests.java new file mode 100644 index 000000000000..1504e4f50f44 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsListByResourceGroupMockTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.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.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; +import com.azure.resourcemanager.networkcloud.models.KubernetesVersion; +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 KubernetesVersionsListByResourceGroupMockTests { + @Test + public void testListByResourceGroup() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"values\":[{\"description\":\"es\",\"version\":\"fjlpze\"},{\"description\":\"oyrplixl\",\"version\":\"mllpquevhamfowg\"},{\"description\":\"tmk\",\"version\":\"xpk\"}],\"provisioningState\":\"Canceled\"},\"etag\":\"xofqovchi\",\"extendedLocation\":{\"name\":\"bplvfidu\",\"type\":\"CustomLocation\"},\"location\":\"ekxbyjg\",\"tags\":{\"x\":\"e\",\"dagrhrdicxdw\":\"ihpq\",\"vcxjsgbipcukdvek\":\"jfowxwy\",\"scrdp\":\"buhoduchv\"},\"id\":\"bfdyjduss\",\"name\":\"yszekbhwlka\",\"type\":\"ggkrehbf\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetworkCloudManager manager = NetworkCloudManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.kubernetesVersions() + .listByResourceGroup("xzvsgeafgf", 729939553, "ehxlzsxezppk", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("ekxbyjg", response.iterator().next().location()); + Assertions.assertEquals("e", response.iterator().next().tags().get("x")); + Assertions.assertEquals("bplvfidu", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, + response.iterator().next().extendedLocation().type()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsListMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsListMockTests.java new file mode 100644 index 000000000000..2a66d6b79105 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/KubernetesVersionsListMockTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.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.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; +import com.azure.resourcemanager.networkcloud.models.KubernetesVersion; +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 KubernetesVersionsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"values\":[{\"description\":\"g\",\"version\":\"taadu\"}],\"provisioningState\":\"Accepted\"},\"etag\":\"xfavsqwudoh\",\"extendedLocation\":{\"name\":\"i\",\"type\":\"CustomLocation\"},\"location\":\"nl\",\"tags\":{\"yqgs\":\"simsfeypofqpmb\",\"gerhsmvg\":\"rmmttjxop\"},\"id\":\"htwzmqilr\",\"name\":\"xy\",\"type\":\"fni\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetworkCloudManager manager = NetworkCloudManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.kubernetesVersions().list(220884022, "uybffljfiim", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("nl", response.iterator().next().location()); + Assertions.assertEquals("simsfeypofqpmb", response.iterator().next().tags().get("yqgs")); + Assertions.assertEquals("i", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, + response.iterator().next().extendedLocation().type()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkAttachmentConfigurationTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkAttachmentConfigurationTests.java index 3c4644c5b858..78a53a6d911a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkAttachmentConfigurationTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkAttachmentConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,18 +13,18 @@ public final class L2NetworkAttachmentConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L2NetworkAttachmentConfiguration model - = BinaryData.fromString("{\"networkId\":\"vpdbodaciz\",\"pluginType\":\"DPDK\"}") + = BinaryData.fromString("{\"networkId\":\"z\",\"pluginType\":\"IPVLAN\"}") .toObject(L2NetworkAttachmentConfiguration.class); - Assertions.assertEquals("vpdbodaciz", model.networkId()); - Assertions.assertEquals(KubernetesPluginType.DPDK, model.pluginType()); + Assertions.assertEquals("z", model.networkId()); + Assertions.assertEquals(KubernetesPluginType.IPVLAN, model.pluginType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L2NetworkAttachmentConfiguration model = new L2NetworkAttachmentConfiguration().withNetworkId("vpdbodaciz") - .withPluginType(KubernetesPluginType.DPDK); + L2NetworkAttachmentConfiguration model + = new L2NetworkAttachmentConfiguration().withNetworkId("z").withPluginType(KubernetesPluginType.IPVLAN); model = BinaryData.fromObject(model).toObject(L2NetworkAttachmentConfiguration.class); - Assertions.assertEquals("vpdbodaciz", model.networkId()); - Assertions.assertEquals(KubernetesPluginType.DPDK, model.pluginType()); + Assertions.assertEquals("z", model.networkId()); + Assertions.assertEquals(KubernetesPluginType.IPVLAN, model.pluginType()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkInnerTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkInnerTests.java index 856bab0fbebb..6b82b3ec1e2b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkInnerTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkInnerTests.java @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.networkcloud.fluent.models.L2NetworkInner; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; import java.util.HashMap; import java.util.Map; @@ -16,34 +17,34 @@ public final class L2NetworkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L2NetworkInner model = BinaryData.fromString( - "{\"etag\":\"ydv\",\"extendedLocation\":{\"name\":\"hbejdznxcvdsrhnj\",\"type\":\"volvtn\"},\"properties\":{\"associatedResourceIds\":[\"fzg\",\"mjdftu\",\"jltduceam\"],\"clusterId\":\"czu\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"wcw\",\"hybridAksClustersAssociatedIds\":[\"oknssxmojmsvpkjp\",\"vk\",\"cfzq\"],\"hybridAksPluginType\":\"SRIOV\",\"interfaceName\":\"gtczheydb\",\"l2IsolationDomainId\":\"dshmkxmaehvbbx\",\"provisioningState\":\"Succeeded\",\"virtualMachinesAssociatedIds\":[\"tfnhtbaxkgxywr\",\"kpyklyhp\",\"uodpv\"]},\"location\":\"udlgzibthostgkts\",\"tags\":{\"odqkdlwwqfb\":\"xeclzedqbcvhzlhp\",\"lmbtxhwgfwsrt\":\"mlkxtrqjfs\",\"kh\":\"wcoezbrhub\",\"ookk\":\"dyg\"},\"id\":\"fqjbvleo\",\"name\":\"fmluiqtqzfavyvn\",\"type\":\"qybaryeua\"}") + "{\"properties\":{\"hybridAksPluginType\":\"SRIOV\",\"interfaceName\":\"bwidfcxsspuunn\",\"l2IsolationDomainId\":\"xyh\",\"associatedResourceIds\":[\"qddrihpfhoqcaae\"],\"clusterId\":\"aomdjvlpjxx\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"msgeivsiykzk\",\"hybridAksClustersAssociatedIds\":[\"jdxon\"],\"virtualMachinesAssociatedIds\":[\"ggcula\",\"z\",\"y\"],\"provisioningState\":\"Succeeded\"},\"etag\":\"gtqxep\",\"extendedLocation\":{\"name\":\"ylbf\",\"type\":\"CustomLocation\"},\"location\":\"lyjt\",\"tags\":{\"cib\":\"fqzhv\"},\"id\":\"fmo\",\"name\":\"uxrkjp\",\"type\":\"dwxf\"}") .toObject(L2NetworkInner.class); - Assertions.assertEquals("udlgzibthostgkts", model.location()); - Assertions.assertEquals("xeclzedqbcvhzlhp", model.tags().get("odqkdlwwqfb")); - Assertions.assertEquals("hbejdznxcvdsrhnj", model.extendedLocation().name()); - Assertions.assertEquals("volvtn", model.extendedLocation().type()); + Assertions.assertEquals("lyjt", model.location()); + Assertions.assertEquals("fqzhv", model.tags().get("cib")); + Assertions.assertEquals("ylbf", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.extendedLocation().type()); Assertions.assertEquals(HybridAksPluginType.SRIOV, model.hybridAksPluginType()); - Assertions.assertEquals("gtczheydb", model.interfaceName()); - Assertions.assertEquals("dshmkxmaehvbbx", model.l2IsolationDomainId()); + Assertions.assertEquals("bwidfcxsspuunn", model.interfaceName()); + Assertions.assertEquals("xyh", model.l2IsolationDomainId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L2NetworkInner model = new L2NetworkInner().withLocation("udlgzibthostgkts") - .withTags(mapOf("odqkdlwwqfb", "xeclzedqbcvhzlhp", "lmbtxhwgfwsrt", "mlkxtrqjfs", "kh", "wcoezbrhub", - "ookk", "dyg")) - .withExtendedLocation(new ExtendedLocation().withName("hbejdznxcvdsrhnj").withType("volvtn")) + L2NetworkInner model = new L2NetworkInner().withLocation("lyjt") + .withTags(mapOf("cib", "fqzhv")) + .withExtendedLocation( + new ExtendedLocation().withName("ylbf").withType(ExtendedLocationType.CUSTOM_LOCATION)) .withHybridAksPluginType(HybridAksPluginType.SRIOV) - .withInterfaceName("gtczheydb") - .withL2IsolationDomainId("dshmkxmaehvbbx"); + .withInterfaceName("bwidfcxsspuunn") + .withL2IsolationDomainId("xyh"); model = BinaryData.fromObject(model).toObject(L2NetworkInner.class); - Assertions.assertEquals("udlgzibthostgkts", model.location()); - Assertions.assertEquals("xeclzedqbcvhzlhp", model.tags().get("odqkdlwwqfb")); - Assertions.assertEquals("hbejdznxcvdsrhnj", model.extendedLocation().name()); - Assertions.assertEquals("volvtn", model.extendedLocation().type()); + Assertions.assertEquals("lyjt", model.location()); + Assertions.assertEquals("fqzhv", model.tags().get("cib")); + Assertions.assertEquals("ylbf", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.extendedLocation().type()); Assertions.assertEquals(HybridAksPluginType.SRIOV, model.hybridAksPluginType()); - Assertions.assertEquals("gtczheydb", model.interfaceName()); - Assertions.assertEquals("dshmkxmaehvbbx", model.l2IsolationDomainId()); + Assertions.assertEquals("bwidfcxsspuunn", model.interfaceName()); + Assertions.assertEquals("xyh", model.l2IsolationDomainId()); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkListTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkListTests.java index 4f899276dd9f..dae2b789e83f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkListTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkListTests.java @@ -1,77 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.networkcloud.fluent.models.L2NetworkInner; -import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.implementation.models.L2NetworkList; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; -import com.azure.resourcemanager.networkcloud.models.L2NetworkList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class L2NetworkListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L2NetworkList model = BinaryData.fromString( - "{\"nextLink\":\"qupevzh\",\"value\":[{\"etag\":\"txhojujb\",\"extendedLocation\":{\"name\":\"pelmcuvhixbjxyf\",\"type\":\"n\"},\"properties\":{\"associatedResourceIds\":[\"coolsttpkiwkkb\"],\"clusterId\":\"jrywvtylbfpnc\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"iwii\",\"hybridAksClustersAssociatedIds\":[\"ywub\",\"cbihwqk\",\"fdntwjchrdgoih\"],\"hybridAksPluginType\":\"DPDK\",\"interfaceName\":\"ctondz\",\"l2IsolationDomainId\":\"luudfdlwggytsb\",\"provisioningState\":\"Canceled\",\"virtualMachinesAssociatedIds\":[\"tgseinqfiufxqkn\",\"irgne\"]},\"location\":\"twqmsniffcdmqnr\",\"tags\":{\"k\":\"pij\",\"c\":\"xfrdd\",\"ronasxift\":\"atiz\"},\"id\":\"zq\",\"name\":\"zh\",\"type\":\"tw\"},{\"etag\":\"gogczhonnxkrlgny\",\"extendedLocation\":{\"name\":\"mossxkkgthrrghxj\",\"type\":\"dhqxvcx\"},\"properties\":{\"associatedResourceIds\":[\"pdso\",\"bshrnsvbuswd\"],\"clusterId\":\"yybyc\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"jsrtk\",\"hybridAksClustersAssociatedIds\":[\"nopqgikyzirtx\",\"yuxzejntpsewgi\",\"ilqu\",\"rydxtqm\"],\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"orgguf\",\"l2IsolationDomainId\":\"yaomtb\",\"provisioningState\":\"Failed\",\"virtualMachinesAssociatedIds\":[\"grvk\",\"fo\"]},\"location\":\"zh\",\"tags\":{\"yo\":\"ibgjmfxumvfcl\",\"fezzxscyhwzdg\":\"wxnb\",\"vp\":\"rujbzbomvzzbtdc\"},\"id\":\"iyujviylwdshfs\",\"name\":\"n\",\"type\":\"bgye\"},{\"etag\":\"ymsgaojfmwnc\",\"extendedLocation\":{\"name\":\"tmr\",\"type\":\"hirctymoxoftpipi\"},\"properties\":{\"associatedResourceIds\":[\"zuhx\",\"cpqjlihhyu\",\"pskasdvlmfwdg\",\"x\"],\"clusterId\":\"ucvpamrs\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"vxurisjnhnytxifq\",\"hybridAksClustersAssociatedIds\":[\"xmrhu\",\"lw\",\"cesutrgjupauut\"],\"hybridAksPluginType\":\"SRIOV\",\"interfaceName\":\"hihejqgwzpnfqn\",\"l2IsolationDomainId\":\"cypsxjv\",\"provisioningState\":\"Failed\",\"virtualMachinesAssociatedIds\":[\"kslircizjxvydfc\",\"acvlhv\"]},\"location\":\"dyftumrtwna\",\"tags\":{\"ojgcyzt\":\"lbiw\"},\"id\":\"fmznba\",\"name\":\"qphchqnrnrpxehuw\",\"type\":\"ykqgaifmvik\"}]}") + "{\"value\":[{\"properties\":{\"hybridAksPluginType\":\"DPDK\",\"interfaceName\":\"iykhy\",\"l2IsolationDomainId\":\"wf\",\"associatedResourceIds\":[\"b\",\"xqvkjlmxhomdyn\",\"dwdigumb\"],\"clusterId\":\"aauzzptjazysd\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"wwvaiqyuvvfonk\",\"hybridAksClustersAssociatedIds\":[\"qyikvy\",\"auy\"],\"virtualMachinesAssociatedIds\":[\"uwmncs\",\"tijfybvp\"],\"provisioningState\":\"Canceled\"},\"etag\":\"sgsgbdhu\",\"extendedLocation\":{\"name\":\"qgnjdgkynscli\",\"type\":\"CustomLocation\"},\"location\":\"vhxnk\",\"tags\":{\"hihfrbbcevqagtlt\":\"kubotppnvdxz\",\"vgtrdcnifmzzs\":\"hlfkqojpy\",\"g\":\"ymbrnysuxmpraf\"},\"id\":\"khocxvdfffwaf\",\"name\":\"roud\",\"type\":\"spave\"},{\"properties\":{\"hybridAksPluginType\":\"DPDK\",\"interfaceName\":\"kbunzoz\",\"l2IsolationDomainId\":\"dhcxgkmoy\",\"associatedResourceIds\":[\"yuibhm\",\"dnbzydvfvfcjn\"],\"clusterId\":\"oisrvhmgorffu\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"vwmzhwplefaxvxil\",\"hybridAksClustersAssociatedIds\":[\"gnhnzeyq\"],\"virtualMachinesAssociatedIds\":[\"jfzqlqhycavodgg\",\"dbeesmie\",\"nlrariaawiuagy\",\"wqfbylyrfgiagt\"],\"provisioningState\":\"Failed\"},\"etag\":\"cqwogfnzjvusfzl\",\"extendedLocation\":{\"name\":\"mozuxylfsb\",\"type\":\"CustomLocation\"},\"location\":\"dp\",\"tags\":{\"tgkbugrjqctojc\":\"wn\"},\"id\":\"isofieypefojyqd\",\"name\":\"cuplcplcwkhih\",\"type\":\"hlhzdsqtzbsrgno\"}],\"nextLink\":\"jhf\"}") .toObject(L2NetworkList.class); - Assertions.assertEquals("qupevzh", model.nextLink()); - Assertions.assertEquals("twqmsniffcdmqnr", model.value().get(0).location()); - Assertions.assertEquals("pij", model.value().get(0).tags().get("k")); - Assertions.assertEquals("pelmcuvhixbjxyf", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("n", model.value().get(0).extendedLocation().type()); + Assertions.assertEquals("vhxnk", model.value().get(0).location()); + Assertions.assertEquals("kubotppnvdxz", model.value().get(0).tags().get("hihfrbbcevqagtlt")); + Assertions.assertEquals("qgnjdgkynscli", model.value().get(0).extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); Assertions.assertEquals(HybridAksPluginType.DPDK, model.value().get(0).hybridAksPluginType()); - Assertions.assertEquals("ctondz", model.value().get(0).interfaceName()); - Assertions.assertEquals("luudfdlwggytsb", model.value().get(0).l2IsolationDomainId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L2NetworkList model = new L2NetworkList().withNextLink("qupevzh") - .withValue(Arrays.asList( - new L2NetworkInner().withLocation("twqmsniffcdmqnr") - .withTags(mapOf("k", "pij", "c", "xfrdd", "ronasxift", "atiz")) - .withExtendedLocation(new ExtendedLocation().withName("pelmcuvhixbjxyf").withType("n")) - .withHybridAksPluginType(HybridAksPluginType.DPDK) - .withInterfaceName("ctondz") - .withL2IsolationDomainId("luudfdlwggytsb"), - new L2NetworkInner().withLocation("zh") - .withTags(mapOf("yo", "ibgjmfxumvfcl", "fezzxscyhwzdg", "wxnb", "vp", "rujbzbomvzzbtdc")) - .withExtendedLocation(new ExtendedLocation().withName("mossxkkgthrrghxj").withType("dhqxvcx")) - .withHybridAksPluginType(HybridAksPluginType.OSDEVICE) - .withInterfaceName("orgguf") - .withL2IsolationDomainId("yaomtb"), - new L2NetworkInner().withLocation("dyftumrtwna") - .withTags(mapOf("ojgcyzt", "lbiw")) - .withExtendedLocation(new ExtendedLocation().withName("tmr").withType("hirctymoxoftpipi")) - .withHybridAksPluginType(HybridAksPluginType.SRIOV) - .withInterfaceName("hihejqgwzpnfqn") - .withL2IsolationDomainId("cypsxjv"))); - model = BinaryData.fromObject(model).toObject(L2NetworkList.class); - Assertions.assertEquals("qupevzh", model.nextLink()); - Assertions.assertEquals("twqmsniffcdmqnr", model.value().get(0).location()); - Assertions.assertEquals("pij", model.value().get(0).tags().get("k")); - Assertions.assertEquals("pelmcuvhixbjxyf", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("n", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(HybridAksPluginType.DPDK, model.value().get(0).hybridAksPluginType()); - Assertions.assertEquals("ctondz", model.value().get(0).interfaceName()); - Assertions.assertEquals("luudfdlwggytsb", model.value().get(0).l2IsolationDomainId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("iykhy", model.value().get(0).interfaceName()); + Assertions.assertEquals("wf", model.value().get(0).l2IsolationDomainId()); + Assertions.assertEquals("jhf", model.nextLink()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkPatchParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkPatchParametersTests.java index 25b30ed7efb4..2e038de17099 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkPatchParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkPatchParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,17 +14,17 @@ public final class L2NetworkPatchParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L2NetworkPatchParameters model = BinaryData.fromString( - "{\"tags\":{\"wxudgn\":\"feddwwnlza\",\"gpbemeluclvdjju\":\"gookrtalvnb\",\"ahhxhqfaqnvzoqg\":\"yrdnqod\"}}") + "{\"tags\":{\"vzvfvaawzqadfl\":\"pzdm\",\"riglaec\":\"z\",\"kpvzmlq\":\"ndtic\",\"npkc\":\"mldgxobfirc\"}}") .toObject(L2NetworkPatchParameters.class); - Assertions.assertEquals("feddwwnlza", model.tags().get("wxudgn")); + Assertions.assertEquals("pzdm", model.tags().get("vzvfvaawzqadfl")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { L2NetworkPatchParameters model = new L2NetworkPatchParameters() - .withTags(mapOf("wxudgn", "feddwwnlza", "gpbemeluclvdjju", "gookrtalvnb", "ahhxhqfaqnvzoqg", "yrdnqod")); + .withTags(mapOf("vzvfvaawzqadfl", "pzdm", "riglaec", "z", "kpvzmlq", "ndtic", "npkc", "mldgxobfirc")); model = BinaryData.fromObject(model).toObject(L2NetworkPatchParameters.class); - Assertions.assertEquals("feddwwnlza", model.tags().get("wxudgn")); + Assertions.assertEquals("pzdm", model.tags().get("vzvfvaawzqadfl")); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkPropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkPropertiesTests.java index 0a67d43a4d44..f217616471ff 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkPropertiesTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworkPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,21 +13,21 @@ public final class L2NetworkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L2NetworkProperties model = BinaryData.fromString( - "{\"associatedResourceIds\":[\"qabqgzslesjcb\"],\"clusterId\":\"rnntiewdjcv\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"rbe\",\"hybridAksClustersAssociatedIds\":[\"gohbuffkmrq\",\"mvvhmxtdrjfuta\"],\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"jvewzcjznmwcp\",\"l2IsolationDomainId\":\"guaadraufactkahz\",\"provisioningState\":\"Provisioning\",\"virtualMachinesAssociatedIds\":[\"ziuxxpshnee\"]}") + "{\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"vwzjbhyz\",\"l2IsolationDomainId\":\"xjrk\",\"associatedResourceIds\":[\"trnegvmnvuqeqvld\",\"pa\"],\"clusterId\":\"jbkkdmflvestmjl\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"lozapeewchpxlk\",\"hybridAksClustersAssociatedIds\":[\"uziycsl\",\"vu\",\"uztcktyhjtqed\"],\"virtualMachinesAssociatedIds\":[\"ulwm\",\"rqzz\",\"rjvpglydzgkrvqee\",\"toepryu\"],\"provisioningState\":\"Accepted\"}") .toObject(L2NetworkProperties.class); Assertions.assertEquals(HybridAksPluginType.OSDEVICE, model.hybridAksPluginType()); - Assertions.assertEquals("jvewzcjznmwcp", model.interfaceName()); - Assertions.assertEquals("guaadraufactkahz", model.l2IsolationDomainId()); + Assertions.assertEquals("vwzjbhyz", model.interfaceName()); + Assertions.assertEquals("xjrk", model.l2IsolationDomainId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { L2NetworkProperties model = new L2NetworkProperties().withHybridAksPluginType(HybridAksPluginType.OSDEVICE) - .withInterfaceName("jvewzcjznmwcp") - .withL2IsolationDomainId("guaadraufactkahz"); + .withInterfaceName("vwzjbhyz") + .withL2IsolationDomainId("xjrk"); model = BinaryData.fromObject(model).toObject(L2NetworkProperties.class); Assertions.assertEquals(HybridAksPluginType.OSDEVICE, model.hybridAksPluginType()); - Assertions.assertEquals("jvewzcjznmwcp", model.interfaceName()); - Assertions.assertEquals("guaadraufactkahz", model.l2IsolationDomainId()); + Assertions.assertEquals("vwzjbhyz", model.interfaceName()); + Assertions.assertEquals("xjrk", model.l2IsolationDomainId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksCreateOrUpdateMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksCreateOrUpdateMockTests.java index 42810423bd95..6a1b0a7d20f4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksCreateOrUpdateMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,6 +11,7 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; import com.azure.resourcemanager.networkcloud.models.L2Network; import java.nio.charset.StandardCharsets; @@ -25,7 +26,7 @@ public final class L2NetworksCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"tfpwpqbyejuw\",\"extendedLocation\":{\"name\":\"qwdqi\",\"type\":\"mghg\"},\"properties\":{\"associatedResourceIds\":[\"txlujkhnjcmr\"],\"clusterId\":\"fmkhcqtwmlmhjnqt\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"j\",\"hybridAksClustersAssociatedIds\":[\"r\",\"gpokddxejhhkvgu\",\"vtptbk\"],\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"yn\",\"l2IsolationDomainId\":\"pgb\",\"provisioningState\":\"Succeeded\",\"virtualMachinesAssociatedIds\":[\"kkwvdxaexqokmyr\",\"jialz\",\"nobrqlpb\"]},\"location\":\"trpzuyudivbxnh\",\"tags\":{\"ruzytzaro\":\"aeonqelwgdh\",\"kneerzztrknsj\":\"atmoljiywmpinmzv\",\"hkeizcp\":\"lugdybnhrxlelf\"},\"id\":\"htdm\",\"name\":\"wjekptycaydbj\",\"type\":\"c\"}"; + = "{\"properties\":{\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"qjros\",\"l2IsolationDomainId\":\"vrjeqmtzzbeqrztr\",\"associatedResourceIds\":[\"xrd\",\"absr\",\"rsnrhp\",\"a\"],\"clusterId\":\"wk\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"nxkvvcsemsv\",\"hybridAksClustersAssociatedIds\":[\"jkqxetqmmli\",\"rj\",\"xnwxdch\"],\"virtualMachinesAssociatedIds\":[\"xlehzlxpgfquwzp\",\"iibelwcerw\"],\"provisioningState\":\"Succeeded\"},\"etag\":\"jxljtxbusq\",\"extendedLocation\":{\"name\":\"bxxn\",\"type\":\"CustomLocation\"},\"location\":\"sdzhgbdgzpagsec\",\"tags\":{\"gxfllmqiynezoel\":\"buwq\"},\"id\":\"nkkiiwvmtumxpy\",\"name\":\"djf\",\"type\":\"axroqvqpilrgunc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,25 +36,27 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); L2Network response = manager.l2Networks() - .define("kyfwnwpiwxeiicr") - .withRegion("qilwgdfpfqfpcvs") - .withExistingResourceGroup("bgnixxoww") - .withExtendedLocation(new ExtendedLocation().withName("kldmaxxijv").withType("kwsdgkj")) - .withL2IsolationDomainId("yoi") - .withTags(mapOf("vwerfwxbsmtb", "gq")) - .withHybridAksPluginType(HybridAksPluginType.OSDEVICE) - .withInterfaceName("simi") - .withIfMatch("kwdvbtb") - .withIfNoneMatch("ekqhs") + .define("qhnmhk") + .withRegion("rllccnaovjowazhp") + .withExistingResourceGroup("djpxpqht") + .withExtendedLocation( + new ExtendedLocation().withName("mkkhtgfredml").withType(ExtendedLocationType.EDGE_ZONE)) + .withL2IsolationDomainId("pinymmqgwokmikp") + .withTags( + mapOf("srqorcgenmvceb", "comlyotgkwsx", "dcqjkedwqurc", "eetqujxcxxq", "qqrsil", "ojmrvvxwjongzse")) + .withHybridAksPluginType(HybridAksPluginType.SRIOV) + .withInterfaceName("dsuxheqdgcrux") + .withIfMatch("rulfuct") + .withIfNoneMatch("jrthcfjzhx") .create(); - Assertions.assertEquals("trpzuyudivbxnh", response.location()); - Assertions.assertEquals("aeonqelwgdh", response.tags().get("ruzytzaro")); - Assertions.assertEquals("qwdqi", response.extendedLocation().name()); - Assertions.assertEquals("mghg", response.extendedLocation().type()); + Assertions.assertEquals("sdzhgbdgzpagsec", response.location()); + Assertions.assertEquals("buwq", response.tags().get("gxfllmqiynezoel")); + Assertions.assertEquals("bxxn", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, response.extendedLocation().type()); Assertions.assertEquals(HybridAksPluginType.OSDEVICE, response.hybridAksPluginType()); - Assertions.assertEquals("yn", response.interfaceName()); - Assertions.assertEquals("pgb", response.l2IsolationDomainId()); + Assertions.assertEquals("qjros", response.interfaceName()); + Assertions.assertEquals("vrjeqmtzzbeqrztr", response.l2IsolationDomainId()); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksGetByResourceGroupWithResponseMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksGetByResourceGroupWithResponseMockTests.java index 1784705b29ab..d12679e56df8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksGetByResourceGroupWithResponseMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksGetByResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -10,6 +10,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; import com.azure.resourcemanager.networkcloud.models.L2Network; import java.nio.charset.StandardCharsets; @@ -22,7 +23,7 @@ public final class L2NetworksGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"etag\":\"egftcvb\",\"extendedLocation\":{\"name\":\"iftksdwgdnk\",\"type\":\"fgmwd\"},\"properties\":{\"associatedResourceIds\":[\"buvczldbglzoutb\"],\"clusterId\":\"qgz\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"clyzgs\",\"hybridAksClustersAssociatedIds\":[\"bjgmnzj\",\"t\"],\"hybridAksPluginType\":\"SRIOV\",\"interfaceName\":\"khlobvvjbhvhdi\",\"l2IsolationDomainId\":\"ayfluiyuosnu\",\"provisioningState\":\"Canceled\",\"virtualMachinesAssociatedIds\":[\"vhyibdrqrsw\",\"buubpyrowt\",\"oxztfwfqch\",\"czevjnn\"]},\"location\":\"agfyvrtpqpe\",\"tags\":{\"wqwemvxqabckmze\":\"cgkrepdqhqy\"},\"id\":\"xin\",\"name\":\"greohtwhlpuzjp\",\"type\":\"eezn\"}"; + = "{\"properties\":{\"hybridAksPluginType\":\"SRIOV\",\"interfaceName\":\"qhbjnqogdxwbsfpy\",\"l2IsolationDomainId\":\"x\",\"associatedResourceIds\":[\"flecominxojjl\",\"xxdhilzzdzzqjm\"],\"clusterId\":\"za\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"ibqlotokhtvwtaz\",\"hybridAksClustersAssociatedIds\":[\"qww\",\"wjyofgwhnkbtl\"],\"virtualMachinesAssociatedIds\":[\"ssmctsnl\",\"kpwolg\",\"s\",\"bxbteogfgfiijry\"],\"provisioningState\":\"Failed\"},\"etag\":\"fksxqce\",\"extendedLocation\":{\"name\":\"zfpxgnmqvzvluy\",\"type\":\"EdgeZone\"},\"location\":\"ios\",\"tags\":{\"acvfyeowps\":\"yvaifpp\",\"jdhsoy\":\"x\",\"pboujs\":\"hpvtyqftteh\",\"suenyg\":\"kfvvdshxcde\"},\"id\":\"xcgjtf\",\"name\":\"nquktrfnslnlrxs\",\"type\":\"ylt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +33,15 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); L2Network response = manager.l2Networks() - .getByResourceGroupWithResponse("rkjd", "vrg", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("wwdjuxdbdl", "zgdyrcvuqbs", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("agfyvrtpqpe", response.location()); - Assertions.assertEquals("cgkrepdqhqy", response.tags().get("wqwemvxqabckmze")); - Assertions.assertEquals("iftksdwgdnk", response.extendedLocation().name()); - Assertions.assertEquals("fgmwd", response.extendedLocation().type()); + Assertions.assertEquals("ios", response.location()); + Assertions.assertEquals("yvaifpp", response.tags().get("acvfyeowps")); + Assertions.assertEquals("zfpxgnmqvzvluy", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, response.extendedLocation().type()); Assertions.assertEquals(HybridAksPluginType.SRIOV, response.hybridAksPluginType()); - Assertions.assertEquals("khlobvvjbhvhdi", response.interfaceName()); - Assertions.assertEquals("ayfluiyuosnu", response.l2IsolationDomainId()); + Assertions.assertEquals("qhbjnqogdxwbsfpy", response.interfaceName()); + Assertions.assertEquals("x", response.l2IsolationDomainId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListByResourceGroupMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListByResourceGroupMockTests.java index 1e4bd13bd4b0..2486451cb76e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListByResourceGroupMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListByResourceGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,6 +11,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; import com.azure.resourcemanager.networkcloud.models.L2Network; import java.nio.charset.StandardCharsets; @@ -23,7 +24,7 @@ public final class L2NetworksListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"sn\",\"extendedLocation\":{\"name\":\"hpqatiwkkvyanxk\",\"type\":\"vcsemsvuvdj\"},\"properties\":{\"associatedResourceIds\":[\"etqmmli\",\"rj\"],\"clusterId\":\"nw\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"p\",\"hybridAksClustersAssociatedIds\":[\"lehzlxpgfq\",\"wzpwiibel\",\"cerwkwbpjxljtxbu\",\"qtbxxniuisdzh\"],\"hybridAksPluginType\":\"DPDK\",\"interfaceName\":\"zpa\",\"l2IsolationDomainId\":\"secnadbuwqrgxf\",\"provisioningState\":\"Failed\",\"virtualMachinesAssociatedIds\":[\"ynezoellnk\",\"iiwv\",\"tumxpymdj\",\"uaxroqvqpilrgu\"]},\"location\":\"anlduwzorxsb\",\"tags\":{\"xym\":\"qk\",\"qepdx\":\"kqv\"},\"id\":\"ltuubw\",\"name\":\"vpjbowcpjqduq\",\"type\":\"ixexkydfbwljavhu\"}]}"; + = "{\"value\":[{\"properties\":{\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"qseuzuukykcyqhy\",\"l2IsolationDomainId\":\"qzzdcykeyste\",\"associatedResourceIds\":[\"pazdazgbsqgp\",\"wqcfutmdpvozg\",\"qjbknl\"],\"clusterId\":\"lctzeyowmndcovd\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"uxza\",\"hybridAksClustersAssociatedIds\":[\"kvfruwkudr\"],\"virtualMachinesAssociatedIds\":[\"ftxudqy\",\"mebunaucmc\",\"rtneemmja\"],\"provisioningState\":\"Provisioning\"},\"etag\":\"xefnohaitrani\",\"extendedLocation\":{\"name\":\"erwguda\",\"type\":\"CustomLocation\"},\"location\":\"ubvf\",\"tags\":{\"y\":\"fcocefhpr\",\"cdculr\":\"fmpztraudsvh\"},\"id\":\"gpqtmo\",\"name\":\"hvrztnvg\",\"type\":\"shqrdgrt\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,14 +34,15 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.l2Networks() - .listByResourceGroup("zbeqrztrxa", 678766215, "rdhabsr", com.azure.core.util.Context.NONE); + .listByResourceGroup("wntfmtbgwjdxwna", 976200811, "urrdreyzjwhsetww", com.azure.core.util.Context.NONE); - Assertions.assertEquals("anlduwzorxsb", response.iterator().next().location()); - Assertions.assertEquals("qk", response.iterator().next().tags().get("xym")); - Assertions.assertEquals("hpqatiwkkvyanxk", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("vcsemsvuvdj", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals(HybridAksPluginType.DPDK, response.iterator().next().hybridAksPluginType()); - Assertions.assertEquals("zpa", response.iterator().next().interfaceName()); - Assertions.assertEquals("secnadbuwqrgxf", response.iterator().next().l2IsolationDomainId()); + Assertions.assertEquals("ubvf", response.iterator().next().location()); + Assertions.assertEquals("fcocefhpr", response.iterator().next().tags().get("y")); + Assertions.assertEquals("erwguda", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, + response.iterator().next().extendedLocation().type()); + Assertions.assertEquals(HybridAksPluginType.OSDEVICE, response.iterator().next().hybridAksPluginType()); + Assertions.assertEquals("qseuzuukykcyqhy", response.iterator().next().interfaceName()); + Assertions.assertEquals("qzzdcykeyste", response.iterator().next().l2IsolationDomainId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListMockTests.java index 8ac6dde45ab7..485114f134aa 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2NetworksListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,6 +11,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; import com.azure.resourcemanager.networkcloud.models.L2Network; import java.nio.charset.StandardCharsets; @@ -23,7 +24,7 @@ public final class L2NetworksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"wp\",\"extendedLocation\":{\"name\":\"chgjtnhtukfacih\",\"type\":\"bfntumeezbxvq\"},\"properties\":{\"associatedResourceIds\":[\"uvwc\",\"asgom\",\"mjzwx\",\"qgo\"],\"clusterId\":\"xpwwzt\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"khtgfredmlscgrll\",\"hybridAksClustersAssociatedIds\":[\"aovjow\"],\"hybridAksPluginType\":\"SRIOV\",\"interfaceName\":\"abacomlyotgkws\",\"l2IsolationDomainId\":\"nsrqor\",\"provisioningState\":\"Succeeded\",\"virtualMachinesAssociatedIds\":[\"vcebxeetqujxcxxq\"]},\"location\":\"cqjkedwqu\",\"tags\":{\"qqrsil\":\"ojmrvvxwjongzse\",\"sbvr\":\"chskxxka\",\"rulfuct\":\"aqgvto\"},\"id\":\"jrthcfjzhx\",\"name\":\"yubqjr\",\"type\":\"stvrjeqmt\"}]}"; + = "{\"value\":[{\"properties\":{\"hybridAksPluginType\":\"DPDK\",\"interfaceName\":\"fa\",\"l2IsolationDomainId\":\"zwjcaye\",\"associatedResourceIds\":[\"ransyby\",\"polwzrghsrlei\"],\"clusterId\":\"fscjfn\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"uagfqwtltngv\",\"hybridAksClustersAssociatedIds\":[\"uptrklz\"],\"virtualMachinesAssociatedIds\":[\"ajwolxfs\",\"aghm\",\"ynwlslrcigtzjcv\"],\"provisioningState\":\"Failed\"},\"etag\":\"a\",\"extendedLocation\":{\"name\":\"snsso\",\"type\":\"CustomLocation\"},\"location\":\"pavidnievwffc\",\"tags\":{\"xgcbdsvalpnpt\":\"ezslp\",\"x\":\"trkxgpazwu\"},\"id\":\"qvn\",\"name\":\"obfelhldiuhz\",\"type\":\"gqlmfaewzgi\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +33,16 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.l2Networks().list(414318030, "p", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.l2Networks().list(177488240, "ewjzl", com.azure.core.util.Context.NONE); - Assertions.assertEquals("cqjkedwqu", response.iterator().next().location()); - Assertions.assertEquals("ojmrvvxwjongzse", response.iterator().next().tags().get("qqrsil")); - Assertions.assertEquals("chgjtnhtukfacih", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("bfntumeezbxvq", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals(HybridAksPluginType.SRIOV, response.iterator().next().hybridAksPluginType()); - Assertions.assertEquals("abacomlyotgkws", response.iterator().next().interfaceName()); - Assertions.assertEquals("nsrqor", response.iterator().next().l2IsolationDomainId()); + Assertions.assertEquals("pavidnievwffc", response.iterator().next().location()); + Assertions.assertEquals("ezslp", response.iterator().next().tags().get("xgcbdsvalpnpt")); + Assertions.assertEquals("snsso", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, + response.iterator().next().extendedLocation().type()); + Assertions.assertEquals(HybridAksPluginType.DPDK, response.iterator().next().hybridAksPluginType()); + Assertions.assertEquals("fa", response.iterator().next().interfaceName()); + Assertions.assertEquals("zwjcaye", response.iterator().next().l2IsolationDomainId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2ServiceLoadBalancerConfigurationTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2ServiceLoadBalancerConfigurationTests.java index c2c025b04a8e..c00f02f92d8c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2ServiceLoadBalancerConfigurationTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L2ServiceLoadBalancerConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -15,35 +15,25 @@ public final class L2ServiceLoadBalancerConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L2ServiceLoadBalancerConfiguration model = BinaryData.fromString( - "{\"ipAddressPools\":[{\"addresses\":[\"xzb\",\"voowvr\",\"mtg\"],\"autoAssign\":\"False\",\"name\":\"pyostronzmyhgfi\",\"onlyUseHostIps\":\"True\"},{\"addresses\":[\"kmcwaekrrjreafx\",\"sgumhjglikkxwsl\",\"lbqpvuzlmvfelf\",\"tgp\"],\"autoAssign\":\"True\",\"name\":\"pwjxezn\",\"onlyUseHostIps\":\"True\"},{\"addresses\":[\"rnjwmw\",\"pn\"],\"autoAssign\":\"True\",\"name\":\"zejjoqk\",\"onlyUseHostIps\":\"False\"}]}") + "{\"ipAddressPools\":[{\"addresses\":[\"hostgktstvdxecl\",\"edqbc\"],\"autoAssign\":\"True\",\"name\":\"lhpl\",\"onlyUseHostIps\":\"True\"}]}") .toObject(L2ServiceLoadBalancerConfiguration.class); - Assertions.assertEquals("xzb", model.ipAddressPools().get(0).addresses().get(0)); - Assertions.assertEquals(BfdEnabled.FALSE, model.ipAddressPools().get(0).autoAssign()); - Assertions.assertEquals("pyostronzmyhgfi", model.ipAddressPools().get(0).name()); + Assertions.assertEquals("hostgktstvdxecl", model.ipAddressPools().get(0).addresses().get(0)); + Assertions.assertEquals(BfdEnabled.TRUE, model.ipAddressPools().get(0).autoAssign()); + Assertions.assertEquals("lhpl", model.ipAddressPools().get(0).name()); Assertions.assertEquals(BfdEnabled.TRUE, model.ipAddressPools().get(0).onlyUseHostIps()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L2ServiceLoadBalancerConfiguration model - = new L2ServiceLoadBalancerConfiguration().withIpAddressPools(Arrays.asList( - new IpAddressPool().withAddresses(Arrays.asList("xzb", "voowvr", "mtg")) - .withAutoAssign(BfdEnabled.FALSE) - .withName("pyostronzmyhgfi") - .withOnlyUseHostIps(BfdEnabled.TRUE), - new IpAddressPool() - .withAddresses(Arrays.asList("kmcwaekrrjreafx", "sgumhjglikkxwsl", "lbqpvuzlmvfelf", "tgp")) - .withAutoAssign(BfdEnabled.TRUE) - .withName("pwjxezn") - .withOnlyUseHostIps(BfdEnabled.TRUE), - new IpAddressPool().withAddresses(Arrays.asList("rnjwmw", "pn")) - .withAutoAssign(BfdEnabled.TRUE) - .withName("zejjoqk") - .withOnlyUseHostIps(BfdEnabled.FALSE))); + L2ServiceLoadBalancerConfiguration model = new L2ServiceLoadBalancerConfiguration().withIpAddressPools( + Arrays.asList(new IpAddressPool().withAddresses(Arrays.asList("hostgktstvdxecl", "edqbc")) + .withAutoAssign(BfdEnabled.TRUE) + .withName("lhpl") + .withOnlyUseHostIps(BfdEnabled.TRUE))); model = BinaryData.fromObject(model).toObject(L2ServiceLoadBalancerConfiguration.class); - Assertions.assertEquals("xzb", model.ipAddressPools().get(0).addresses().get(0)); - Assertions.assertEquals(BfdEnabled.FALSE, model.ipAddressPools().get(0).autoAssign()); - Assertions.assertEquals("pyostronzmyhgfi", model.ipAddressPools().get(0).name()); + Assertions.assertEquals("hostgktstvdxecl", model.ipAddressPools().get(0).addresses().get(0)); + Assertions.assertEquals(BfdEnabled.TRUE, model.ipAddressPools().get(0).autoAssign()); + Assertions.assertEquals("lhpl", model.ipAddressPools().get(0).name()); Assertions.assertEquals(BfdEnabled.TRUE, model.ipAddressPools().get(0).onlyUseHostIps()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkAttachmentConfigurationTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkAttachmentConfigurationTests.java index 679c4ab6511b..206ba8105932 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkAttachmentConfigurationTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkAttachmentConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,23 +13,23 @@ public final class L3NetworkAttachmentConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - L3NetworkAttachmentConfiguration model = BinaryData - .fromString("{\"ipamEnabled\":\"True\",\"networkId\":\"krribdeibqi\",\"pluginType\":\"MACVLAN\"}") - .toObject(L3NetworkAttachmentConfiguration.class); - Assertions.assertEquals(L3NetworkConfigurationIpamEnabled.TRUE, model.ipamEnabled()); - Assertions.assertEquals("krribdeibqi", model.networkId()); - Assertions.assertEquals(KubernetesPluginType.MACVLAN, model.pluginType()); + L3NetworkAttachmentConfiguration model + = BinaryData.fromString("{\"ipamEnabled\":\"False\",\"networkId\":\"wvrvmtg\",\"pluginType\":\"SRIOV\"}") + .toObject(L3NetworkAttachmentConfiguration.class); + Assertions.assertEquals(L3NetworkConfigurationIpamEnabled.FALSE, model.ipamEnabled()); + Assertions.assertEquals("wvrvmtg", model.networkId()); + Assertions.assertEquals(KubernetesPluginType.SRIOV, model.pluginType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { L3NetworkAttachmentConfiguration model - = new L3NetworkAttachmentConfiguration().withIpamEnabled(L3NetworkConfigurationIpamEnabled.TRUE) - .withNetworkId("krribdeibqi") - .withPluginType(KubernetesPluginType.MACVLAN); + = new L3NetworkAttachmentConfiguration().withIpamEnabled(L3NetworkConfigurationIpamEnabled.FALSE) + .withNetworkId("wvrvmtg") + .withPluginType(KubernetesPluginType.SRIOV); model = BinaryData.fromObject(model).toObject(L3NetworkAttachmentConfiguration.class); - Assertions.assertEquals(L3NetworkConfigurationIpamEnabled.TRUE, model.ipamEnabled()); - Assertions.assertEquals("krribdeibqi", model.networkId()); - Assertions.assertEquals(KubernetesPluginType.MACVLAN, model.pluginType()); + Assertions.assertEquals(L3NetworkConfigurationIpamEnabled.FALSE, model.ipamEnabled()); + Assertions.assertEquals("wvrvmtg", model.networkId()); + Assertions.assertEquals(KubernetesPluginType.SRIOV, model.pluginType()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkInnerTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkInnerTests.java index bd1f25f89eab..2f9cd21b32e0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkInnerTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkInnerTests.java @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.networkcloud.fluent.models.L3NetworkInner; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksIpamEnabled; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; import com.azure.resourcemanager.networkcloud.models.IpAllocationType; @@ -18,48 +19,48 @@ public final class L3NetworkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L3NetworkInner model = BinaryData.fromString( - "{\"etag\":\"jplmagstcy\",\"extendedLocation\":{\"name\":\"hpfkyrkdbdgi\",\"type\":\"gsj\"},\"properties\":{\"associatedResourceIds\":[\"wqjnob\",\"iyhddvi\"],\"clusterId\":\"egfnmntfpmvmemfn\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"vvbalx\",\"hybridAksClustersAssociatedIds\":[\"chp\",\"db\",\"evwrdnhfuk\",\"vsjcswsmystuluqy\"],\"hybridAksIpamEnabled\":\"False\",\"hybridAksPluginType\":\"DPDK\",\"interfaceName\":\"rchpqbmfpjbabwid\",\"ipAllocationType\":\"DualStack\",\"ipv4ConnectedPrefix\":\"spuunnoxyhkxgq\",\"ipv6ConnectedPrefix\":\"rihpfhoq\",\"l3IsolationDomainId\":\"aaewdaomdjv\",\"provisioningState\":\"Failed\",\"virtualMachinesAssociatedIds\":[\"kzbrmsgeivsiy\"],\"vlan\":4981907699516711623},\"location\":\"ncj\",\"tags\":{\"apzwyrpgog\":\"nbzoggcu\",\"yjt\":\"qxepnylbfuaj\",\"byfmowuxr\":\"vofqzhvfc\",\"xfzwi\":\"jpvd\"},\"id\":\"vwzjbhyz\",\"name\":\"xjrk\",\"type\":\"mbtrnegvmnvu\"}") + "{\"properties\":{\"hybridAksIpamEnabled\":\"True\",\"hybridAksPluginType\":\"SRIOV\",\"interfaceName\":\"ctxmwoteyowcluq\",\"ipAllocationType\":\"IPV6\",\"ipv4ConnectedPrefix\":\"qvgqouw\",\"ipv6ConnectedPrefix\":\"zmpjwyiv\",\"l3IsolationDomainId\":\"ikf\",\"vlan\":7053837089198118941,\"associatedResourceIds\":[\"fsphuagrttikt\",\"usqczkvy\",\"lxubyj\"],\"clusterId\":\"fmmfblcqcu\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"ibrta\",\"hybridAksClustersAssociatedIds\":[\"tttwgdslqxih\",\"rmooizqse\",\"pxiutc\",\"apzhyrpetoge\"],\"virtualMachinesAssociatedIds\":[\"xslhvnhlabrqnkk\",\"jcjbt\"],\"provisioningState\":\"Canceled\"},\"etag\":\"hvv\",\"extendedLocation\":{\"name\":\"brxjjsto\",\"type\":\"EdgeZone\"},\"location\":\"it\",\"tags\":{\"cwq\":\"ztmoobklftidg\",\"hujswtwkozzwcul\":\"pimaqxzhemjyh\"},\"id\":\"bawpfajnjwltlwt\",\"name\":\"j\",\"type\":\"uktalhsnvkcdmxz\"}") .toObject(L3NetworkInner.class); - Assertions.assertEquals("ncj", model.location()); - Assertions.assertEquals("nbzoggcu", model.tags().get("apzwyrpgog")); - Assertions.assertEquals("hpfkyrkdbdgi", model.extendedLocation().name()); - Assertions.assertEquals("gsj", model.extendedLocation().type()); - Assertions.assertEquals(HybridAksIpamEnabled.FALSE, model.hybridAksIpamEnabled()); - Assertions.assertEquals(HybridAksPluginType.DPDK, model.hybridAksPluginType()); - Assertions.assertEquals("rchpqbmfpjbabwid", model.interfaceName()); - Assertions.assertEquals(IpAllocationType.DUAL_STACK, model.ipAllocationType()); - Assertions.assertEquals("spuunnoxyhkxgq", model.ipv4ConnectedPrefix()); - Assertions.assertEquals("rihpfhoq", model.ipv6ConnectedPrefix()); - Assertions.assertEquals("aaewdaomdjv", model.l3IsolationDomainId()); - Assertions.assertEquals(4981907699516711623L, model.vlan()); + Assertions.assertEquals("it", model.location()); + Assertions.assertEquals("ztmoobklftidg", model.tags().get("cwq")); + Assertions.assertEquals("brxjjsto", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.extendedLocation().type()); + Assertions.assertEquals(HybridAksIpamEnabled.TRUE, model.hybridAksIpamEnabled()); + Assertions.assertEquals(HybridAksPluginType.SRIOV, model.hybridAksPluginType()); + Assertions.assertEquals("ctxmwoteyowcluq", model.interfaceName()); + Assertions.assertEquals(IpAllocationType.IPV6, model.ipAllocationType()); + Assertions.assertEquals("qvgqouw", model.ipv4ConnectedPrefix()); + Assertions.assertEquals("zmpjwyiv", model.ipv6ConnectedPrefix()); + Assertions.assertEquals("ikf", model.l3IsolationDomainId()); + Assertions.assertEquals(7053837089198118941L, model.vlan()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L3NetworkInner model = new L3NetworkInner().withLocation("ncj") - .withTags(mapOf("apzwyrpgog", "nbzoggcu", "yjt", "qxepnylbfuaj", "byfmowuxr", "vofqzhvfc", "xfzwi", "jpvd")) - .withExtendedLocation(new ExtendedLocation().withName("hpfkyrkdbdgi").withType("gsj")) - .withHybridAksIpamEnabled(HybridAksIpamEnabled.FALSE) - .withHybridAksPluginType(HybridAksPluginType.DPDK) - .withInterfaceName("rchpqbmfpjbabwid") - .withIpAllocationType(IpAllocationType.DUAL_STACK) - .withIpv4ConnectedPrefix("spuunnoxyhkxgq") - .withIpv6ConnectedPrefix("rihpfhoq") - .withL3IsolationDomainId("aaewdaomdjv") - .withVlan(4981907699516711623L); + L3NetworkInner model = new L3NetworkInner().withLocation("it") + .withTags(mapOf("cwq", "ztmoobklftidg", "hujswtwkozzwcul", "pimaqxzhemjyh")) + .withExtendedLocation(new ExtendedLocation().withName("brxjjsto").withType(ExtendedLocationType.EDGE_ZONE)) + .withHybridAksIpamEnabled(HybridAksIpamEnabled.TRUE) + .withHybridAksPluginType(HybridAksPluginType.SRIOV) + .withInterfaceName("ctxmwoteyowcluq") + .withIpAllocationType(IpAllocationType.IPV6) + .withIpv4ConnectedPrefix("qvgqouw") + .withIpv6ConnectedPrefix("zmpjwyiv") + .withL3IsolationDomainId("ikf") + .withVlan(7053837089198118941L); model = BinaryData.fromObject(model).toObject(L3NetworkInner.class); - Assertions.assertEquals("ncj", model.location()); - Assertions.assertEquals("nbzoggcu", model.tags().get("apzwyrpgog")); - Assertions.assertEquals("hpfkyrkdbdgi", model.extendedLocation().name()); - Assertions.assertEquals("gsj", model.extendedLocation().type()); - Assertions.assertEquals(HybridAksIpamEnabled.FALSE, model.hybridAksIpamEnabled()); - Assertions.assertEquals(HybridAksPluginType.DPDK, model.hybridAksPluginType()); - Assertions.assertEquals("rchpqbmfpjbabwid", model.interfaceName()); - Assertions.assertEquals(IpAllocationType.DUAL_STACK, model.ipAllocationType()); - Assertions.assertEquals("spuunnoxyhkxgq", model.ipv4ConnectedPrefix()); - Assertions.assertEquals("rihpfhoq", model.ipv6ConnectedPrefix()); - Assertions.assertEquals("aaewdaomdjv", model.l3IsolationDomainId()); - Assertions.assertEquals(4981907699516711623L, model.vlan()); + Assertions.assertEquals("it", model.location()); + Assertions.assertEquals("ztmoobklftidg", model.tags().get("cwq")); + Assertions.assertEquals("brxjjsto", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.extendedLocation().type()); + Assertions.assertEquals(HybridAksIpamEnabled.TRUE, model.hybridAksIpamEnabled()); + Assertions.assertEquals(HybridAksPluginType.SRIOV, model.hybridAksPluginType()); + Assertions.assertEquals("ctxmwoteyowcluq", model.interfaceName()); + Assertions.assertEquals(IpAllocationType.IPV6, model.ipAllocationType()); + Assertions.assertEquals("qvgqouw", model.ipv4ConnectedPrefix()); + Assertions.assertEquals("zmpjwyiv", model.ipv6ConnectedPrefix()); + Assertions.assertEquals("ikf", model.l3IsolationDomainId()); + Assertions.assertEquals(7053837089198118941L, model.vlan()); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkListTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkListTests.java index 4d9651cb8d33..e27f115a51a9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkListTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkListTests.java @@ -1,97 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.networkcloud.fluent.models.L3NetworkInner; -import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.implementation.models.L3NetworkList; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksIpamEnabled; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; import com.azure.resourcemanager.networkcloud.models.IpAllocationType; -import com.azure.resourcemanager.networkcloud.models.L3NetworkList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class L3NetworkListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L3NetworkList model = BinaryData.fromString( - "{\"nextLink\":\"lfg\",\"value\":[{\"etag\":\"bkwdlenrds\",\"extendedLocation\":{\"name\":\"tujbazpju\",\"type\":\"hminyflnorwmduv\"},\"properties\":{\"associatedResourceIds\":[\"lvxwmyg\",\"xpgpq\"],\"clusterId\":\"isze\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"jcrxgibbdaxcon\",\"hybridAksClustersAssociatedIds\":[\"auorsukokw\",\"qplhlvnu\"],\"hybridAksIpamEnabled\":\"True\",\"hybridAksPluginType\":\"SRIOV\",\"interfaceName\":\"phwzsoldweyuqdu\",\"ipAllocationType\":\"IPV6\",\"ipv4ConnectedPrefix\":\"nrwrbiork\",\"ipv6ConnectedPrefix\":\"lywjhh\",\"l3IsolationDomainId\":\"dnhxmsi\",\"provisioningState\":\"Succeeded\",\"virtualMachinesAssociatedIds\":[\"loxggdufiqn\",\"ieuzaofjchvcyyy\",\"fgdo\"],\"vlan\":1527067199253129769},\"location\":\"iipuipwoqonm\",\"tags\":{\"shqvcimpev\":\"ekni\",\"bywdxsmicc\":\"gmblrri\",\"zdvoqytibyowbb\":\"rwfscjfnynszquj\"},\"id\":\"gyavu\",\"name\":\"pthjoxo\",\"type\":\"smsks\"},{\"etag\":\"iml\",\"extendedLocation\":{\"name\":\"oljxkcgx\",\"type\":\"lxsffg\"},\"properties\":{\"associatedResourceIds\":[\"zqzdw\",\"vwlyoup\",\"gfbkjubdyh\",\"kfm\"],\"clusterId\":\"sgow\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"sttktlahbqa\",\"hybridAksClustersAssociatedIds\":[\"tgzukxitmmqt\",\"qqqxhrnxrx\",\"pjui\",\"av\"],\"hybridAksIpamEnabled\":\"False\",\"hybridAksPluginType\":\"DPDK\",\"interfaceName\":\"vazivjlfr\",\"ipAllocationType\":\"IPV6\",\"ipv4ConnectedPrefix\":\"ajlkatnw\",\"ipv6ConnectedPrefix\":\"iopid\",\"l3IsolationDomainId\":\"qqfkuv\",\"provisioningState\":\"Canceled\",\"virtualMachinesAssociatedIds\":[\"mligov\",\"brxk\",\"mloazuru\"],\"vlan\":5962561191870222416},\"location\":\"oorb\",\"tags\":{\"vvjgslor\":\"ybfhjxa\",\"yw\":\"il\",\"gkxnyedabg\":\"t\"},\"id\":\"vudtjuewbcihx\",\"name\":\"uwhcjyxccybv\",\"type\":\"ayakkudzpx\"}]}") + "{\"value\":[{\"properties\":{\"hybridAksIpamEnabled\":\"False\",\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"p\",\"ipAllocationType\":\"DualStack\",\"ipv4ConnectedPrefix\":\"jtxvzflbqvgaq\",\"ipv6ConnectedPrefix\":\"gafcqu\",\"l3IsolationDomainId\":\"rdve\",\"vlan\":5795784151820933110,\"associatedResourceIds\":[\"tutnwlduycvuzhyr\",\"ewipm\",\"ekdxuku\"],\"clusterId\":\"sjjxundxgketw\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"jhfjmhvvmuvgpm\",\"hybridAksClustersAssociatedIds\":[\"qsxvmhf\"],\"virtualMachinesAssociatedIds\":[\"jyihsasbhudypo\"],\"provisioningState\":\"Canceled\"},\"etag\":\"ms\",\"extendedLocation\":{\"name\":\"ynsqyrpfoobr\",\"type\":\"EdgeZone\"},\"location\":\"y\",\"tags\":{\"nfwqzdzgtilaxhn\":\"nygq\",\"wivkxo\":\"hqlyvijo\"},\"id\":\"zunbixx\",\"name\":\"ti\",\"type\":\"vcpwpgclrc\"},{\"properties\":{\"hybridAksIpamEnabled\":\"True\",\"hybridAksPluginType\":\"SRIOV\",\"interfaceName\":\"frkenxpmyyefrp\",\"ipAllocationType\":\"IPV6\",\"ipv4ConnectedPrefix\":\"qqs\",\"ipv6ConnectedPrefix\":\"waoqvmmb\",\"l3IsolationDomainId\":\"pqfrtqlkz\",\"vlan\":6755655355445488769,\"associatedResourceIds\":[\"tgvkxlzyqd\",\"fegcea\"],\"clusterId\":\"xwh\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"ymo\",\"hybridAksClustersAssociatedIds\":[\"lwigdivbkbx\",\"omfaj\",\"wasqvdaeyyg\",\"xakjsqzhzb\"],\"virtualMachinesAssociatedIds\":[\"gims\",\"dxasicddyvv\",\"skgfmocwahpq\"],\"provisioningState\":\"Canceled\"},\"etag\":\"eaahhvjhhn\",\"extendedLocation\":{\"name\":\"kzyb\",\"type\":\"EdgeZone\"},\"location\":\"idjks\",\"tags\":{\"ljlageuaulxu\":\"yxvxevblbjed\",\"nlsvxeiz\":\"smjbnkppxyn\",\"ffeycx\":\"gwklnsr\",\"ymerteeammxq\":\"ktp\"},\"id\":\"ekkkzd\",\"name\":\"rtkgdojbmxvavref\",\"type\":\"eesvecu\"},{\"properties\":{\"hybridAksIpamEnabled\":\"True\",\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"s\",\"ipAllocationType\":\"IPV6\",\"ipv4ConnectedPrefix\":\"tujwsawdd\",\"ipv6ConnectedPrefix\":\"babxvitit\",\"l3IsolationDomainId\":\"tzeexav\",\"vlan\":3712570217113114735,\"associatedResourceIds\":[\"lecdmdqbw\",\"ypq\",\"gsfjac\",\"slhhxudbxv\"],\"clusterId\":\"htnsi\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"z\",\"hybridAksClustersAssociatedIds\":[\"sckdlp\"],\"virtualMachinesAssociatedIds\":[\"rcxfailcfxwmdb\",\"xdfgsftufqobr\",\"lnacgcc\",\"knh\"],\"provisioningState\":\"Canceled\"},\"etag\":\"v\",\"extendedLocation\":{\"name\":\"tnrzvuljra\",\"type\":\"CustomLocation\"},\"location\":\"anokqgu\",\"tags\":{\"oylaxxul\":\"qnvb\"},\"id\":\"disdosfjbjsvgj\",\"name\":\"whryvycytdcl\",\"type\":\"gc\"},{\"properties\":{\"hybridAksIpamEnabled\":\"True\",\"hybridAksPluginType\":\"DPDK\",\"interfaceName\":\"mbtmvpdvjdhttzae\",\"ipAllocationType\":\"IPV4\",\"ipv4ConnectedPrefix\":\"ihchrphkmcrjdqn\",\"ipv6ConnectedPrefix\":\"fzpbgtgkyl\",\"l3IsolationDomainId\":\"dgh\",\"vlan\":5604452099649881650,\"associatedResourceIds\":[\"tl\",\"xezw\",\"hokvbwnh\"],\"clusterId\":\"qlgehg\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"ifhpf\",\"hybridAksClustersAssociatedIds\":[\"jvgcxtx\",\"csheafidltugsr\",\"smkss\",\"h\"],\"virtualMachinesAssociatedIds\":[\"txfkfweg\",\"rhptilluc\"],\"provisioningState\":\"Failed\"},\"etag\":\"gdqoh\",\"extendedLocation\":{\"name\":\"cwsldri\",\"type\":\"CustomLocation\"},\"location\":\"pwbralllibphbqz\",\"tags\":{\"ankjpdnjzh\":\"aka\",\"lmuoyxprimrsopte\":\"joylh\",\"wxdzaumweoohgu\":\"cjmeislstvasy\"},\"id\":\"fuzboyjathwtzolb\",\"name\":\"emwmdxmebwjs\",\"type\":\"jpahlxvea\"}],\"nextLink\":\"qxnmwmqt\"}") .toObject(L3NetworkList.class); - Assertions.assertEquals("lfg", model.nextLink()); - Assertions.assertEquals("iipuipwoqonm", model.value().get(0).location()); - Assertions.assertEquals("ekni", model.value().get(0).tags().get("shqvcimpev")); - Assertions.assertEquals("tujbazpju", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("hminyflnorwmduv", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(HybridAksIpamEnabled.TRUE, model.value().get(0).hybridAksIpamEnabled()); - Assertions.assertEquals(HybridAksPluginType.SRIOV, model.value().get(0).hybridAksPluginType()); - Assertions.assertEquals("phwzsoldweyuqdu", model.value().get(0).interfaceName()); - Assertions.assertEquals(IpAllocationType.IPV6, model.value().get(0).ipAllocationType()); - Assertions.assertEquals("nrwrbiork", model.value().get(0).ipv4ConnectedPrefix()); - Assertions.assertEquals("lywjhh", model.value().get(0).ipv6ConnectedPrefix()); - Assertions.assertEquals("dnhxmsi", model.value().get(0).l3IsolationDomainId()); - Assertions.assertEquals(1527067199253129769L, model.value().get(0).vlan()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L3NetworkList model - = new L3NetworkList().withNextLink("lfg") - .withValue( - Arrays.asList( - new L3NetworkInner().withLocation("iipuipwoqonm") - .withTags(mapOf("shqvcimpev", "ekni", "bywdxsmicc", "gmblrri", "zdvoqytibyowbb", - "rwfscjfnynszquj")) - .withExtendedLocation( - new ExtendedLocation().withName("tujbazpju").withType("hminyflnorwmduv")) - .withHybridAksIpamEnabled(HybridAksIpamEnabled.TRUE) - .withHybridAksPluginType(HybridAksPluginType.SRIOV) - .withInterfaceName("phwzsoldweyuqdu") - .withIpAllocationType(IpAllocationType.IPV6) - .withIpv4ConnectedPrefix("nrwrbiork") - .withIpv6ConnectedPrefix("lywjhh") - .withL3IsolationDomainId("dnhxmsi") - .withVlan(1527067199253129769L), - new L3NetworkInner().withLocation("oorb") - .withTags(mapOf("vvjgslor", "ybfhjxa", "yw", "il", "gkxnyedabg", "t")) - .withExtendedLocation(new ExtendedLocation().withName("oljxkcgx").withType("lxsffg")) - .withHybridAksIpamEnabled(HybridAksIpamEnabled.FALSE) - .withHybridAksPluginType(HybridAksPluginType.DPDK) - .withInterfaceName("vazivjlfr") - .withIpAllocationType(IpAllocationType.IPV6) - .withIpv4ConnectedPrefix("ajlkatnw") - .withIpv6ConnectedPrefix("iopid") - .withL3IsolationDomainId("qqfkuv") - .withVlan(5962561191870222416L))); - model = BinaryData.fromObject(model).toObject(L3NetworkList.class); - Assertions.assertEquals("lfg", model.nextLink()); - Assertions.assertEquals("iipuipwoqonm", model.value().get(0).location()); - Assertions.assertEquals("ekni", model.value().get(0).tags().get("shqvcimpev")); - Assertions.assertEquals("tujbazpju", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("hminyflnorwmduv", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(HybridAksIpamEnabled.TRUE, model.value().get(0).hybridAksIpamEnabled()); - Assertions.assertEquals(HybridAksPluginType.SRIOV, model.value().get(0).hybridAksPluginType()); - Assertions.assertEquals("phwzsoldweyuqdu", model.value().get(0).interfaceName()); - Assertions.assertEquals(IpAllocationType.IPV6, model.value().get(0).ipAllocationType()); - Assertions.assertEquals("nrwrbiork", model.value().get(0).ipv4ConnectedPrefix()); - Assertions.assertEquals("lywjhh", model.value().get(0).ipv6ConnectedPrefix()); - Assertions.assertEquals("dnhxmsi", model.value().get(0).l3IsolationDomainId()); - Assertions.assertEquals(1527067199253129769L, model.value().get(0).vlan()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("y", model.value().get(0).location()); + Assertions.assertEquals("nygq", model.value().get(0).tags().get("nfwqzdzgtilaxhn")); + Assertions.assertEquals("ynsqyrpfoobr", model.value().get(0).extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.value().get(0).extendedLocation().type()); + Assertions.assertEquals(HybridAksIpamEnabled.FALSE, model.value().get(0).hybridAksIpamEnabled()); + Assertions.assertEquals(HybridAksPluginType.OSDEVICE, model.value().get(0).hybridAksPluginType()); + Assertions.assertEquals("p", model.value().get(0).interfaceName()); + Assertions.assertEquals(IpAllocationType.DUAL_STACK, model.value().get(0).ipAllocationType()); + Assertions.assertEquals("jtxvzflbqvgaq", model.value().get(0).ipv4ConnectedPrefix()); + Assertions.assertEquals("gafcqu", model.value().get(0).ipv6ConnectedPrefix()); + Assertions.assertEquals("rdve", model.value().get(0).l3IsolationDomainId()); + Assertions.assertEquals(5795784151820933110L, model.value().get(0).vlan()); + Assertions.assertEquals("qxnmwmqt", model.nextLink()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkPatchParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkPatchParametersTests.java index bfe73088cda1..de3c651261b4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkPatchParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkPatchParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,16 +13,19 @@ public final class L3NetworkPatchParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - L3NetworkPatchParameters model = BinaryData.fromString("{\"tags\":{\"txptlghw\":\"emchgavsczuej\"}}") + L3NetworkPatchParameters model = BinaryData + .fromString( + "{\"tags\":{\"dqazkmtgguwpijra\":\"scjavftju\",\"f\":\"civmmg\",\"uvyinzqodfvpgs\":\"fiwrxgkn\"}}") .toObject(L3NetworkPatchParameters.class); - Assertions.assertEquals("emchgavsczuej", model.tags().get("txptlghw")); + Assertions.assertEquals("scjavftju", model.tags().get("dqazkmtgguwpijra")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L3NetworkPatchParameters model = new L3NetworkPatchParameters().withTags(mapOf("txptlghw", "emchgavsczuej")); + L3NetworkPatchParameters model = new L3NetworkPatchParameters() + .withTags(mapOf("dqazkmtgguwpijra", "scjavftju", "f", "civmmg", "uvyinzqodfvpgs", "fiwrxgkn")); model = BinaryData.fromObject(model).toObject(L3NetworkPatchParameters.class); - Assertions.assertEquals("emchgavsczuej", model.tags().get("txptlghw")); + Assertions.assertEquals("scjavftju", model.tags().get("dqazkmtgguwpijra")); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkPropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkPropertiesTests.java index 39c2c30636a5..c56f34264ff7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkPropertiesTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworkPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -15,36 +15,36 @@ public final class L3NetworkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L3NetworkProperties model = BinaryData.fromString( - "{\"associatedResourceIds\":[\"vldspa\",\"tjb\",\"kdmflvestmjlx\",\"ril\"],\"clusterId\":\"apeewchpxlkt\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"iycslevuf\",\"hybridAksClustersAssociatedIds\":[\"cktyh\",\"tqedcgzulwm\",\"rqzz\",\"rjvpglydzgkrvqee\"],\"hybridAksIpamEnabled\":\"True\",\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"yutnwytpzdmov\",\"ipAllocationType\":\"DualStack\",\"ipv4ConnectedPrefix\":\"aawzqadfl\",\"ipv6ConnectedPrefix\":\"ur\",\"l3IsolationDomainId\":\"glae\",\"provisioningState\":\"Succeeded\",\"virtualMachinesAssociatedIds\":[\"icokpv\"],\"vlan\":2729504349815948508}") + "{\"hybridAksIpamEnabled\":\"True\",\"hybridAksPluginType\":\"SRIOV\",\"interfaceName\":\"lnwiaaomylwe\",\"ipAllocationType\":\"DualStack\",\"ipv4ConnectedPrefix\":\"cse\",\"ipv6ConnectedPrefix\":\"wwnpj\",\"l3IsolationDomainId\":\"l\",\"vlan\":9098356799668779359,\"associatedResourceIds\":[\"ch\",\"ahfbous\"],\"clusterId\":\"epgfew\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"yxgncxykxhdjhli\",\"hybridAksClustersAssociatedIds\":[\"cxfhbcporxv\"],\"virtualMachinesAssociatedIds\":[\"zhqizxf\"],\"provisioningState\":\"Failed\"}") .toObject(L3NetworkProperties.class); Assertions.assertEquals(HybridAksIpamEnabled.TRUE, model.hybridAksIpamEnabled()); - Assertions.assertEquals(HybridAksPluginType.OSDEVICE, model.hybridAksPluginType()); - Assertions.assertEquals("yutnwytpzdmov", model.interfaceName()); + Assertions.assertEquals(HybridAksPluginType.SRIOV, model.hybridAksPluginType()); + Assertions.assertEquals("lnwiaaomylwe", model.interfaceName()); Assertions.assertEquals(IpAllocationType.DUAL_STACK, model.ipAllocationType()); - Assertions.assertEquals("aawzqadfl", model.ipv4ConnectedPrefix()); - Assertions.assertEquals("ur", model.ipv6ConnectedPrefix()); - Assertions.assertEquals("glae", model.l3IsolationDomainId()); - Assertions.assertEquals(2729504349815948508L, model.vlan()); + Assertions.assertEquals("cse", model.ipv4ConnectedPrefix()); + Assertions.assertEquals("wwnpj", model.ipv6ConnectedPrefix()); + Assertions.assertEquals("l", model.l3IsolationDomainId()); + Assertions.assertEquals(9098356799668779359L, model.vlan()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { L3NetworkProperties model = new L3NetworkProperties().withHybridAksIpamEnabled(HybridAksIpamEnabled.TRUE) - .withHybridAksPluginType(HybridAksPluginType.OSDEVICE) - .withInterfaceName("yutnwytpzdmov") + .withHybridAksPluginType(HybridAksPluginType.SRIOV) + .withInterfaceName("lnwiaaomylwe") .withIpAllocationType(IpAllocationType.DUAL_STACK) - .withIpv4ConnectedPrefix("aawzqadfl") - .withIpv6ConnectedPrefix("ur") - .withL3IsolationDomainId("glae") - .withVlan(2729504349815948508L); + .withIpv4ConnectedPrefix("cse") + .withIpv6ConnectedPrefix("wwnpj") + .withL3IsolationDomainId("l") + .withVlan(9098356799668779359L); model = BinaryData.fromObject(model).toObject(L3NetworkProperties.class); Assertions.assertEquals(HybridAksIpamEnabled.TRUE, model.hybridAksIpamEnabled()); - Assertions.assertEquals(HybridAksPluginType.OSDEVICE, model.hybridAksPluginType()); - Assertions.assertEquals("yutnwytpzdmov", model.interfaceName()); + Assertions.assertEquals(HybridAksPluginType.SRIOV, model.hybridAksPluginType()); + Assertions.assertEquals("lnwiaaomylwe", model.interfaceName()); Assertions.assertEquals(IpAllocationType.DUAL_STACK, model.ipAllocationType()); - Assertions.assertEquals("aawzqadfl", model.ipv4ConnectedPrefix()); - Assertions.assertEquals("ur", model.ipv6ConnectedPrefix()); - Assertions.assertEquals("glae", model.l3IsolationDomainId()); - Assertions.assertEquals(2729504349815948508L, model.vlan()); + Assertions.assertEquals("cse", model.ipv4ConnectedPrefix()); + Assertions.assertEquals("wwnpj", model.ipv6ConnectedPrefix()); + Assertions.assertEquals("l", model.l3IsolationDomainId()); + Assertions.assertEquals(9098356799668779359L, model.vlan()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksCreateOrUpdateMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksCreateOrUpdateMockTests.java index e424312564cc..658069e2d3da 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksCreateOrUpdateMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,6 +11,7 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksIpamEnabled; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; import com.azure.resourcemanager.networkcloud.models.IpAllocationType; @@ -27,7 +28,7 @@ public final class L3NetworksCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"otnxlkfhglh\",\"extendedLocation\":{\"name\":\"foxqwecrsn\",\"type\":\"pcs\"},\"properties\":{\"associatedResourceIds\":[\"xovppqibukklvzr\",\"rmlccmet\",\"scz\"],\"clusterId\":\"fqbqnasd\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"zsieuscplhyvd\",\"hybridAksClustersAssociatedIds\":[\"yzkxitds\",\"ezsvkolrupjov\",\"ozsaye\"],\"hybridAksIpamEnabled\":\"False\",\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"lpzbtzuykykipf\",\"ipAllocationType\":\"DualStack\",\"ipv4ConnectedPrefix\":\"pfnocm\",\"ipv6ConnectedPrefix\":\"zacfpztgazw\",\"l3IsolationDomainId\":\"qejg\",\"provisioningState\":\"Succeeded\",\"virtualMachinesAssociatedIds\":[\"tgkppgkqzkcyzmff\",\"gdyfcixrhlcqvhoe\",\"goiutgw\",\"mkahpqha\"],\"vlan\":1459817406277558792},\"location\":\"a\",\"tags\":{\"i\":\"ncogmipnmliqmvlb\",\"sdfjyiesoc\":\"eaqgrvgpomxpupd\",\"mpyzgleo\":\"iqbuou\"},\"id\":\"jsb\",\"name\":\"bwwzvdajf\",\"type\":\"nncfmaciqgjjrlhi\"}"; + = "{\"properties\":{\"hybridAksIpamEnabled\":\"False\",\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"lhupmomihzbdnpxp\",\"ipAllocationType\":\"DualStack\",\"ipv4ConnectedPrefix\":\"reyxelyicghf\",\"ipv6ConnectedPrefix\":\"ufssjyghsfxr\",\"l3IsolationDomainId\":\"bh\",\"vlan\":6755343471165764305,\"associatedResourceIds\":[\"qfmefgvqcpdwj\",\"quxweyslandkd\",\"djhunhghcgawnr\"],\"clusterId\":\"quox\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"reimseob\",\"hybridAksClustersAssociatedIds\":[\"stcyilbvzmmxcjz\",\"quzexokjxebjvbz\",\"n\"],\"virtualMachinesAssociatedIds\":[\"wmvogljsv\",\"pgidnw\",\"ehaqidoyzltgio\"],\"provisioningState\":\"Succeeded\"},\"etag\":\"pepiaeapfs\",\"extendedLocation\":{\"name\":\"rgdtpeqnacyheqw\",\"type\":\"EdgeZone\"},\"location\":\"qncjubkhjozfymcw\",\"tags\":{\"li\":\"pyvqy\",\"hddzydisnuepy\":\"iipsejbsvsiaies\",\"dpxot\":\"yjln\"},\"id\":\"diiaocqibzji\",\"name\":\"weebiphryv\",\"type\":\"jw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,35 +38,36 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); L3Network response = manager.l3Networks() - .define("wxspvckojaz") - .withRegion("vxprwpxsoohu") - .withExistingResourceGroup("kzpatqtdi") - .withExtendedLocation(new ExtendedLocation().withName("zpvpvdyly").withType("covqseusrfjbdxzf")) - .withL3IsolationDomainId("cauwazcgwdfriwg") - .withVlan(7466162583914746093L) - .withTags(mapOf("lfb", "cskltezuuggg", "srtmdylperpiltt", "rdcgu")) - .withHybridAksIpamEnabled(HybridAksIpamEnabled.TRUE) + .define("bfokxkhu") + .withRegion("ctxbxmolpcqyd") + .withExistingResourceGroup("znlw") + .withExtendedLocation(new ExtendedLocation().withName("xh").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withL3IsolationDomainId("ugekdfqn") + .withVlan(3321786969285103938L) + .withTags( + mapOf("rjeizik", "vskiczd", "ycqsxr", "qaboohxbms", "ewuyqa", "d", "hdaurghooxaexb", "ohpjhgejkbv")) + .withHybridAksIpamEnabled(HybridAksIpamEnabled.FALSE) .withHybridAksPluginType(HybridAksPluginType.DPDK) - .withInterfaceName("jvavdpwwo") - .withIpAllocationType(IpAllocationType.IPV6) - .withIpv4ConnectedPrefix("htitsffofwan") - .withIpv6ConnectedPrefix("k") - .withIfMatch("muqkevzgjypanhx") - .withIfNoneMatch("pdxxzetwwz") + .withInterfaceName("g") + .withIpAllocationType(IpAllocationType.DUAL_STACK) + .withIpv4ConnectedPrefix("drmyfcemftzg") + .withIpv6ConnectedPrefix("kya") + .withIfMatch("cdgzseznux") + .withIfNoneMatch("euairaabmdlqjb") .create(); - Assertions.assertEquals("a", response.location()); - Assertions.assertEquals("ncogmipnmliqmvlb", response.tags().get("i")); - Assertions.assertEquals("foxqwecrsn", response.extendedLocation().name()); - Assertions.assertEquals("pcs", response.extendedLocation().type()); + Assertions.assertEquals("qncjubkhjozfymcw", response.location()); + Assertions.assertEquals("pyvqy", response.tags().get("li")); + Assertions.assertEquals("rgdtpeqnacyheqw", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, response.extendedLocation().type()); Assertions.assertEquals(HybridAksIpamEnabled.FALSE, response.hybridAksIpamEnabled()); Assertions.assertEquals(HybridAksPluginType.OSDEVICE, response.hybridAksPluginType()); - Assertions.assertEquals("lpzbtzuykykipf", response.interfaceName()); + Assertions.assertEquals("lhupmomihzbdnpxp", response.interfaceName()); Assertions.assertEquals(IpAllocationType.DUAL_STACK, response.ipAllocationType()); - Assertions.assertEquals("pfnocm", response.ipv4ConnectedPrefix()); - Assertions.assertEquals("zacfpztgazw", response.ipv6ConnectedPrefix()); - Assertions.assertEquals("qejg", response.l3IsolationDomainId()); - Assertions.assertEquals(1459817406277558792L, response.vlan()); + Assertions.assertEquals("reyxelyicghf", response.ipv4ConnectedPrefix()); + Assertions.assertEquals("ufssjyghsfxr", response.ipv6ConnectedPrefix()); + Assertions.assertEquals("bh", response.l3IsolationDomainId()); + Assertions.assertEquals(6755343471165764305L, response.vlan()); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksGetByResourceGroupWithResponseMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksGetByResourceGroupWithResponseMockTests.java index 22690ffa266e..97923414c85c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksGetByResourceGroupWithResponseMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksGetByResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -10,6 +10,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksIpamEnabled; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; import com.azure.resourcemanager.networkcloud.models.IpAllocationType; @@ -24,7 +25,7 @@ public final class L3NetworksGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"etag\":\"swhddzydisnuep\",\"extendedLocation\":{\"name\":\"wyj\",\"type\":\"nldpxottd\"},\"properties\":{\"associatedResourceIds\":[\"ocqibz\",\"ihweeb\",\"ph\"],\"clusterId\":\"vcjwqwoqsratj\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"ybspijhfrzg\",\"hybridAksClustersAssociatedIds\":[\"agvwukhs\",\"s\",\"mo\"],\"hybridAksIpamEnabled\":\"False\",\"hybridAksPluginType\":\"DPDK\",\"interfaceName\":\"ilz\",\"ipAllocationType\":\"DualStack\",\"ipv4ConnectedPrefix\":\"jmriprlkdneyttlr\",\"ipv6ConnectedPrefix\":\"ivcbkutpumltwj\",\"l3IsolationDomainId\":\"lu\",\"provisioningState\":\"Failed\",\"virtualMachinesAssociatedIds\":[\"vzlqywa\",\"y\",\"njc\",\"hmocgjshg\"],\"vlan\":584905929377318569},\"location\":\"hwvixqqggljkybsj\",\"tags\":{\"nrbctbhpjhxpcvrd\":\"rvtz\",\"it\":\"y\"},\"id\":\"n\",\"name\":\"qady\",\"type\":\"zjahwriuomz\"}"; + = "{\"properties\":{\"hybridAksIpamEnabled\":\"True\",\"hybridAksPluginType\":\"DPDK\",\"interfaceName\":\"qepdx\",\"ipAllocationType\":\"DualStack\",\"ipv4ConnectedPrefix\":\"ubwyv\",\"ipv6ConnectedPrefix\":\"bowcpjqduqgi\",\"l3IsolationDomainId\":\"exkydfb\",\"vlan\":1311107899721887491,\"associatedResourceIds\":[\"huerkjddvrglie\",\"ftcvbii\",\"tksdwgdnkefgmw\",\"hcebuvczldbglzo\"],\"clusterId\":\"baaq\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"ajclyzgsnorbjg\",\"hybridAksClustersAssociatedIds\":[\"jotvmrxkhl\",\"bvvjbhvhdiq\",\"yfluiyuosnuudte\"],\"virtualMachinesAssociatedIds\":[\"yibdrqrswhbuu\",\"pyrowtj\",\"xztfwfqchvczevj\"],\"provisioningState\":\"Failed\"},\"etag\":\"agfyvrtpqpe\",\"extendedLocation\":{\"name\":\"hzcgkrepdqhqyhwq\",\"type\":\"EdgeZone\"},\"location\":\"vx\",\"tags\":{\"greohtwhlpuzjp\":\"ckmzeoxin\",\"angp\":\"eezn\",\"phmsexroq\":\"bfaxyxzlbc\",\"nfee\":\"ndktxfv\"},\"id\":\"gpkrie\",\"name\":\"bgnixxoww\",\"type\":\"kyfwnwpiwxeiicr\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,20 +35,20 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); L3Network response = manager.l3Networks() - .getByResourceGroupWithResponse("upyvqyvliq", "ipsejbsvsia", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("nlduwzorxsbm", "aqklxy", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hwvixqqggljkybsj", response.location()); - Assertions.assertEquals("rvtz", response.tags().get("nrbctbhpjhxpcvrd")); - Assertions.assertEquals("wyj", response.extendedLocation().name()); - Assertions.assertEquals("nldpxottd", response.extendedLocation().type()); - Assertions.assertEquals(HybridAksIpamEnabled.FALSE, response.hybridAksIpamEnabled()); + Assertions.assertEquals("vx", response.location()); + Assertions.assertEquals("ckmzeoxin", response.tags().get("greohtwhlpuzjp")); + Assertions.assertEquals("hzcgkrepdqhqyhwq", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, response.extendedLocation().type()); + Assertions.assertEquals(HybridAksIpamEnabled.TRUE, response.hybridAksIpamEnabled()); Assertions.assertEquals(HybridAksPluginType.DPDK, response.hybridAksPluginType()); - Assertions.assertEquals("ilz", response.interfaceName()); + Assertions.assertEquals("qepdx", response.interfaceName()); Assertions.assertEquals(IpAllocationType.DUAL_STACK, response.ipAllocationType()); - Assertions.assertEquals("jmriprlkdneyttlr", response.ipv4ConnectedPrefix()); - Assertions.assertEquals("ivcbkutpumltwj", response.ipv6ConnectedPrefix()); - Assertions.assertEquals("lu", response.l3IsolationDomainId()); - Assertions.assertEquals(584905929377318569L, response.vlan()); + Assertions.assertEquals("ubwyv", response.ipv4ConnectedPrefix()); + Assertions.assertEquals("bowcpjqduqgi", response.ipv6ConnectedPrefix()); + Assertions.assertEquals("exkydfb", response.l3IsolationDomainId()); + Assertions.assertEquals(1311107899721887491L, response.vlan()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListByResourceGroupMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListByResourceGroupMockTests.java index d4ef844886ab..db832ff0eedf 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListByResourceGroupMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListByResourceGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,6 +11,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksIpamEnabled; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; import com.azure.resourcemanager.networkcloud.models.IpAllocationType; @@ -25,7 +26,7 @@ public final class L3NetworksListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"wcdgzsez\",\"extendedLocation\":{\"name\":\"uxk\",\"type\":\"uairaabmdlqjb\"},\"properties\":{\"associatedResourceIds\":[\"f\",\"xlhupmomihzbdnp\",\"pkcdpreyxely\"],\"clusterId\":\"ghflrufssjyghsf\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"hammgmqfmefgv\",\"hybridAksClustersAssociatedIds\":[\"dwj\"],\"hybridAksIpamEnabled\":\"False\",\"hybridAksPluginType\":\"SRIOV\",\"interfaceName\":\"ysla\",\"ipAllocationType\":\"DualStack\",\"ipv4ConnectedPrefix\":\"cdjhunhg\",\"ipv6ConnectedPrefix\":\"gawnrrnquo\",\"l3IsolationDomainId\":\"sotirei\",\"provisioningState\":\"Provisioning\",\"virtualMachinesAssociatedIds\":[\"fsxstcyil\"],\"vlan\":2470753648192054819},\"location\":\"mxcjzlquzexokjx\",\"tags\":{\"bwmvogljsvl\":\"vbzinz\",\"nwcehaqidoyzl\":\"gi\",\"pepiaeapfs\":\"giomqo\",\"pqqncju\":\"rgdtpeqnacyheqw\"},\"id\":\"khjoz\",\"name\":\"ymc\",\"type\":\"m\"}]}"; + = "{\"value\":[{\"properties\":{\"hybridAksIpamEnabled\":\"True\",\"hybridAksPluginType\":\"SRIOV\",\"interfaceName\":\"kjgyacwrasekwe\",\"ipAllocationType\":\"IPV4\",\"ipv4ConnectedPrefix\":\"inwoqartwyxq\",\"ipv6ConnectedPrefix\":\"l\",\"l3IsolationDomainId\":\"dvatdavuqm\",\"vlan\":3114917814169988623,\"associatedResourceIds\":[\"fobjlquvjezcj\",\"mvpsimioyo\"],\"clusterId\":\"l\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"wnnra\",\"hybridAksClustersAssociatedIds\":[\"bbfqpspklady\"],\"virtualMachinesAssociatedIds\":[\"hautw\",\"kexzgpmnmabeddqi\",\"wg\",\"fpfqf\"],\"provisioningState\":\"Failed\"},\"etag\":\"tclg\",\"extendedLocation\":{\"name\":\"rvwerfwxbsmtb\",\"type\":\"EdgeZone\"},\"location\":\"ehhcifkwdv\",\"tags\":{\"hsqhtf\":\"rek\",\"yejuwyqwdqigmghg\":\"wpq\",\"jcmrnkfm\":\"nztxlujkh\"},\"id\":\"h\",\"name\":\"qtwmlmhjnqtqeahj\",\"type\":\"dvragpokddxejhh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,20 +35,20 @@ public void testListByResourceGroup() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.l3Networks() - .listByResourceGroup("obektmbozo", 141243233, "zamicb", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.l3Networks().listByResourceGroup("p", 289516872, "kldmaxxijv", com.azure.core.util.Context.NONE); - Assertions.assertEquals("mxcjzlquzexokjx", response.iterator().next().location()); - Assertions.assertEquals("vbzinz", response.iterator().next().tags().get("bwmvogljsvl")); - Assertions.assertEquals("uxk", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("uairaabmdlqjb", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals(HybridAksIpamEnabled.FALSE, response.iterator().next().hybridAksIpamEnabled()); + Assertions.assertEquals("ehhcifkwdv", response.iterator().next().location()); + Assertions.assertEquals("rek", response.iterator().next().tags().get("hsqhtf")); + Assertions.assertEquals("rvwerfwxbsmtb", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, response.iterator().next().extendedLocation().type()); + Assertions.assertEquals(HybridAksIpamEnabled.TRUE, response.iterator().next().hybridAksIpamEnabled()); Assertions.assertEquals(HybridAksPluginType.SRIOV, response.iterator().next().hybridAksPluginType()); - Assertions.assertEquals("ysla", response.iterator().next().interfaceName()); - Assertions.assertEquals(IpAllocationType.DUAL_STACK, response.iterator().next().ipAllocationType()); - Assertions.assertEquals("cdjhunhg", response.iterator().next().ipv4ConnectedPrefix()); - Assertions.assertEquals("gawnrrnquo", response.iterator().next().ipv6ConnectedPrefix()); - Assertions.assertEquals("sotirei", response.iterator().next().l3IsolationDomainId()); - Assertions.assertEquals(2470753648192054819L, response.iterator().next().vlan()); + Assertions.assertEquals("kjgyacwrasekwe", response.iterator().next().interfaceName()); + Assertions.assertEquals(IpAllocationType.IPV4, response.iterator().next().ipAllocationType()); + Assertions.assertEquals("inwoqartwyxq", response.iterator().next().ipv4ConnectedPrefix()); + Assertions.assertEquals("l", response.iterator().next().ipv6ConnectedPrefix()); + Assertions.assertEquals("dvatdavuqm", response.iterator().next().l3IsolationDomainId()); + Assertions.assertEquals(3114917814169988623L, response.iterator().next().vlan()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListMockTests.java index 1d0c9c3356a7..3eff19379c21 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/L3NetworksListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,6 +11,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksIpamEnabled; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; import com.azure.resourcemanager.networkcloud.models.IpAllocationType; @@ -25,7 +26,7 @@ public final class L3NetworksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"qkpmmzpstau\",\"extendedLocation\":{\"name\":\"lawiubmomsgvvjhv\",\"type\":\"lrlohewjjmajnkdf\"},\"properties\":{\"associatedResourceIds\":[\"onswae\",\"kzfzqxjosho\"],\"clusterId\":\"otryegp\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"mexznlwkb\",\"hybridAksClustersAssociatedIds\":[\"xkhupzeruf\",\"jblcdrmyfcemftz\",\"yykyalu\",\"ekdfqnhttwd\"],\"hybridAksIpamEnabled\":\"False\",\"hybridAksPluginType\":\"SRIOV\",\"interfaceName\":\"jjnnu\",\"ipAllocationType\":\"DualStack\",\"ipv4ConnectedPrefix\":\"kmhmnulwempdc\",\"ipv6ConnectedPrefix\":\"rhjul\",\"l3IsolationDomainId\":\"sulwzpflusn\",\"provisioningState\":\"Provisioning\",\"virtualMachinesAssociatedIds\":[\"gzotfriyrgkoekvz\"],\"vlan\":6701485974284673902},\"location\":\"xh\",\"tags\":{\"y\":\"ctxbxmolpcqyd\",\"rjeizik\":\"vskiczd\",\"ycqsxr\":\"qaboohxbms\",\"ewuyqa\":\"d\"},\"id\":\"ohpjhgejkbv\",\"name\":\"hdaurghooxaexb\",\"type\":\"hxjxjoezlqxrkdkn\"}]}"; + = "{\"value\":[{\"properties\":{\"hybridAksIpamEnabled\":\"True\",\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"n\",\"ipAllocationType\":\"IPV6\",\"ipv4ConnectedPrefix\":\"voffbkkwvdxae\",\"ipv6ConnectedPrefix\":\"okmyr\",\"l3IsolationDomainId\":\"jialz\",\"vlan\":9119391442695798487,\"associatedResourceIds\":[\"qlpbcjtrpzuyu\",\"ivb\",\"nhsqeaeo\"],\"clusterId\":\"elwg\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"uzytz\",\"hybridAksClustersAssociatedIds\":[\"gatmoljiy\",\"mpinmzvfkneerzzt\",\"knsjulugd\"],\"virtualMachinesAssociatedIds\":[\"h\",\"xlelfjh\"],\"provisioningState\":\"Succeeded\"},\"etag\":\"cpihtd\",\"extendedLocation\":{\"name\":\"iwje\",\"type\":\"EdgeZone\"},\"location\":\"ycayd\",\"tags\":{\"ymlcfnzhmhsurlg\":\"c\",\"lawiubmomsgvvjhv\":\"qkpmmzpstau\",\"q\":\"lrlohewjjmajnkdf\"},\"id\":\"onswae\",\"name\":\"kzfzqxjosho\",\"type\":\"totryegpkhxrme\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,19 +36,19 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.l3Networks().list(1691066269, "mlcfnzhmhsurl", com.azure.core.util.Context.NONE); + = manager.l3Networks().list(1037150316, "guavtptb", com.azure.core.util.Context.NONE); - Assertions.assertEquals("xh", response.iterator().next().location()); - Assertions.assertEquals("ctxbxmolpcqyd", response.iterator().next().tags().get("y")); - Assertions.assertEquals("lawiubmomsgvvjhv", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("lrlohewjjmajnkdf", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals(HybridAksIpamEnabled.FALSE, response.iterator().next().hybridAksIpamEnabled()); - Assertions.assertEquals(HybridAksPluginType.SRIOV, response.iterator().next().hybridAksPluginType()); - Assertions.assertEquals("jjnnu", response.iterator().next().interfaceName()); - Assertions.assertEquals(IpAllocationType.DUAL_STACK, response.iterator().next().ipAllocationType()); - Assertions.assertEquals("kmhmnulwempdc", response.iterator().next().ipv4ConnectedPrefix()); - Assertions.assertEquals("rhjul", response.iterator().next().ipv6ConnectedPrefix()); - Assertions.assertEquals("sulwzpflusn", response.iterator().next().l3IsolationDomainId()); - Assertions.assertEquals(6701485974284673902L, response.iterator().next().vlan()); + Assertions.assertEquals("ycayd", response.iterator().next().location()); + Assertions.assertEquals("c", response.iterator().next().tags().get("ymlcfnzhmhsurlg")); + Assertions.assertEquals("iwje", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, response.iterator().next().extendedLocation().type()); + Assertions.assertEquals(HybridAksIpamEnabled.TRUE, response.iterator().next().hybridAksIpamEnabled()); + Assertions.assertEquals(HybridAksPluginType.OSDEVICE, response.iterator().next().hybridAksPluginType()); + Assertions.assertEquals("n", response.iterator().next().interfaceName()); + Assertions.assertEquals(IpAllocationType.IPV6, response.iterator().next().ipAllocationType()); + Assertions.assertEquals("voffbkkwvdxae", response.iterator().next().ipv4ConnectedPrefix()); + Assertions.assertEquals("okmyr", response.iterator().next().ipv6ConnectedPrefix()); + Assertions.assertEquals("jialz", response.iterator().next().l3IsolationDomainId()); + Assertions.assertEquals(9119391442695798487L, response.iterator().next().vlan()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/LldpNeighborTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/LldpNeighborTests.java index 0eb71c7296b5..5c6ac945609a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/LldpNeighborTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/LldpNeighborTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class LldpNeighborTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LldpNeighbor model = BinaryData.fromString( - "{\"portDescription\":\"cpkvxodp\",\"portName\":\"zmyzydagf\",\"systemDescription\":\"xbezyiuokktwh\",\"systemName\":\"xw\"}") + "{\"portDescription\":\"tko\",\"portName\":\"kouknvudwtiu\",\"systemDescription\":\"ldngkpoci\",\"systemName\":\"z\"}") .toObject(LldpNeighbor.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LldpNeighbor model = new LldpNeighbor(); - model = BinaryData.fromObject(model).toObject(LldpNeighbor.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MachineDiskTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MachineDiskTests.java index 38f0c8396039..bbc9c11dce43 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MachineDiskTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MachineDiskTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class MachineDiskTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MachineDisk model - = BinaryData.fromString("{\"capacityGB\":4553721559996277354,\"connection\":\"SATA\",\"type\":\"HDD\"}") + = BinaryData.fromString("{\"capacityGB\":5182793984668664248,\"connection\":\"SAS\",\"type\":\"HDD\"}") .toObject(MachineDisk.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MachineDisk model = new MachineDisk(); - model = BinaryData.fromObject(model).toObject(MachineDisk.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MachineSkuPropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MachineSkuPropertiesTests.java index 24d740b234ef..415da8c55056 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MachineSkuPropertiesTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MachineSkuPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class MachineSkuPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MachineSkuProperties model = BinaryData.fromString( - "{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":1719366045480402245,\"cpuSockets\":7619374097798741860,\"disks\":[{\"capacityGB\":5863879937017764721,\"connection\":\"SATA\",\"type\":\"HDD\"},{\"capacityGB\":2141504836823617741,\"connection\":\"PCIE\",\"type\":\"HDD\"},{\"capacityGB\":6123695980685376909,\"connection\":\"SATA\",\"type\":\"SSD\"},{\"capacityGB\":6153155610369609304,\"connection\":\"SATA\",\"type\":\"HDD\"}],\"generation\":\"aoqltfaey\",\"hardwareVersion\":\"nm\",\"memoryCapacityGB\":3765841685495474303,\"model\":\"r\",\"networkInterfaces\":[{\"address\":\"iypoqeyhlqhykprl\",\"deviceConnectionType\":\"PCI\",\"model\":\"uciqdsme\",\"physicalSlot\":4627205265824000180,\"portCount\":8619463311072378679,\"portSpeed\":8781324783652978030,\"vendor\":\"siibmiybnnustgn\"},{\"address\":\"hnmgixhcm\",\"deviceConnectionType\":\"PCI\",\"model\":\"foudor\",\"physicalSlot\":858195418025778709,\"portCount\":3767091522852862514,\"portSpeed\":3063026725783370811,\"vendor\":\"pundmbxhug\"},{\"address\":\"jkavl\",\"deviceConnectionType\":\"PCI\",\"model\":\"mftpmdtz\",\"physicalSlot\":6562239674764125403,\"portCount\":8628108633019438318,\"portSpeed\":1872475560881606725,\"vendor\":\"t\"},{\"address\":\"p\",\"deviceConnectionType\":\"PCI\",\"model\":\"pbdbzqgqqi\",\"physicalSlot\":6059165866604595135,\"portCount\":7204032751679115216,\"portSpeed\":7606272604171191671,\"vendor\":\"yibcy\"}],\"totalThreads\":4999567940157518830,\"vendor\":\"qcwdhoh\"}") + "{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":5628376431700848630,\"cpuSockets\":2924984698457968804,\"disks\":[{\"capacityGB\":1557828548687606223,\"connection\":\"RAID\",\"type\":\"HDD\"},{\"capacityGB\":5881845161603044253,\"connection\":\"PCIE\",\"type\":\"SSD\"},{\"capacityGB\":5875589274994463526,\"connection\":\"RAID\",\"type\":\"HDD\"}],\"generation\":\"wx\",\"hardwareVersion\":\"etnpsihcl\",\"memoryCapacityGB\":4315788795289855622,\"model\":\"ylptrsqqwztcm\",\"networkInterfaces\":[{\"address\":\"hcxwaxfewzjk\",\"deviceConnectionType\":\"PCI\",\"model\":\"deqvhp\",\"physicalSlot\":5573018307183568158,\"portCount\":2729975343862622969,\"portSpeed\":8558433599401446154,\"vendor\":\"mbmxzjrgywwpgj\"},{\"address\":\"nptfujgi\",\"deviceConnectionType\":\"PCI\",\"model\":\"o\",\"physicalSlot\":743740462567186099,\"portCount\":1188771817840939205,\"portSpeed\":1018671505577555599,\"vendor\":\"emxswvruu\"}],\"totalThreads\":1943986028850637874,\"vendor\":\"ehkfkimrtixok\"}") .toObject(MachineSkuProperties.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MachineSkuProperties model = new MachineSkuProperties(); - model = BinaryData.fromObject(model).toObject(MachineSkuProperties.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MachineSkuSlotTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MachineSkuSlotTests.java index 3be28371db19..ca006193eb26 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MachineSkuSlotTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MachineSkuSlotTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class MachineSkuSlotTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MachineSkuSlot model = BinaryData.fromString( - "{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":3955378754753814141,\"cpuSockets\":6478797052084392248,\"disks\":[{\"capacityGB\":5234398548126737926,\"connection\":\"SATA\",\"type\":\"SSD\"}],\"generation\":\"jrngif\",\"hardwareVersion\":\"z\",\"memoryCapacityGB\":1555196494956757044,\"model\":\"biuimzdlyjdfq\",\"networkInterfaces\":[{\"address\":\"oq\",\"deviceConnectionType\":\"PCI\",\"model\":\"ruzslzoj\",\"physicalSlot\":2650325028757147436,\"portCount\":1377563080214000034,\"portSpeed\":2513451830292217319,\"vendor\":\"ngfdgugeyzihgrky\"},{\"address\":\"zabs\",\"deviceConnectionType\":\"PCI\",\"model\":\"phojeevyhy\",\"physicalSlot\":3597759724277023056,\"portCount\":2624052315369945941,\"portSpeed\":1704315015203532161,\"vendor\":\"fgbegl\"}],\"totalThreads\":7540927851450246514,\"vendor\":\"hibetnluankrr\"},\"rackSlot\":2941839870830389436}") + "{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":3503454276923362644,\"cpuSockets\":4439313743690311269,\"disks\":[{\"capacityGB\":7818962809948117328,\"connection\":\"SATA\",\"type\":\"HDD\"},{\"capacityGB\":3233974969665153765,\"connection\":\"SAS\",\"type\":\"SSD\"},{\"capacityGB\":7758128291062501815,\"connection\":\"SAS\",\"type\":\"SSD\"}],\"generation\":\"pofap\",\"hardwareVersion\":\"hryl\",\"memoryCapacityGB\":5973350387675876264,\"model\":\"zgb\",\"networkInterfaces\":[{\"address\":\"mstk\",\"deviceConnectionType\":\"PCI\",\"model\":\"xbcuiiznkt\",\"physicalSlot\":6615229551245613232,\"portCount\":1659358832604322079,\"portSpeed\":8973350542875534019,\"vendor\":\"mik\"}],\"totalThreads\":8410179822617843543,\"vendor\":\"bkiw\"},\"rackSlot\":2906864622240498001}") .toObject(MachineSkuSlot.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MachineSkuSlot model = new MachineSkuSlot(); - model = BinaryData.fromObject(model).toObject(MachineSkuSlot.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ManagedResourceGroupConfigurationTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ManagedResourceGroupConfigurationTests.java index 02086efa2537..58851b67efa3 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ManagedResourceGroupConfigurationTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ManagedResourceGroupConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,18 +12,18 @@ public final class ManagedResourceGroupConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedResourceGroupConfiguration model - = BinaryData.fromString("{\"location\":\"aeaeneqnzarrw\",\"name\":\"uu\"}") + = BinaryData.fromString("{\"location\":\"gxqquezik\",\"name\":\"ggxkallatmelwuip\"}") .toObject(ManagedResourceGroupConfiguration.class); - Assertions.assertEquals("aeaeneqnzarrw", model.location()); - Assertions.assertEquals("uu", model.name()); + Assertions.assertEquals("gxqquezik", model.location()); + Assertions.assertEquals("ggxkallatmelwuip", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedResourceGroupConfiguration model - = new ManagedResourceGroupConfiguration().withLocation("aeaeneqnzarrw").withName("uu"); + = new ManagedResourceGroupConfiguration().withLocation("gxqquezik").withName("ggxkallatmelwuip"); model = BinaryData.fromObject(model).toObject(ManagedResourceGroupConfiguration.class); - Assertions.assertEquals("aeaeneqnzarrw", model.location()); - Assertions.assertEquals("uu", model.name()); + Assertions.assertEquals("gxqquezik", model.location()); + Assertions.assertEquals("ggxkallatmelwuip", model.name()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ManagedServiceIdentityTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ManagedServiceIdentityTests.java index 16ed484438f0..bd535ace3f04 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ManagedServiceIdentityTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ManagedServiceIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -16,7 +16,7 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"3a2f607e-234e-49e7-bee5-ff900641e417\",\"tenantId\":\"5e2702a7-4043-450a-93a2-8b87c6c4a0d6\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"rjxgciqib\":{\"principalId\":\"fe67100b-50d6-4c4c-8811-978beaadcc05\",\"clientId\":\"1107ecf2-5f68-4d9b-b133-b85117ef8d9f\"},\"sxsdqrhzoymibm\":{\"principalId\":\"f88cf1d1-a868-4372-8974-206ba050da4e\",\"clientId\":\"0c2ab54c-1e9e-4505-9880-fb00b0aecb16\"}}}") + "{\"principalId\":\"hyrnxxmu\",\"tenantId\":\"dndrdvstkwqqtche\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"qagvrvm\":{\"principalId\":\"tdaaygdvwvg\",\"clientId\":\"ohgwxrtfudxepxg\"},\"wi\":{\"principalId\":\"k\",\"clientId\":\"ghimdblx\"},\"oqreyfkzikfjawn\":{\"principalId\":\"njhf\",\"clientId\":\"wmszkk\"},\"c\":{\"principalId\":\"ivx\",\"clientId\":\"zel\"}}}") .toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); } @@ -24,8 +24,8 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("rjxgciqib", new UserAssignedIdentity(), "sxsdqrhzoymibm", new UserAssignedIdentity())); + .withUserAssignedIdentities(mapOf("qagvrvm", new UserAssignedIdentity(), "wi", new UserAssignedIdentity(), + "oqreyfkzikfjawn", new UserAssignedIdentity(), "c", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsCreateOrUpdateMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsCreateOrUpdateMockTests.java index a3dddbe70da6..ebfada2d8019 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsCreateOrUpdateMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,6 +12,7 @@ import com.azure.resourcemanager.networkcloud.NetworkCloudManager; import com.azure.resourcemanager.networkcloud.models.ClusterMetricsConfiguration; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; @@ -25,7 +26,7 @@ public final class MetricsConfigurationsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"xsdpla\",\"extendedLocation\":{\"name\":\"mydmhweqjfyxydgt\",\"type\":\"kvqb\"},\"properties\":{\"collectionInterval\":453336181139262277,\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"zpvxak\",\"disabledMetrics\":[\"p\",\"esrfgamqiydvx\"],\"enabledMetrics\":[\"hyhgo\"],\"provisioningState\":\"Succeeded\"},\"location\":\"yqyxyjrcbqpbis\",\"tags\":{\"o\":\"q\",\"fwjlof\":\"tdahneaoovtyjzti\"},\"id\":\"ekfsrm\",\"name\":\"uklajvcfoc\",\"type\":\"hapejov\"}"; + = "{\"properties\":{\"enabledMetrics\":[\"nhrkmjqncfvdsc\",\"hemvwfnqqwypvnd\",\"wbgodtggrssg\"],\"collectionInterval\":8028256275846920878,\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"njm\",\"disabledMetrics\":[\"vecvzts\",\"bgmusaictd\",\"cnk\",\"zohnrddclzeqozre\"],\"provisioningState\":\"Succeeded\"},\"etag\":\"qixbnjrqvzyuexo\",\"extendedLocation\":{\"name\":\"onynpa\",\"type\":\"EdgeZone\"},\"location\":\"dpabcreuwzosg\",\"tags\":{\"ormrexzv\":\"vcva\",\"uvecovsd\":\"ubewgzygba\",\"akrlimzfvppkeqsi\":\"hzrtd\",\"gygnhrkombc\":\"jmcl\"},\"id\":\"tajdopggorwjoqtr\",\"name\":\"tpvclpofyrlmwk\",\"type\":\"tskwxjgvhxccbm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,23 +36,24 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ClusterMetricsConfiguration response = manager.metricsConfigurations() - .define("dwxmda") - .withRegion("pwfkc") - .withExistingCluster("dgfttmd", "fgeoagfuoftnx") - .withExtendedLocation(new ExtendedLocation().withName("vmdmzenlr").withType("tgfczljdncidtjva")) - .withCollectionInterval(7260754244675782444L) - .withTags(mapOf("avcpfpdofuckclbt", "u")) - .withEnabledMetrics(Arrays.asList("ejidbdqzsq", "nycwz", "lv", "wsnmrkkyjt")) - .withIfMatch("wpdkktpmbmxbmb") - .withIfNoneMatch("wgzzxljb") + .define("dajjvywe") + .withRegion("yslb") + .withExistingCluster("fkkauigvmua", "mczfedyuepsvplt") + .withExtendedLocation( + new ExtendedLocation().withName("oonsvobchkxfp").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withCollectionInterval(8821955780576555831L) + .withTags(mapOf("wayqshwyqxrid", "lmnnk", "aqjmkgxqwque", "tb")) + .withEnabledMetrics(Arrays.asList("kumcfjxokyelsy", "svfnkwm", "gjjekrkn")) + .withIfMatch("zcntogffjwajnrtw") + .withIfNoneMatch("vaqkifmxawost") .create(); - Assertions.assertEquals("yqyxyjrcbqpbis", response.location()); - Assertions.assertEquals("q", response.tags().get("o")); - Assertions.assertEquals("mydmhweqjfyxydgt", response.extendedLocation().name()); - Assertions.assertEquals("kvqb", response.extendedLocation().type()); - Assertions.assertEquals(453336181139262277L, response.collectionInterval()); - Assertions.assertEquals("hyhgo", response.enabledMetrics().get(0)); + Assertions.assertEquals("dpabcreuwzosg", response.location()); + Assertions.assertEquals("vcva", response.tags().get("ormrexzv")); + Assertions.assertEquals("onynpa", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, response.extendedLocation().type()); + Assertions.assertEquals("nhrkmjqncfvdsc", response.enabledMetrics().get(0)); + Assertions.assertEquals(8028256275846920878L, response.collectionInterval()); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsGetWithResponseMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsGetWithResponseMockTests.java index 996e3d190b40..3569cddedd29 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsGetWithResponseMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,6 +11,7 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; import com.azure.resourcemanager.networkcloud.models.ClusterMetricsConfiguration; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -21,7 +22,7 @@ public final class MetricsConfigurationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"etag\":\"hxlantolaml\",\"extendedLocation\":{\"name\":\"i\",\"type\":\"uxkqllczipvwdt\"},\"properties\":{\"collectionInterval\":2370513998098704540,\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"iqdlratrkw\",\"disabledMetrics\":[\"uwxsuykznhrfgsl\",\"lhpryjfzihuio\",\"eo\",\"pajtfeyvkbd\"],\"enabledMetrics\":[\"krhd\",\"cxbeuuqutkzwtjww\",\"uzy\"],\"provisioningState\":\"Accepted\"},\"location\":\"xfn\",\"tags\":{\"bjuckc\":\"egjdydhqkk\"},\"id\":\"tuqbhp\",\"name\":\"wcnxtpzdlyseid\",\"type\":\"oa\"}"; + = "{\"properties\":{\"enabledMetrics\":[\"d\",\"hyaaknyukibxiglh\",\"hzwxq\",\"ejp\"],\"collectionInterval\":4242590137995643405,\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"oz\",\"disabledMetrics\":[\"jjnxkby\",\"hyyxgffklvqzrwt\",\"dgscnvqeonsgnwx\",\"wmezyohxp\"],\"provisioningState\":\"Accepted\"},\"etag\":\"opvkvtwfves\",\"extendedLocation\":{\"name\":\"bpbokhmml\",\"type\":\"CustomLocation\"},\"location\":\"arnggcjfwblqh\",\"tags\":{\"aosd\":\"smcolmugpy\",\"wzxeygzvtyevjhu\":\"l\",\"y\":\"nobguqisqsqkpdmi\",\"iqcpszpmcvq\":\"pnml\"},\"id\":\"vrdmvxyrxdh\",\"name\":\"vqojbxaotcgbz\",\"type\":\"mbtple\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +32,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ClusterMetricsConfiguration response = manager.metricsConfigurations() - .getWithResponse("ooy", "cuxd", "zcqipsdudgcozzo", com.azure.core.util.Context.NONE) + .getWithResponse("ydqfttkacy", "dueurgmcdcpkshl", "jermhzic", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xfn", response.location()); - Assertions.assertEquals("egjdydhqkk", response.tags().get("bjuckc")); - Assertions.assertEquals("i", response.extendedLocation().name()); - Assertions.assertEquals("uxkqllczipvwdt", response.extendedLocation().type()); - Assertions.assertEquals(2370513998098704540L, response.collectionInterval()); - Assertions.assertEquals("krhd", response.enabledMetrics().get(0)); + Assertions.assertEquals("arnggcjfwblqh", response.location()); + Assertions.assertEquals("smcolmugpy", response.tags().get("aosd")); + Assertions.assertEquals("bpbokhmml", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, response.extendedLocation().type()); + Assertions.assertEquals("d", response.enabledMetrics().get(0)); + Assertions.assertEquals(4242590137995643405L, response.collectionInterval()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsListByClusterMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsListByClusterMockTests.java index 2021d1e1fed9..20d0e0858307 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsListByClusterMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/MetricsConfigurationsListByClusterMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,6 +12,7 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; import com.azure.resourcemanager.networkcloud.models.ClusterMetricsConfiguration; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -22,7 +23,7 @@ public final class MetricsConfigurationsListByClusterMockTests { @Test public void testListByCluster() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"axmfmvsmcwoxfa\",\"extendedLocation\":{\"name\":\"dtnqifbsa\",\"type\":\"roiauesugmo\"},\"properties\":{\"collectionInterval\":5982117037743674062,\"detailedStatus\":\"Processing\",\"detailedStatusMessage\":\"boel\",\"disabledMetrics\":[\"twfld\",\"iuorinikc\",\"dpk\",\"riwmmtmqrxrzqv\"],\"enabledMetrics\":[\"zyayubtgmbxi\",\"ahr\",\"gpx\",\"ibplnupoyryefqm\"],\"provisioningState\":\"Failed\"},\"location\":\"ztxlnomfpbjceeg\",\"tags\":{\"tkutnjil\":\"e\",\"mjodu\":\"ukkrehyh\",\"jlgdez\":\"fvulxfaryr\",\"axqvjweiwtczkddn\":\"jqwahoyi\"},\"id\":\"ovbooqbmdqrxy\",\"name\":\"laetscflwtjdtlr\",\"type\":\"e\"}]}"; + = "{\"value\":[{\"properties\":{\"enabledMetrics\":[\"mxlpnerxrz\",\"tylcu\",\"za\",\"mnb\"],\"collectionInterval\":4812050994129134240,\"detailedStatus\":\"Applied\",\"detailedStatusMessage\":\"dbjmbnvynfa\",\"disabledMetrics\":[\"actedcglskak\",\"didahzl\",\"rqm\",\"lpbyxroiduyq\"],\"provisioningState\":\"Canceled\"},\"etag\":\"mnoiicsudy\",\"extendedLocation\":{\"name\":\"brjjtalxrdsjr\",\"type\":\"CustomLocation\"},\"location\":\"uqwg\",\"tags\":{\"jwyblvtbdmvsb\":\"xhdod\",\"tlo\":\"idaelqpvekmkwjfb\",\"ivuxcjkcoqwczs\":\"gdusxurs\"},\"id\":\"iqrizfwihvaan\",\"name\":\"qtnhjrfd\",\"type\":\"fdvbbaexxjfwtg\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +33,14 @@ public void testListByCluster() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.metricsConfigurations() - .listByCluster("ewikfyaqandmym", "qoq", 931337231, "movsfbpbvz", com.azure.core.util.Context.NONE); + .listByCluster("oioyidoxznvgvd", "muuv", 1986395251, "wsxmrszb", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ztxlnomfpbjceeg", response.iterator().next().location()); - Assertions.assertEquals("e", response.iterator().next().tags().get("tkutnjil")); - Assertions.assertEquals("dtnqifbsa", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("roiauesugmo", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals(5982117037743674062L, response.iterator().next().collectionInterval()); - Assertions.assertEquals("zyayubtgmbxi", response.iterator().next().enabledMetrics().get(0)); + Assertions.assertEquals("uqwg", response.iterator().next().location()); + Assertions.assertEquals("xhdod", response.iterator().next().tags().get("jwyblvtbdmvsb")); + Assertions.assertEquals("brjjtalxrdsjr", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, + response.iterator().next().extendedLocation().type()); + Assertions.assertEquals("mxlpnerxrz", response.iterator().next().enabledMetrics().get(0)); + Assertions.assertEquals(4812050994129134240L, response.iterator().next().collectionInterval()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/NetworkAttachmentTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/NetworkAttachmentTests.java index 150a529d150d..637ed95a8d1c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/NetworkAttachmentTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/NetworkAttachmentTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,30 +14,30 @@ public final class NetworkAttachmentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkAttachment model = BinaryData.fromString( - "{\"attachedNetworkId\":\"pqqmted\",\"defaultGateway\":\"True\",\"ipAllocationMethod\":\"Static\",\"ipv4Address\":\"ihyeozphvw\",\"ipv6Address\":\"y\",\"macAddress\":\"c\",\"networkAttachmentName\":\"upkvipmdsc\"}") + "{\"attachedNetworkId\":\"ehwagoh\",\"defaultGateway\":\"True\",\"ipAllocationMethod\":\"Static\",\"ipv4Address\":\"mrqemvvhmx\",\"ipv6Address\":\"rjfut\",\"macAddress\":\"oe\",\"networkAttachmentName\":\"vewzcj\"}") .toObject(NetworkAttachment.class); - Assertions.assertEquals("pqqmted", model.attachedNetworkId()); + Assertions.assertEquals("ehwagoh", model.attachedNetworkId()); Assertions.assertEquals(DefaultGateway.TRUE, model.defaultGateway()); Assertions.assertEquals(VirtualMachineIpAllocationMethod.STATIC, model.ipAllocationMethod()); - Assertions.assertEquals("ihyeozphvw", model.ipv4Address()); - Assertions.assertEquals("y", model.ipv6Address()); - Assertions.assertEquals("upkvipmdsc", model.networkAttachmentName()); + Assertions.assertEquals("mrqemvvhmx", model.ipv4Address()); + Assertions.assertEquals("rjfut", model.ipv6Address()); + Assertions.assertEquals("vewzcj", model.networkAttachmentName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkAttachment model = new NetworkAttachment().withAttachedNetworkId("pqqmted") + NetworkAttachment model = new NetworkAttachment().withAttachedNetworkId("ehwagoh") .withDefaultGateway(DefaultGateway.TRUE) .withIpAllocationMethod(VirtualMachineIpAllocationMethod.STATIC) - .withIpv4Address("ihyeozphvw") - .withIpv6Address("y") - .withNetworkAttachmentName("upkvipmdsc"); + .withIpv4Address("mrqemvvhmx") + .withIpv6Address("rjfut") + .withNetworkAttachmentName("vewzcj"); model = BinaryData.fromObject(model).toObject(NetworkAttachment.class); - Assertions.assertEquals("pqqmted", model.attachedNetworkId()); + Assertions.assertEquals("ehwagoh", model.attachedNetworkId()); Assertions.assertEquals(DefaultGateway.TRUE, model.defaultGateway()); Assertions.assertEquals(VirtualMachineIpAllocationMethod.STATIC, model.ipAllocationMethod()); - Assertions.assertEquals("ihyeozphvw", model.ipv4Address()); - Assertions.assertEquals("y", model.ipv6Address()); - Assertions.assertEquals("upkvipmdsc", model.networkAttachmentName()); + Assertions.assertEquals("mrqemvvhmx", model.ipv4Address()); + Assertions.assertEquals("rjfut", model.ipv6Address()); + Assertions.assertEquals("vewzcj", model.networkAttachmentName()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/NetworkInterfaceTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/NetworkInterfaceTests.java index 14d157a19cd7..27293d868b43 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/NetworkInterfaceTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/NetworkInterfaceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class NetworkInterfaceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkInterface model = BinaryData.fromString( - "{\"address\":\"fcohdxbzlmcmu\",\"deviceConnectionType\":\"PCI\",\"model\":\"hdbevwqqxeyskon\",\"physicalSlot\":328893230492625152,\"portCount\":4259363860416490102,\"portSpeed\":1183436721296067733,\"vendor\":\"bowxe\"}") + "{\"address\":\"epqw\",\"deviceConnectionType\":\"PCI\",\"model\":\"onsts\",\"physicalSlot\":1750180945243588501,\"portCount\":8975179932311001443,\"portSpeed\":5137206342334411658,\"vendor\":\"du\"}") .toObject(NetworkInterface.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkInterface model = new NetworkInterface(); - model = BinaryData.fromObject(model).toObject(NetworkInterface.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/NicTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/NicTests.java index e2ef0d68e3c8..52e05227b333 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/NicTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/NicTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class NicTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Nic model = BinaryData.fromString( - "{\"lldpNeighbor\":{\"portDescription\":\"vmdajvnysou\",\"portName\":\"e\",\"systemDescription\":\"noae\",\"systemName\":\"fhyhltrpmopjmcma\"},\"macAddress\":\"okth\",\"name\":\"iuaod\"}") + "{\"lldpNeighbor\":{\"portDescription\":\"kevle\",\"portName\":\"zfbuhf\",\"systemDescription\":\"faxkffeii\",\"systemName\":\"lvmezyvshxmzsbbz\"},\"macAddress\":\"gigr\",\"name\":\"burvjxxjnspy\"}") .toObject(Nic.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Nic model = new Nic(); - model = BinaryData.fromObject(model).toObject(Nic.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OperationDisplayTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OperationDisplayTests.java index 2eaf21cfe9fc..762f17faa2b7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OperationDisplayTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OperationDisplayTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"}") + "{\"provider\":\"cdm\",\"resource\":\"rcryuanzwuxzdxta\",\"operation\":\"lhmwhfpmrqobm\",\"description\":\"kknryrtihf\"}") .toObject(OperationDisplay.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OperationInnerTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OperationInnerTests.java index 70835e2a94b0..40ad2abc7bf7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OperationInnerTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OperationInnerTests.java @@ -1,24 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.networkcloud.fluent.models.OperationInner; -import com.azure.resourcemanager.networkcloud.models.OperationDisplay; public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationInner model = BinaryData.fromString( - "{\"name\":\"usarhmofc\",\"isDataAction\":false,\"display\":{\"provider\":\"urkdtmlx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") + "{\"name\":\"nygj\",\"isDataAction\":true,\"display\":{\"provider\":\"eqsrdeupewnwreit\",\"resource\":\"yflusarhmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") .toObject(OperationInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OperationListResultTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OperationListResultTests.java index 4a869218698b..cd999a312d9c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OperationListResultTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OperationListResultTests.java @@ -1,23 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.networkcloud.models.OperationListResult; +import com.azure.resourcemanager.networkcloud.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\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"izhwlrxy\",\"isDataAction\":false,\"display\":{\"provider\":\"ijgkdm\",\"resource\":\"azlobcufpdznrbt\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"rifkwm\",\"isDataAction\":true,\"display\":{\"provider\":\"izntocipao\",\"resource\":\"jpsq\",\"operation\":\"mpoyfd\",\"description\":\"ogknygjofjdd\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"upewnwreitjzy\"}") + "{\"value\":[{\"name\":\"hq\",\"isDataAction\":true,\"display\":{\"provider\":\"pybczmehmtzopb\",\"resource\":\"h\",\"operation\":\"pidgsybbejhphoyc\",\"description\":\"xaobhdxbmtqioqjz\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"fpownoizhwlr\",\"isDataAction\":false,\"display\":{\"provider\":\"oqijgkdmbpaz\",\"resource\":\"bc\",\"operation\":\"pdznrbtcqqjnqgl\",\"description\":\"gnufoooj\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"esaagdfm\",\"isDataAction\":true,\"display\":{\"provider\":\"j\",\"resource\":\"ifkwmrvktsizntoc\",\"operation\":\"a\",\"description\":\"ajpsquc\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"kfo\"}") .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); + Assertions.assertEquals("kfo", model.nextLink()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OperationsListMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OperationsListMockTests.java index fae82d9d7d26..0b06921b97c0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OperationsListMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OperationsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -21,7 +21,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"uwxeoiojfizf\",\"isDataAction\":true,\"display\":{\"provider\":\"wfbcyaykmmfzsbf\",\"resource\":\"rzx\",\"operation\":\"ewsrsxkrplbjaze\",\"description\":\"w\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"gd\",\"isDataAction\":true,\"display\":{\"provider\":\"ycblevpmcl\",\"resource\":\"yxkyxlz\",\"operation\":\"jgkz\",\"description\":\"taf\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OsDiskTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OsDiskTests.java index 97353e4c343c..ac9db6c0f89d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OsDiskTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/OsDiskTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -15,21 +15,21 @@ public final class OsDiskTests { public void testDeserialize() throws Exception { OsDisk model = BinaryData .fromString( - "{\"createOption\":\"Persistent\",\"deleteOption\":\"Delete\",\"diskSizeGB\":5164563630289510273}") + "{\"createOption\":\"Persistent\",\"deleteOption\":\"Delete\",\"diskSizeGB\":616571322617834074}") .toObject(OsDisk.class); Assertions.assertEquals(OsDiskCreateOption.PERSISTENT, model.createOption()); Assertions.assertEquals(OsDiskDeleteOption.DELETE, model.deleteOption()); - Assertions.assertEquals(5164563630289510273L, model.diskSizeGB()); + Assertions.assertEquals(616571322617834074L, model.diskSizeGB()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { OsDisk model = new OsDisk().withCreateOption(OsDiskCreateOption.PERSISTENT) .withDeleteOption(OsDiskDeleteOption.DELETE) - .withDiskSizeGB(5164563630289510273L); + .withDiskSizeGB(616571322617834074L); model = BinaryData.fromObject(model).toObject(OsDisk.class); Assertions.assertEquals(OsDiskCreateOption.PERSISTENT, model.createOption()); Assertions.assertEquals(OsDiskDeleteOption.DELETE, model.deleteOption()); - Assertions.assertEquals(5164563630289510273L, model.diskSizeGB()); + Assertions.assertEquals(616571322617834074L, model.diskSizeGB()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackInnerTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackInnerTests.java index 7ea1cf8291d8..5661d19aa62c 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackInnerTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackInnerTests.java @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.networkcloud.fluent.models.RackInner; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -15,37 +16,36 @@ public final class RackInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RackInner model = BinaryData.fromString( - "{\"etag\":\"tifdwfmvi\",\"extendedLocation\":{\"name\":\"orq\",\"type\":\"bttzhraglkafhonq\"},\"properties\":{\"availabilityZone\":\"ujeickp\",\"clusterId\":\"cpopmxel\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"tyjedex\",\"provisioningState\":\"Succeeded\",\"rackLocation\":\"f\",\"rackSerialNumber\":\"kqscazuawxtzx\",\"rackSkuId\":\"uamwabzxrvxc\"},\"location\":\"hsphaivmxyas\",\"tags\":{\"smjblmljhlnym\":\"gsgzwywakoihk\",\"zcbmqqvxmvwf\":\"otqyry\",\"nsup\":\"tayx\",\"oibgsxg\":\"ujlzqnhcvsqltn\"},\"id\":\"xfyqonmpqoxwdo\",\"name\":\"dbxiqx\",\"type\":\"iiqbi\"}") + "{\"properties\":{\"availabilityZone\":\"nnbsoqeqa\",\"rackLocation\":\"arvlagunbt\",\"rackSerialNumber\":\"febwlnbmhyreeudz\",\"rackSkuId\":\"av\",\"clusterId\":\"dqmjxly\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"gouwtlmj\",\"provisioningState\":\"Canceled\"},\"etag\":\"j\",\"extendedLocation\":{\"name\":\"tob\",\"type\":\"CustomLocation\"},\"location\":\"j\",\"tags\":{\"snkq\":\"unlbfjkwr\"},\"id\":\"hsyrqunj\",\"name\":\"hdenxaulk\",\"type\":\"akdkifmjnnawtqab\"}") .toObject(RackInner.class); - Assertions.assertEquals("hsphaivmxyas", model.location()); - Assertions.assertEquals("gsgzwywakoihk", model.tags().get("smjblmljhlnym")); - Assertions.assertEquals("orq", model.extendedLocation().name()); - Assertions.assertEquals("bttzhraglkafhonq", model.extendedLocation().type()); - Assertions.assertEquals("ujeickp", model.availabilityZone()); - Assertions.assertEquals("f", model.rackLocation()); - Assertions.assertEquals("kqscazuawxtzx", model.rackSerialNumber()); - Assertions.assertEquals("uamwabzxrvxc", model.rackSkuId()); + Assertions.assertEquals("j", model.location()); + Assertions.assertEquals("unlbfjkwr", model.tags().get("snkq")); + Assertions.assertEquals("tob", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.extendedLocation().type()); + Assertions.assertEquals("nnbsoqeqa", model.availabilityZone()); + Assertions.assertEquals("arvlagunbt", model.rackLocation()); + Assertions.assertEquals("febwlnbmhyreeudz", model.rackSerialNumber()); + Assertions.assertEquals("av", model.rackSkuId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RackInner model = new RackInner().withLocation("hsphaivmxyas") - .withTags(mapOf("smjblmljhlnym", "gsgzwywakoihk", "zcbmqqvxmvwf", "otqyry", "nsup", "tayx", "oibgsxg", - "ujlzqnhcvsqltn")) - .withExtendedLocation(new ExtendedLocation().withName("orq").withType("bttzhraglkafhonq")) - .withAvailabilityZone("ujeickp") - .withRackLocation("f") - .withRackSerialNumber("kqscazuawxtzx") - .withRackSkuId("uamwabzxrvxc"); + RackInner model = new RackInner().withLocation("j") + .withTags(mapOf("snkq", "unlbfjkwr")) + .withExtendedLocation(new ExtendedLocation().withName("tob").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withAvailabilityZone("nnbsoqeqa") + .withRackLocation("arvlagunbt") + .withRackSerialNumber("febwlnbmhyreeudz") + .withRackSkuId("av"); model = BinaryData.fromObject(model).toObject(RackInner.class); - Assertions.assertEquals("hsphaivmxyas", model.location()); - Assertions.assertEquals("gsgzwywakoihk", model.tags().get("smjblmljhlnym")); - Assertions.assertEquals("orq", model.extendedLocation().name()); - Assertions.assertEquals("bttzhraglkafhonq", model.extendedLocation().type()); - Assertions.assertEquals("ujeickp", model.availabilityZone()); - Assertions.assertEquals("f", model.rackLocation()); - Assertions.assertEquals("kqscazuawxtzx", model.rackSerialNumber()); - Assertions.assertEquals("uamwabzxrvxc", model.rackSkuId()); + Assertions.assertEquals("j", model.location()); + Assertions.assertEquals("unlbfjkwr", model.tags().get("snkq")); + Assertions.assertEquals("tob", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.extendedLocation().type()); + Assertions.assertEquals("nnbsoqeqa", model.availabilityZone()); + Assertions.assertEquals("arvlagunbt", model.rackLocation()); + Assertions.assertEquals("febwlnbmhyreeudz", model.rackSerialNumber()); + Assertions.assertEquals("av", model.rackSkuId()); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackListTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackListTests.java index 6dd230b0165d..293e579f43f7 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackListTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackListTests.java @@ -1,75 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.networkcloud.fluent.models.RackInner; -import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; -import com.azure.resourcemanager.networkcloud.models.RackList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.networkcloud.implementation.models.RackList; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import org.junit.jupiter.api.Assertions; public final class RackListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RackList model = BinaryData.fromString( - "{\"nextLink\":\"ipqxbkwvzgnzv\",\"value\":[{\"etag\":\"d\",\"extendedLocation\":{\"name\":\"xzmqpnodawop\",\"type\":\"hewjptmcgsbost\"},\"properties\":{\"availabilityZone\":\"eln\",\"clusterId\":\"atutmzlbiojlvfhr\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"eqvcwwyyurmoch\",\"provisioningState\":\"Succeeded\",\"rackLocation\":\"prsnmokayzejn\",\"rackSerialNumber\":\"lbkpb\",\"rackSkuId\":\"pcpil\"},\"location\":\"a\",\"tags\":{\"wiuub\":\"echndbnwieholew\",\"x\":\"efqsfapaqtferrqw\",\"pjwogqqno\":\"kmfx\",\"dabtqwp\":\"pud\"},\"id\":\"yawbzasqbu\",\"name\":\"ljgkyex\",\"type\":\"oguyaip\"},{\"etag\":\"sdaultxij\",\"extendedLocation\":{\"name\":\"um\",\"type\":\"qwazlnqnmcjngzq\"},\"properties\":{\"availabilityZone\":\"qxtbjwgnyf\",\"clusterId\":\"fzsvtuikzh\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"lcfhmlrqryxy\",\"provisioningState\":\"Failed\",\"rackLocation\":\"zrdpsovwxznptgoe\",\"rackSerialNumber\":\"ybbabpfhvfsl\",\"rackSkuId\":\"vntjlrigjk\"},\"location\":\"yrio\",\"tags\":{\"znmmaxrizkzobgo\":\"idsxwaabzmifry\"},\"id\":\"xlhslnel\",\"name\":\"ieixynllxe\",\"type\":\"wcrojphslhcaw\"}]}") + "{\"value\":[{\"properties\":{\"availabilityZone\":\"rnjhvsujztczytqj\",\"rackLocation\":\"w\",\"rackSerialNumber\":\"auunfprnjletlx\",\"rackSkuId\":\"mr\",\"clusterId\":\"do\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"mowaziynknlqwzdv\",\"provisioningState\":\"Provisioning\"},\"etag\":\"xqszdtmaajquh\",\"extendedLocation\":{\"name\":\"xylrjvmtygjbmz\",\"type\":\"CustomLocation\"},\"location\":\"ps\",\"tags\":{\"fkyjpmspbpssdfpp\":\"c\",\"rxmunjdxvgln\":\"ogtieyujtvczkcny\",\"aglqivbgkcvkh\":\"vxlx\",\"yp\":\"zvuqdflvon\"},\"id\":\"pubcpzgpxtivhjk\",\"name\":\"idibgqjxgpn\",\"type\":\"hgovfgp\"},{\"properties\":{\"availabilityZone\":\"kqmhhaowjr\",\"rackLocation\":\"zvuporqzdfuydz\",\"rackSerialNumber\":\"kfvxcnq\",\"rackSkuId\":\"xqpswok\",\"clusterId\":\"khlg\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"em\",\"provisioningState\":\"Provisioning\"},\"etag\":\"sz\",\"extendedLocation\":{\"name\":\"wiwtglxxhl\",\"type\":\"CustomLocation\"},\"location\":\"gpicr\",\"tags\":{\"mqgjsxvpq\":\"hr\",\"bakclacjfrnxous\":\"bfrmbodthsqqgvri\",\"lwvsgm\":\"au\",\"xmmkjs\":\"ohqfzizv\"},\"id\":\"thnwpzte\",\"name\":\"ovmribiattg\",\"type\":\"lu\"}],\"nextLink\":\"otangcfhnykzc\"}") .toObject(RackList.class); - Assertions.assertEquals("ipqxbkwvzgnzv", model.nextLink()); - Assertions.assertEquals("a", model.value().get(0).location()); - Assertions.assertEquals("echndbnwieholew", model.value().get(0).tags().get("wiuub")); - Assertions.assertEquals("xzmqpnodawop", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("hewjptmcgsbost", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("eln", model.value().get(0).availabilityZone()); - Assertions.assertEquals("prsnmokayzejn", model.value().get(0).rackLocation()); - Assertions.assertEquals("lbkpb", model.value().get(0).rackSerialNumber()); - Assertions.assertEquals("pcpil", model.value().get(0).rackSkuId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RackList model = new RackList().withNextLink("ipqxbkwvzgnzv") - .withValue(Arrays.asList( - new RackInner().withLocation("a") - .withTags(mapOf("wiuub", "echndbnwieholew", "x", "efqsfapaqtferrqw", "pjwogqqno", "kmfx", "dabtqwp", - "pud")) - .withExtendedLocation(new ExtendedLocation().withName("xzmqpnodawop").withType("hewjptmcgsbost")) - .withAvailabilityZone("eln") - .withRackLocation("prsnmokayzejn") - .withRackSerialNumber("lbkpb") - .withRackSkuId("pcpil"), - new RackInner().withLocation("yrio") - .withTags(mapOf("znmmaxrizkzobgo", "idsxwaabzmifry")) - .withExtendedLocation(new ExtendedLocation().withName("um").withType("qwazlnqnmcjngzq")) - .withAvailabilityZone("qxtbjwgnyf") - .withRackLocation("zrdpsovwxznptgoe") - .withRackSerialNumber("ybbabpfhvfsl") - .withRackSkuId("vntjlrigjk"))); - model = BinaryData.fromObject(model).toObject(RackList.class); - Assertions.assertEquals("ipqxbkwvzgnzv", model.nextLink()); - Assertions.assertEquals("a", model.value().get(0).location()); - Assertions.assertEquals("echndbnwieholew", model.value().get(0).tags().get("wiuub")); - Assertions.assertEquals("xzmqpnodawop", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("hewjptmcgsbost", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("eln", model.value().get(0).availabilityZone()); - Assertions.assertEquals("prsnmokayzejn", model.value().get(0).rackLocation()); - Assertions.assertEquals("lbkpb", model.value().get(0).rackSerialNumber()); - Assertions.assertEquals("pcpil", model.value().get(0).rackSkuId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("ps", model.value().get(0).location()); + Assertions.assertEquals("c", model.value().get(0).tags().get("fkyjpmspbpssdfpp")); + Assertions.assertEquals("xylrjvmtygjbmz", model.value().get(0).extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); + Assertions.assertEquals("rnjhvsujztczytqj", model.value().get(0).availabilityZone()); + Assertions.assertEquals("w", model.value().get(0).rackLocation()); + Assertions.assertEquals("auunfprnjletlx", model.value().get(0).rackSerialNumber()); + Assertions.assertEquals("mr", model.value().get(0).rackSkuId()); + Assertions.assertEquals("otangcfhnykzc", model.nextLink()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackPatchParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackPatchParametersTests.java index 9f649ae4f64c..ae6e0744798f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackPatchParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackPatchParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,23 +14,23 @@ public final class RackPatchParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RackPatchParameters model = BinaryData.fromString( - "{\"properties\":{\"rackLocation\":\"mewjjstliuhq\",\"rackSerialNumber\":\"moaiancz\"},\"tags\":{\"rxvvbxi\":\"drrslblxydk\",\"h\":\"kgfbqljnqkhy\",\"kulehurqlrq\":\"c\"}}") + "{\"properties\":{\"rackLocation\":\"wsdpgratzvzb\",\"rackSerialNumber\":\"byvi\"},\"tags\":{\"rgxffmshkw\":\"tbrxkjz\",\"qaclnapxbiy\":\"bkgozxwopdbydpi\",\"nfsm\":\"nugj\",\"i\":\"cttuxuu\"}}") .toObject(RackPatchParameters.class); - Assertions.assertEquals("drrslblxydk", model.tags().get("rxvvbxi")); - Assertions.assertEquals("mewjjstliuhq", model.rackLocation()); - Assertions.assertEquals("moaiancz", model.rackSerialNumber()); + Assertions.assertEquals("tbrxkjz", model.tags().get("rgxffmshkw")); + Assertions.assertEquals("wsdpgratzvzb", model.rackLocation()); + Assertions.assertEquals("byvi", model.rackSerialNumber()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RackPatchParameters model = new RackPatchParameters() - .withTags(mapOf("rxvvbxi", "drrslblxydk", "h", "kgfbqljnqkhy", "kulehurqlrq", "c")) - .withRackLocation("mewjjstliuhq") - .withRackSerialNumber("moaiancz"); + .withTags(mapOf("rgxffmshkw", "tbrxkjz", "qaclnapxbiy", "bkgozxwopdbydpi", "nfsm", "nugj", "i", "cttuxuu")) + .withRackLocation("wsdpgratzvzb") + .withRackSerialNumber("byvi"); model = BinaryData.fromObject(model).toObject(RackPatchParameters.class); - Assertions.assertEquals("drrslblxydk", model.tags().get("rxvvbxi")); - Assertions.assertEquals("mewjjstliuhq", model.rackLocation()); - Assertions.assertEquals("moaiancz", model.rackSerialNumber()); + Assertions.assertEquals("tbrxkjz", model.tags().get("rgxffmshkw")); + Assertions.assertEquals("wsdpgratzvzb", model.rackLocation()); + Assertions.assertEquals("byvi", model.rackSerialNumber()); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackPropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackPropertiesTests.java index 9521bda6cb3b..9e5a958811e2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackPropertiesTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,24 +12,24 @@ public final class RackPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RackProperties model = BinaryData.fromString( - "{\"availabilityZone\":\"htmwwinh\",\"clusterId\":\"f\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"vwbcblembnkbwv\",\"provisioningState\":\"Accepted\",\"rackLocation\":\"kdi\",\"rackSerialNumber\":\"qihebw\",\"rackSkuId\":\"swbzuwfmdurage\"}") + "{\"availabilityZone\":\"xuckpggqoweyir\",\"rackLocation\":\"hlisngw\",\"rackSerialNumber\":\"lqqmpiz\",\"rackSkuId\":\"uwnpqxpxiwfcng\",\"clusterId\":\"aas\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"mkzjvkviir\",\"provisioningState\":\"Failed\"}") .toObject(RackProperties.class); - Assertions.assertEquals("htmwwinh", model.availabilityZone()); - Assertions.assertEquals("kdi", model.rackLocation()); - Assertions.assertEquals("qihebw", model.rackSerialNumber()); - Assertions.assertEquals("swbzuwfmdurage", model.rackSkuId()); + Assertions.assertEquals("xuckpggqoweyir", model.availabilityZone()); + Assertions.assertEquals("hlisngw", model.rackLocation()); + Assertions.assertEquals("lqqmpiz", model.rackSerialNumber()); + Assertions.assertEquals("uwnpqxpxiwfcng", model.rackSkuId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RackProperties model = new RackProperties().withAvailabilityZone("htmwwinh") - .withRackLocation("kdi") - .withRackSerialNumber("qihebw") - .withRackSkuId("swbzuwfmdurage"); + RackProperties model = new RackProperties().withAvailabilityZone("xuckpggqoweyir") + .withRackLocation("hlisngw") + .withRackSerialNumber("lqqmpiz") + .withRackSkuId("uwnpqxpxiwfcng"); model = BinaryData.fromObject(model).toObject(RackProperties.class); - Assertions.assertEquals("htmwwinh", model.availabilityZone()); - Assertions.assertEquals("kdi", model.rackLocation()); - Assertions.assertEquals("qihebw", model.rackSerialNumber()); - Assertions.assertEquals("swbzuwfmdurage", model.rackSkuId()); + Assertions.assertEquals("xuckpggqoweyir", model.availabilityZone()); + Assertions.assertEquals("hlisngw", model.rackLocation()); + Assertions.assertEquals("lqqmpiz", model.rackSerialNumber()); + Assertions.assertEquals("uwnpqxpxiwfcng", model.rackSkuId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkuInnerTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkuInnerTests.java index 35aa5c5a673d..1ef6e5221f91 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkuInnerTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkuInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class RackSkuInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RackSkuInner model = BinaryData.fromString( - "{\"properties\":{\"computeMachines\":[{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":8257017600772006197,\"cpuSockets\":6781161495861742872,\"disks\":[{},{},{}],\"generation\":\"mgorffukisc\",\"hardwareVersion\":\"mzhwplefaxvxi\",\"memoryCapacityGB\":3815187464776090347,\"model\":\"nhnzeyqxt\",\"networkInterfaces\":[{},{},{}],\"totalThreads\":3073624003964712929,\"vendor\":\"hycav\"},\"rackSlot\":5405740747067335057},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":3935144936817968720,\"cpuSockets\":5700722260986013528,\"disks\":[{},{},{},{}],\"generation\":\"ra\",\"hardwareVersion\":\"aawiuagydwqfb\",\"memoryCapacityGB\":1262604314434896273,\"model\":\"giagtcojo\",\"networkInterfaces\":[{},{},{}],\"totalThreads\":7445301032940003541,\"vendor\":\"zjvusfzldmo\"},\"rackSlot\":6511894399368526158},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":4531739800208315375,\"cpuSockets\":2038378510011319534,\"disks\":[{}],\"generation\":\"wn\",\"hardwareVersion\":\"gkbugrjqct\",\"memoryCapacityGB\":8446800847434075812,\"model\":\"sofieypefojyqd\",\"networkInterfaces\":[{}],\"totalThreads\":5306132868413541114,\"vendor\":\"lcwkhihihlhz\"},\"rackSlot\":2778672543282420556},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":6672347204236907256,\"cpuSockets\":8583061153642738552,\"disks\":[{},{},{}],\"generation\":\"gmvecactxmw\",\"hardwareVersion\":\"e\",\"memoryCapacityGB\":5608617904673355549,\"model\":\"uqovekqvgqouwif\",\"networkInterfaces\":[{},{}],\"totalThreads\":9183052747374666189,\"vendor\":\"vqikfxcvhrfsphu\"},\"rackSlot\":3175568169989610074}],\"controllerMachines\":[{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":6566397554835939309,\"cpuSockets\":7510915489622860419,\"disks\":[{},{},{},{}],\"generation\":\"lxubyj\",\"hardwareVersion\":\"fmmfblcqcu\",\"memoryCapacityGB\":5812695396560817956,\"model\":\"brta\",\"networkInterfaces\":[{},{},{},{}],\"totalThreads\":7258780547466991490,\"vendor\":\"gdslqxihhrmoo\"},\"rackSlot\":3464871827628211920},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":3363600504828780777,\"cpuSockets\":3090727742403939104,\"disks\":[{},{}],\"generation\":\"hyrpetogebjoxs\",\"hardwareVersion\":\"vnh\",\"memoryCapacityGB\":2440288854728394690,\"model\":\"nk\",\"networkInterfaces\":[{},{}],\"totalThreads\":2268936239427891642,\"vendor\":\"rgaehvvibrxjj\"},\"rackSlot\":2423648304868086372},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":3325535032837049318,\"cpuSockets\":5162432054807967174,\"disks\":[{},{},{},{}],\"generation\":\"bklftidgfcwqmpim\",\"hardwareVersion\":\"xzhemjyh\",\"memoryCapacityGB\":1949053077919246869,\"model\":\"wtwko\",\"networkInterfaces\":[{},{}],\"totalThreads\":4443528325663482404,\"vendor\":\"bawpfajnjwltlwt\"},\"rackSlot\":3416986726528985836},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":3500461113555760194,\"cpuSockets\":8848282968778843918,\"disks\":[{},{}],\"generation\":\"xzrpo\",\"hardwareVersion\":\"mlnwiaaomylweazu\",\"memoryCapacityGB\":7974020410660782836,\"model\":\"hwwn\",\"networkInterfaces\":[{}],\"totalThreads\":1320181371616090958,\"vendor\":\"wpchwahf\"},\"rackSlot\":3620142772697441356}],\"description\":\"fepgfew\",\"maxClusterSlots\":1249286616541016233,\"provisioningState\":\"Succeeded\",\"rackType\":\"Single\",\"storageAppliances\":[{\"properties\":{\"capacityGB\":6562011647983375243,\"model\":\"jhlimmbcxfhbcpo\"},\"rackSlot\":8704516291305230819},{\"properties\":{\"capacityGB\":7495334357568508911,\"model\":\"izxfpxt\"},\"rackSlot\":345610697602000480}],\"supportedRackSkuIds\":[\"vftjuhd\"]},\"id\":\"zkmtgguwpijrajci\",\"name\":\"m\",\"type\":\"ghfcfiwrxgkneuvy\"}") + "{\"properties\":{\"computeMachines\":[{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":1985596769029107559,\"cpuSockets\":8577324891551933460,\"disks\":[{}],\"generation\":\"dija\",\"hardwareVersion\":\"kmr\",\"memoryCapacityGB\":7071098777858531261,\"model\":\"pndzaapmudqmeq\",\"networkInterfaces\":[{}],\"totalThreads\":7514618551189870017,\"vendor\":\"dqwyxeb\"},\"rackSlot\":5927921282145979607}],\"controllerMachines\":[{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":1332946340532377183,\"cpuSockets\":2747902607648645892,\"disks\":[{},{},{}],\"generation\":\"hheioqaqhvseuf\",\"hardwareVersion\":\"yrxpdlcgqls\",\"memoryCapacityGB\":7492834054588696197,\"model\":\"frddgamquhiosrsj\",\"networkInterfaces\":[{},{},{}],\"totalThreads\":7632126345733001237,\"vendor\":\"syirnx\"},\"rackSlot\":8420679751963722456},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":6168979236112539363,\"cpuSockets\":4318738101288519647,\"disks\":[{},{},{}],\"generation\":\"qvwre\",\"hardwareVersion\":\"h\",\"memoryCapacityGB\":6659635651854645314,\"model\":\"onzlr\",\"networkInterfaces\":[{},{},{}],\"totalThreads\":5735251027885146196,\"vendor\":\"vjtszcofize\"},\"rackSlot\":792315679479695703},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":7931419591420767379,\"cpuSockets\":6087235026911471667,\"disks\":[{},{},{},{}],\"generation\":\"urvzmlovuanashc\",\"hardwareVersion\":\"pmjerbdkelvidiz\",\"memoryCapacityGB\":8950212108583362641,\"model\":\"ccxjm\",\"networkInterfaces\":[{},{},{},{}],\"totalThreads\":5448438013312132369,\"vendor\":\"n\"},\"rackSlot\":4527807456286813914}],\"deploymentType\":\"Nexus\",\"description\":\"ltv\",\"maxClusterSlots\":111849641052843502,\"provisioningState\":\"Succeeded\",\"rackType\":\"Compute\",\"storageAppliances\":[{\"properties\":{\"capacityGB\":5957341701002815770,\"model\":\"mkdasv\"},\"rackSlot\":3956942710936432469},{\"properties\":{\"capacityGB\":1858673790373801209,\"model\":\"chxgs\"},\"rackSlot\":333256380210439105}],\"supportedRackSkuIds\":[\"or\",\"bwjl\",\"izbfhfovvacq\"]},\"id\":\"tuodxeszabbelaw\",\"name\":\"muaslzkw\",\"type\":\"rwoycqucwyh\"}") .toObject(RackSkuInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RackSkuInner model = new RackSkuInner(); - model = BinaryData.fromObject(model).toObject(RackSkuInner.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkuListTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkuListTests.java index e883d273e411..5c1007d77e6a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkuListTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkuListTests.java @@ -1,29 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.networkcloud.fluent.models.RackSkuInner; -import com.azure.resourcemanager.networkcloud.models.RackSkuList; -import java.util.Arrays; +import com.azure.resourcemanager.networkcloud.implementation.models.RackSkuList; import org.junit.jupiter.api.Assertions; public final class RackSkuListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RackSkuList model = BinaryData.fromString( - "{\"nextLink\":\"t\",\"value\":[{\"properties\":{\"computeMachines\":[{\"properties\":{},\"rackSlot\":4877326457534086186}],\"controllerMachines\":[{\"properties\":{},\"rackSlot\":2419863887449610399},{\"properties\":{},\"rackSlot\":4792946731310711053}],\"description\":\"riykhyawfvjlbox\",\"maxClusterSlots\":5752117387563894789,\"provisioningState\":\"Canceled\",\"rackType\":\"Aggregator\",\"storageAppliances\":[{\"properties\":{},\"rackSlot\":4997501643254233811}],\"supportedRackSkuIds\":[\"digumbnr\",\"auzzptjazysd\",\"hezwwvaiq\",\"uvvfonkp\"]},\"id\":\"qyikvy\",\"name\":\"auy\",\"type\":\"vluwmncsttij\"},{\"properties\":{\"computeMachines\":[{\"properties\":{},\"rackSlot\":1131525087104993997},{\"properties\":{},\"rackSlot\":8391608436330696052},{\"properties\":{},\"rackSlot\":710355428468886106},{\"properties\":{},\"rackSlot\":1237849568451312490}],\"controllerMachines\":[{\"properties\":{},\"rackSlot\":1322961762272036828},{\"properties\":{},\"rackSlot\":4680939042311346293},{\"properties\":{},\"rackSlot\":3126438893237171685}],\"description\":\"vhxnk\",\"maxClusterSlots\":620897221549417842,\"provisioningState\":\"Succeeded\",\"rackType\":\"Aggregator\",\"storageAppliances\":[{\"properties\":{},\"rackSlot\":6756573354746416594},{\"properties\":{},\"rackSlot\":8293741546882547786}],\"supportedRackSkuIds\":[\"rbbcevq\",\"gtltdhlf\"]},\"id\":\"ojpykvgtrdc\",\"name\":\"ifmzzsd\",\"type\":\"m\"},{\"properties\":{\"computeMachines\":[{\"properties\":{},\"rackSlot\":189738325553867740},{\"properties\":{},\"rackSlot\":6184667690008421335},{\"properties\":{},\"rackSlot\":503121974573452821},{\"properties\":{},\"rackSlot\":4964541234121083904}],\"controllerMachines\":[{\"properties\":{},\"rackSlot\":6423226063170477779}],\"description\":\"afqr\",\"maxClusterSlots\":4377068261003564511,\"provisioningState\":\"Succeeded\",\"rackType\":\"Aggregator\",\"storageAppliances\":[{\"properties\":{},\"rackSlot\":2567537558648922186}],\"supportedRackSkuIds\":[\"n\"]},\"id\":\"zudhcxg\",\"name\":\"moy\",\"type\":\"cdyuibhmfdnbzyd\"}]}") + "{\"value\":[{\"properties\":{\"computeMachines\":[{\"properties\":{},\"rackSlot\":8828570443204442415},{\"properties\":{},\"rackSlot\":1712808841653110945},{\"properties\":{},\"rackSlot\":3797241741133016842},{\"properties\":{},\"rackSlot\":1841698857513805001}],\"controllerMachines\":[{\"properties\":{},\"rackSlot\":6072707028717278190},{\"properties\":{},\"rackSlot\":4603582249541593699},{\"properties\":{},\"rackSlot\":5933716525001275557},{\"properties\":{},\"rackSlot\":8510007533425740916}],\"deploymentType\":\"Nexus\",\"description\":\"amikzebrqbsm\",\"maxClusterSlots\":7304335552495833986,\"provisioningState\":\"Failed\",\"rackType\":\"Aggregator\",\"storageAppliances\":[{\"properties\":{},\"rackSlot\":5796520203524612998},{\"properties\":{},\"rackSlot\":5551734927521047610}],\"supportedRackSkuIds\":[\"zznvfbyc\",\"sxjwwixz\",\"umwmxqhnd\",\"noamldsehaohdj\"]},\"id\":\"flzokxco\",\"name\":\"pelnjetag\",\"type\":\"tsxoatftgz\"},{\"properties\":{\"computeMachines\":[{\"properties\":{},\"rackSlot\":5239547603354777125},{\"properties\":{},\"rackSlot\":4457314256250463683},{\"properties\":{},\"rackSlot\":2169609325656919656},{\"properties\":{},\"rackSlot\":7073196543042110246}],\"controllerMachines\":[{\"properties\":{},\"rackSlot\":926180935823108880}],\"deploymentType\":\"Nexus\",\"description\":\"xp\",\"maxClusterSlots\":9179068643802450667,\"provisioningState\":\"Failed\",\"rackType\":\"Compute\",\"storageAppliances\":[{\"properties\":{},\"rackSlot\":4032272776338170115},{\"properties\":{},\"rackSlot\":7160892458188162484},{\"properties\":{},\"rackSlot\":8943726575584812694}],\"supportedRackSkuIds\":[\"ykggnoxuztrksx\",\"pndfcpfnznt\",\"jtwkjaos\"]},\"id\":\"uzvoamktcqiosm\",\"name\":\"bzahgxqd\",\"type\":\"yrtltlaprltzkat\"}],\"nextLink\":\"jm\"}") .toObject(RackSkuList.class); - Assertions.assertEquals("t", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RackSkuList model = new RackSkuList().withNextLink("t") - .withValue(Arrays.asList(new RackSkuInner(), new RackSkuInner(), new RackSkuInner())); - model = BinaryData.fromObject(model).toObject(RackSkuList.class); - Assertions.assertEquals("t", model.nextLink()); + Assertions.assertEquals("jm", model.nextLink()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkuPropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkuPropertiesTests.java index 0107bdb2bf32..8d0e68b7e33b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkuPropertiesTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkuPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class RackSkuPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RackSkuProperties model = BinaryData.fromString( - "{\"computeMachines\":[{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":3750012133983465786,\"cpuSockets\":8209594774647221116,\"disks\":[{\"capacityGB\":2307062476447283233,\"connection\":\"PCIE\",\"type\":\"SSD\"}],\"generation\":\"djtxvzflbq\",\"hardwareVersion\":\"aqvlgafcqusr\",\"memoryCapacityGB\":2891462100912693660,\"model\":\"wsdtutnwl\",\"networkInterfaces\":[{\"address\":\"vuzhyr\",\"deviceConnectionType\":\"PCI\",\"model\":\"pmvekdxukuqg\",\"physicalSlot\":5254842847093441878,\"portCount\":991801565539268143,\"portSpeed\":3831840091585839661,\"vendor\":\"twzhhzjhfjmhv\"},{\"address\":\"uvgp\",\"deviceConnectionType\":\"PCI\",\"model\":\"qsxvmhf\",\"physicalSlot\":3597130595501920514,\"portCount\":6054298155504718944,\"portSpeed\":1582901646901411001,\"vendor\":\"hudypohyuemsl\"},{\"address\":\"sqy\",\"deviceConnectionType\":\"PCI\",\"model\":\"obrltt\",\"physicalSlot\":9043452615401881021,\"portCount\":2822705328807657789,\"portSpeed\":329823131110202423,\"vendor\":\"wqzdzgtilaxhnfhq\"},{\"address\":\"vi\",\"deviceConnectionType\":\"PCI\",\"model\":\"iv\",\"physicalSlot\":1772617866401761125,\"portCount\":2107651122582785460,\"portSpeed\":2711072926459099280,\"vendor\":\"rtikvcpwpg\"}],\"totalThreads\":2033607653228693671,\"vendor\":\"vtsoxf\"},\"rackSlot\":1943698242721661529},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":6873379208566304564,\"cpuSockets\":3834497436762407259,\"disks\":[{\"capacityGB\":3859035258572277991,\"connection\":\"RAID\",\"type\":\"SSD\"},{\"capacityGB\":1209941014734232432,\"connection\":\"PCIE\",\"type\":\"HDD\"},{\"capacityGB\":5088928325379042418,\"connection\":\"PCIE\",\"type\":\"HDD\"},{\"capacityGB\":6511698838376376158,\"connection\":\"SATA\",\"type\":\"SSD\"}],\"generation\":\"itgvkx\",\"hardwareVersion\":\"yqdrf\",\"memoryCapacityGB\":8315615477236104244,\"model\":\"lzxwhcansy\",\"networkInterfaces\":[{\"address\":\"hlwigdivbkbxg\",\"deviceConnectionType\":\"PCI\",\"model\":\"juwasqvdaeyyguxa\",\"physicalSlot\":1768543157802312748,\"portCount\":8277292798365451719,\"portSpeed\":5510735422598293936,\"vendor\":\"gims\"},{\"address\":\"xasicddyvvjskg\",\"deviceConnectionType\":\"PCI\",\"model\":\"wa\",\"physicalSlot\":7564680402600460677,\"portCount\":3390876064345229126,\"portSpeed\":793879472405048297,\"vendor\":\"hvjhhnakzyb\"},{\"address\":\"jid\",\"deviceConnectionType\":\"PCI\",\"model\":\"xkyxvxevblbj\",\"physicalSlot\":4276098433975464246,\"portCount\":2586840399223689898,\"portSpeed\":8053457629616045832,\"vendor\":\"ulxunsmjbnkpp\"},{\"address\":\"nenlsvxeizzg\",\"deviceConnectionType\":\"PCI\",\"model\":\"srmffeycxcktpiym\",\"physicalSlot\":7578322139455994630,\"portCount\":5912844440370252704,\"portSpeed\":5121332797837870743,\"vendor\":\"ekkkzd\"}],\"totalThreads\":2620355279236222215,\"vendor\":\"doj\"},\"rackSlot\":2082724442990629363},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":7300295104660534778,\"cpuSockets\":2136655780922763953,\"disks\":[{\"capacityGB\":2601009471204076576,\"connection\":\"SATA\",\"type\":\"HDD\"},{\"capacityGB\":921543828288140521,\"connection\":\"RAID\",\"type\":\"SSD\"},{\"capacityGB\":4136420798110514219,\"connection\":\"RAID\",\"type\":\"HDD\"}],\"generation\":\"jibabxvititvtze\",\"hardwareVersion\":\"avoxtfg\",\"memoryCapacityGB\":1806363327704946060,\"model\":\"dqbwpypqtgsfja\",\"networkInterfaces\":[{\"address\":\"hhxud\",\"deviceConnectionType\":\"PCI\",\"model\":\"d\",\"physicalSlot\":5506706101384890254,\"portCount\":4635834386681075411,\"portSpeed\":5273047201771476754,\"vendor\":\"mes\"},{\"address\":\"dlpagzrcxfail\",\"deviceConnectionType\":\"PCI\",\"model\":\"m\",\"physicalSlot\":829494875413688656,\"portCount\":1563332735084443990,\"portSpeed\":1341547980781950371,\"vendor\":\"fqob\"},{\"address\":\"lnacgcc\",\"deviceConnectionType\":\"PCI\",\"model\":\"xkizvy\",\"physicalSlot\":5633654443710491466,\"portCount\":7497949976364269473,\"portSpeed\":149873479955101826,\"vendor\":\"eranokqgukkjqnv\"}],\"totalThreads\":8939885428846863813,\"vendor\":\"a\"},\"rackSlot\":1164407824886208345}],\"controllerMachines\":[{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":8813063868718248905,\"cpuSockets\":349526303477712226,\"disks\":[{\"capacityGB\":9056852957972786382,\"connection\":\"SATA\",\"type\":\"SSD\"},{\"capacityGB\":2927983603248571593,\"connection\":\"PCIE\",\"type\":\"HDD\"}],\"generation\":\"xgccknfnw\",\"hardwareVersion\":\"tmvpdvjdhtt\",\"memoryCapacityGB\":6530762857956828664,\"model\":\"dxihc\",\"networkInterfaces\":[{\"address\":\"k\",\"deviceConnectionType\":\"PCI\",\"model\":\"dqns\",\"physicalSlot\":4078114628376703258,\"portCount\":2373821376924677361,\"portSpeed\":560621963294403573,\"vendor\":\"kdghrjeuutlwx\"},{\"address\":\"w\",\"deviceConnectionType\":\"PCI\",\"model\":\"vbwnhhtq\",\"physicalSlot\":5216693841292626693,\"portCount\":4354778311974836326,\"portSpeed\":8884452462267616891,\"vendor\":\"hpfeoajvgcxtxjc\"},{\"address\":\"eafidltugsresm\",\"deviceConnectionType\":\"PCI\",\"model\":\"h\",\"physicalSlot\":6709597160075018242,\"portCount\":364736877007655451,\"portSpeed\":6901232777293635257,\"vendor\":\"prhptillu\"},{\"address\":\"iqtgdqoh\",\"deviceConnectionType\":\"PCI\",\"model\":\"ldrizetpwbra\",\"physicalSlot\":4960885543522270739,\"portCount\":4853013732326979462,\"portSpeed\":6275196957221765324,\"vendor\":\"izakak\"}],\"totalThreads\":2736442030278845624,\"vendor\":\"dnjzh\"},\"rackSlot\":8744285577704382416},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":1832935628192544233,\"cpuSockets\":1077522990830391189,\"disks\":[{\"capacityGB\":7770760945515751937,\"connection\":\"SATA\",\"type\":\"SSD\"},{\"capacityGB\":2562048566266687604,\"connection\":\"SATA\",\"type\":\"HDD\"}],\"generation\":\"ls\",\"hardwareVersion\":\"asylwx\",\"memoryCapacityGB\":5208621335089472252,\"model\":\"weoohguufuzboyj\",\"networkInterfaces\":[{\"address\":\"tzolbaemwmdxmeb\",\"deviceConnectionType\":\"PCI\",\"model\":\"jpahlxvea\",\"physicalSlot\":8557564999509312688,\"portCount\":8437685781238493437,\"portSpeed\":4337304815591047961,\"vendor\":\"bxyijddtvq\"},{\"address\":\"tad\",\"deviceConnectionType\":\"PCI\",\"model\":\"ukm\",\"physicalSlot\":1547853283947812576,\"portCount\":2783014338857793552,\"portSpeed\":3135579949231713310,\"vendor\":\"apm\"}],\"totalThreads\":8575681637135190756,\"vendor\":\"qwigpibudqwyxe\"},\"rackSlot\":6734664061885363456},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":49496790728655586,\"cpuSockets\":1332946340532377183,\"disks\":[{\"capacityGB\":7768435392191099229,\"connection\":\"SAS\",\"type\":\"SSD\"}],\"generation\":\"oqaqhvseufuq\",\"hardwareVersion\":\"xpdlcgqlsis\",\"memoryCapacityGB\":8778123664935644148,\"model\":\"ddgamquhiosr\",\"networkInterfaces\":[{\"address\":\"vfcdisyirn\",\"deviceConnectionType\":\"PCI\",\"model\":\"zexrxzbujrt\",\"physicalSlot\":5465986739762761293,\"portCount\":3272712647525819374,\"portSpeed\":4466423344073186452,\"vendor\":\"nlnzonzlrpi\"},{\"address\":\"wncvjtszcofiz\",\"deviceConnectionType\":\"PCI\",\"model\":\"hgbjkvrelje\",\"physicalSlot\":7618594905747782728,\"portCount\":2585382324823242598,\"portSpeed\":1705297672247999328,\"vendor\":\"anashc\"}],\"totalThreads\":7044849533931739174,\"vendor\":\"erbdk\"},\"rackSlot\":1692747516814602042},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":2858195800783424126,\"cpuSockets\":4411948419479719842,\"disks\":[{\"capacityGB\":8248426980818100328,\"connection\":\"SAS\",\"type\":\"SSD\"},{\"capacityGB\":704451323443143264,\"connection\":\"SAS\",\"type\":\"HDD\"}],\"generation\":\"w\",\"hardwareVersion\":\"tvuqjctzenkeifzz\",\"memoryCapacityGB\":8881432963036523048,\"model\":\"svflyhbxcudch\",\"networkInterfaces\":[{\"address\":\"boldforobwj\",\"deviceConnectionType\":\"PCI\",\"model\":\"bfhfovvacqp\",\"physicalSlot\":8405517070399780704,\"portCount\":4552677114563069774,\"portSpeed\":2983024631084256002,\"vendor\":\"belawumuaslzkwr\"},{\"address\":\"oycqucwy\",\"deviceConnectionType\":\"PCI\",\"model\":\"omd\",\"physicalSlot\":3253130239729689608,\"portCount\":5967428011863708063,\"portSpeed\":6548444138291841974,\"vendor\":\"urut\"},{\"address\":\"exxwlalniexzsrz\",\"deviceConnectionType\":\"PCI\",\"model\":\"q\",\"physicalSlot\":1794368220315847147,\"portCount\":6730843668651593065,\"portSpeed\":1098696631274616042,\"vendor\":\"chzyvlixqnrk\"}],\"totalThreads\":8602277819252722424,\"vendor\":\"bn\"},\"rackSlot\":3721253466968399292}],\"description\":\"xs\",\"maxClusterSlots\":809642463120717362,\"provisioningState\":\"Succeeded\",\"rackType\":\"Single\",\"storageAppliances\":[{\"properties\":{\"capacityGB\":8488562628713523190,\"model\":\"xoqqpwcyyufmhrun\"},\"rackSlot\":3686288365721871145},{\"properties\":{\"capacityGB\":1857225293627026318,\"model\":\"dqzh\"},\"rackSlot\":8505268301279663594},{\"properties\":{\"capacityGB\":4631597538653651763,\"model\":\"dyfpchrqbnj\"},\"rackSlot\":2058938403838687560}],\"supportedRackSkuIds\":[\"ydcwboxjumv\",\"qoli\"]}") + "{\"computeMachines\":[{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":2891901371356115128,\"cpuSockets\":1283727522429702185,\"disks\":[{\"capacityGB\":2765152678651095922,\"connection\":\"SAS\",\"type\":\"SSD\"},{\"capacityGB\":2159061689759842564,\"connection\":\"SAS\",\"type\":\"HDD\"},{\"capacityGB\":6857169433286305194,\"connection\":\"SATA\",\"type\":\"SSD\"},{\"capacityGB\":6869025053356818243,\"connection\":\"RAID\",\"type\":\"HDD\"}],\"generation\":\"tybbwwpgda\",\"hardwareVersion\":\"hzyvlixqnrkcx\",\"memoryCapacityGB\":2608808503660202421,\"model\":\"xmysuxswqrntv\",\"networkInterfaces\":[{\"address\":\"psttexoq\",\"deviceConnectionType\":\"PCI\",\"model\":\"yyufmhruncuw\",\"physicalSlot\":8923425830018101393,\"portCount\":3208896528750973652,\"portSpeed\":8691456965555082910,\"vendor\":\"ctddun\"},{\"address\":\"dyfpchrqbnj\",\"deviceConnectionType\":\"PCI\",\"model\":\"egy\",\"physicalSlot\":2669031291303700924,\"portCount\":6421108001355590803,\"portSpeed\":8931862476440383756,\"vendor\":\"qoli\"}],\"totalThreads\":4124022141259853246,\"vendor\":\"ouau\"},\"rackSlot\":4304077581666976714},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":29183485050815606,\"cpuSockets\":6619739056622145122,\"disks\":[{\"capacityGB\":6934695805962011619,\"connection\":\"PCIE\",\"type\":\"HDD\"},{\"capacityGB\":7914091406384868025,\"connection\":\"PCIE\",\"type\":\"HDD\"},{\"capacityGB\":540258697879896683,\"connection\":\"RAID\",\"type\":\"SSD\"},{\"capacityGB\":33500684493501825,\"connection\":\"SATA\",\"type\":\"HDD\"}],\"generation\":\"ufdvruz\",\"hardwareVersion\":\"zojhpctfnmd\",\"memoryCapacityGB\":7638433399857353674,\"model\":\"fdgugeyzi\",\"networkInterfaces\":[{\"address\":\"yui\",\"deviceConnectionType\":\"PCI\",\"model\":\"nmfpp\",\"physicalSlot\":2308962582317303910,\"portCount\":2036537017811943350,\"portSpeed\":4765129043299483240,\"vendor\":\"gzfc\"},{\"address\":\"gomfgbeglq\",\"deviceConnectionType\":\"PCI\",\"model\":\"hibetnluankrr\",\"physicalSlot\":2941839870830389436,\"portCount\":1446916311940643662,\"portSpeed\":845055246835017871,\"vendor\":\"cvbmqzb\"}],\"totalThreads\":1217844899495018315,\"vendor\":\"jrnwxacev\"},\"rackSlot\":3621469567957484158},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":8578700921528746412,\"cpuSockets\":724228214923141856,\"disks\":[{\"capacityGB\":4104858503114850063,\"connection\":\"PCIE\",\"type\":\"SSD\"}],\"generation\":\"mfgvxirpghriypo\",\"hardwareVersion\":\"yhlqhykprlpyznu\",\"memoryCapacityGB\":793746964867243049,\"model\":\"mexiitdfuxt\",\"networkInterfaces\":[{\"address\":\"ibmi\",\"deviceConnectionType\":\"PCI\",\"model\":\"ustgnljhnmgixhc\",\"physicalSlot\":7075171058477041879,\"portCount\":5824035631104177539,\"portSpeed\":1064299527686939227,\"vendor\":\"hcgyyprotwyp\"},{\"address\":\"d\",\"deviceConnectionType\":\"PCI\",\"model\":\"ugcmjkavlgorb\",\"physicalSlot\":2304427621056901546,\"portCount\":4888727306375927406,\"portSpeed\":7430344282584886847,\"vendor\":\"tfvnz\"},{\"address\":\"jtotpvopvpbd\",\"deviceConnectionType\":\"PCI\",\"model\":\"qqihedsvqwthmk\",\"physicalSlot\":6308050303389285350,\"portCount\":5904504388663898201,\"portSpeed\":9188807711158723633,\"vendor\":\"cw\"},{\"address\":\"ohsdtmcd\",\"deviceConnectionType\":\"PCI\",\"model\":\"cohdx\",\"physicalSlot\":1746719233520951067,\"portCount\":3730248227901656192,\"portSpeed\":7618031322550411799,\"vendor\":\"hdbevwqqxeyskon\"}],\"totalThreads\":328893230492625152,\"vendor\":\"fkbg\"},\"rackSlot\":4864080345534775106},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":288839098223967668,\"cpuSockets\":6641902450143738474,\"disks\":[{\"capacityGB\":2580648768425708512,\"connection\":\"SATA\",\"type\":\"SSD\"},{\"capacityGB\":6179637668412316681,\"connection\":\"SAS\",\"type\":\"HDD\"},{\"capacityGB\":214844452320743867,\"connection\":\"RAID\",\"type\":\"SSD\"},{\"capacityGB\":4509675475426678163,\"connection\":\"PCIE\",\"type\":\"SSD\"}],\"generation\":\"xbkwv\",\"hardwareVersion\":\"nzvdfbzdixzmq\",\"memoryCapacityGB\":8281398224809060796,\"model\":\"wopqhewjptmcgs\",\"networkInterfaces\":[{\"address\":\"zelndlatutmzlbi\",\"deviceConnectionType\":\"PCI\",\"model\":\"fhrbbpneqvcw\",\"physicalSlot\":5753155610113127901,\"portCount\":6336980632359527104,\"portSpeed\":4406544619983764230,\"vendor\":\"rprsnm\"},{\"address\":\"ayzejnhlbkpbz\",\"deviceConnectionType\":\"PCI\",\"model\":\"ljhah\",\"physicalSlot\":7553424871056128364,\"portCount\":8447157059296792634,\"portSpeed\":3315486439509162322,\"vendor\":\"ehol\"},{\"address\":\"jwiuubwefqsfapaq\",\"deviceConnectionType\":\"PCI\",\"model\":\"rqwexjkmfxapjwog\",\"physicalSlot\":7251696793654779850,\"portCount\":3332849085929075311,\"portSpeed\":2678944616692679160,\"vendor\":\"btqwpwyawbzas\"}],\"totalThreads\":6950782705334382897,\"vendor\":\"jg\"},\"rackSlot\":8699123673474583360}],\"controllerMachines\":[{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":77830047430088736,\"cpuSockets\":6457929849547286230,\"disks\":[{\"capacityGB\":8001152940356308622,\"connection\":\"SATA\",\"type\":\"SSD\"}],\"generation\":\"mfqwa\",\"hardwareVersion\":\"nqnm\",\"memoryCapacityGB\":3067927724122614346,\"model\":\"qdqx\",\"networkInterfaces\":[{\"address\":\"gny\",\"deviceConnectionType\":\"PCI\",\"model\":\"zsvtuikzhajqgl\",\"physicalSlot\":1669516811047059758,\"portCount\":1021499569936190374,\"portSpeed\":5653930473507021172,\"vendor\":\"nqnzrd\"}],\"totalThreads\":3232521207125821036,\"vendor\":\"xznptgoeiyb\"},\"rackSlot\":2079856233103153594},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":8804379952051748941,\"cpuSockets\":2192556960023325747,\"disks\":[{\"capacityGB\":5669757184395450111,\"connection\":\"SATA\",\"type\":\"HDD\"},{\"capacityGB\":3660133580094068549,\"connection\":\"PCIE\",\"type\":\"SSD\"},{\"capacityGB\":6697301089417631797,\"connection\":\"SAS\",\"type\":\"HDD\"},{\"capacityGB\":6921076915838357627,\"connection\":\"SATA\",\"type\":\"SSD\"}],\"generation\":\"gznmmaxrizkzob\",\"hardwareVersion\":\"pxl\",\"memoryCapacityGB\":3557811767170936371,\"model\":\"lxieixynllxecwcr\",\"networkInterfaces\":[{\"address\":\"slhcawjutifd\",\"deviceConnectionType\":\"PCI\",\"model\":\"igorqjbttzhragl\",\"physicalSlot\":8509742986055591698,\"portCount\":1005914926492117170,\"portSpeed\":7630861399412607269,\"vendor\":\"ickpz\"},{\"address\":\"p\",\"deviceConnectionType\":\"PCI\",\"model\":\"elnwclt\",\"physicalSlot\":562155878134656032,\"portCount\":6137899211514369318,\"portSpeed\":4206497240622366174,\"vendor\":\"kqscazuawxtzx\"},{\"address\":\"amwabzxrvxcushsp\",\"deviceConnectionType\":\"PCI\",\"model\":\"mxyasflvgsgzw\",\"physicalSlot\":3593976183974666652,\"portCount\":339483842138773069,\"portSpeed\":5787215353675069655,\"vendor\":\"jblmljhlnymz\"},{\"address\":\"qyryuzcbmqqvxm\",\"deviceConnectionType\":\"PCI\",\"model\":\"tayx\",\"physicalSlot\":4367486194556700788,\"portCount\":421988017934983704,\"portSpeed\":8911293812436290966,\"vendor\":\"nh\"}],\"totalThreads\":7148709847610946908,\"vendor\":\"tnzoibgsxgnxfy\"},\"rackSlot\":3790273851089805519}],\"deploymentType\":\"Nexus\",\"description\":\"xwdofdb\",\"maxClusterSlots\":7955310418875154253,\"provisioningState\":\"Canceled\",\"rackType\":\"Compute\",\"storageAppliances\":[{\"properties\":{\"capacityGB\":5212550250239758699,\"model\":\"winhehfqpo\"},\"rackSlot\":3471091651637682984}],\"supportedRackSkuIds\":[\"lembnkbwvqvxkdi\",\"qihebw\",\"swbzuwfmdurage\",\"izvcjfe\"]}") .toObject(RackSkuProperties.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RackSkuProperties model = new RackSkuProperties(); - model = BinaryData.fromObject(model).toObject(RackSkuProperties.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkusGetWithResponseMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkusGetWithResponseMockTests.java index 4c3b26db5e75..02bf88fe9915 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkusGetWithResponseMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkusGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -20,7 +20,7 @@ public final class RackSkusGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"computeMachines\":[{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":7398212917026464085,\"cpuSockets\":3217645883529381427,\"disks\":[{},{}],\"generation\":\"j\",\"hardwareVersion\":\"fjvmy\",\"memoryCapacityGB\":9084716446399188642,\"model\":\"ecu\",\"networkInterfaces\":[{},{},{},{}],\"totalThreads\":7522546301995825386,\"vendor\":\"cljkxpyl\"},\"rackSlot\":2345400298196051360},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":528905546739813580,\"cpuSockets\":1575324159221214779,\"disks\":[{},{}],\"generation\":\"pdvrbkerdkdkga\",\"hardwareVersion\":\"wjxildfkcefeyg\",\"memoryCapacityGB\":5332491482208229411,\"model\":\"isf\",\"networkInterfaces\":[{},{},{},{}],\"totalThreads\":8884348619543253450,\"vendor\":\"nxumentqo\"},\"rackSlot\":2688228130519055124},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":3977889157056232744,\"cpuSockets\":2243722311789555333,\"disks\":[{}],\"generation\":\"o\",\"hardwareVersion\":\"h\",\"memoryCapacityGB\":5041206217177609908,\"model\":\"ybajasqubf\",\"networkInterfaces\":[{},{}],\"totalThreads\":3583033519488051677,\"vendor\":\"qwmchqohtfxc\"},\"rackSlot\":7040725443783124983},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":621499668266759027,\"cpuSockets\":7050693210687877420,\"disks\":[{},{},{}],\"generation\":\"tiwsmosaonhqn\",\"hardwareVersion\":\"p\",\"memoryCapacityGB\":3714794711313037679,\"model\":\"ssaekewnaze\",\"networkInterfaces\":[{},{},{}],\"totalThreads\":1230944535065154544,\"vendor\":\"cyizy\"},\"rackSlot\":6203270097433231501}],\"controllerMachines\":[{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":5873155808619890798,\"cpuSockets\":6747440066419835499,\"disks\":[{},{}],\"generation\":\"sqlv\",\"hardwareVersion\":\"cpwgoljtzxnmxsd\",\"memoryCapacityGB\":5219563148012298828,\"model\":\"ogxqap\",\"networkInterfaces\":[{}],\"totalThreads\":6874264411354040379,\"vendor\":\"fucsaodjnosdkvi\"},\"rackSlot\":2977721245192896961}],\"description\":\"matrnzpducd\",\"maxClusterSlots\":341694644915957080,\"provisioningState\":\"Failed\",\"rackType\":\"Aggregator\",\"storageAppliances\":[{\"properties\":{\"capacityGB\":3896774780386506577,\"model\":\"pqdowkppnwyy\"},\"rackSlot\":5796315231758189739}],\"supportedRackSkuIds\":[\"fjikffffgkuhznw\",\"vuldbkkejjk\",\"igaw\",\"azmxjqi\"]},\"id\":\"ujjs\",\"name\":\"cmlzaahz\",\"type\":\"hu\"}"; + = "{\"properties\":{\"computeMachines\":[{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":4775225189323535790,\"cpuSockets\":7068853445781852910,\"disks\":[{}],\"generation\":\"ijh\",\"hardwareVersion\":\"zgdkkagvwu\",\"memoryCapacityGB\":4762593380857045993,\"model\":\"mm\",\"networkInterfaces\":[{}],\"totalThreads\":8857154629410001723,\"vendor\":\"ilz\"},\"rackSlot\":4725021406314994262},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":7883366773525631250,\"cpuSockets\":1722694161740559888,\"disks\":[{},{},{}],\"generation\":\"ttlrc\",\"hardwareVersion\":\"v\",\"memoryCapacityGB\":4914755829810494677,\"model\":\"pumltwjfluxynbp\",\"networkInterfaces\":[{}],\"totalThreads\":3697782330472873620,\"vendor\":\"uyq\"},\"rackSlot\":8780048512430158680},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":3303061348293574193,\"cpuSockets\":7839100090427678623,\"disks\":[{}],\"generation\":\"rhwv\",\"hardwareVersion\":\"qqgglj\",\"memoryCapacityGB\":8075338907554138607,\"model\":\"rcl\",\"networkInterfaces\":[{},{},{},{}],\"totalThreads\":5168701731498931016,\"vendor\":\"bctbhp\"},\"rackSlot\":2475720744236639475}],\"controllerMachines\":[{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":8210989133903577488,\"cpuSockets\":2932904296137527965,\"disks\":[{}],\"generation\":\"dynzjahwr\",\"hardwareVersion\":\"omzczfkiceevsa\",\"memoryCapacityGB\":8006403646311003969,\"model\":\"caxikhfjqebgl\",\"networkInterfaces\":[{},{},{},{}],\"totalThreads\":7111208902657480752,\"vendor\":\"romv\"},\"rackSlot\":7803929244949593173},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":7288458247060076900,\"cpuSockets\":7686634846029481971,\"disks\":[{},{}],\"generation\":\"nkzpatqtdiswxsp\",\"hardwareVersion\":\"koj\",\"memoryCapacityGB\":2881132842952892382,\"model\":\"spftesubzpv\",\"networkInterfaces\":[{},{},{}],\"totalThreads\":2970339069310957014,\"vendor\":\"covqseusrfjbdxzf\"},\"rackSlot\":1583301153525219331},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":9208868193515073321,\"cpuSockets\":1736660168230858616,\"disks\":[{},{},{},{}],\"generation\":\"hdcyyyzlwhbwzjn\",\"hardwareVersion\":\"zrfgmdqgnnbzrt\",\"memoryCapacityGB\":6090233018933457748,\"model\":\"uubjtvgjsxmty\",\"networkInterfaces\":[{},{}],\"totalThreads\":5658013294488508907,\"vendor\":\"wwobtdphtit\"},\"rackSlot\":5932707707404981955}],\"deploymentType\":\"AzureLocal\",\"description\":\"nmhkscauwaz\",\"maxClusterSlots\":5730960322102521937,\"provisioningState\":\"Failed\",\"rackType\":\"Compute\",\"storageAppliances\":[{\"properties\":{\"capacityGB\":4539321307027378523,\"model\":\"ok\"},\"rackSlot\":1536887907916256187},{\"properties\":{\"capacityGB\":6407439118105989209,\"model\":\"gbyfgwe\"},\"rackSlot\":688224928405858057},{\"properties\":{\"capacityGB\":1731150194635193379,\"model\":\"pxsoohu\"},\"rackSlot\":5994579716131865974}],\"supportedRackSkuIds\":[\"ltezuugg\"]},\"id\":\"lfb\",\"name\":\"rdcgu\",\"type\":\"srtmdylperpiltt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -29,8 +29,7 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - RackSku response - = manager.rackSkus().getWithResponse("cskiioshjgc", com.azure.core.util.Context.NONE).getValue(); + RackSku response = manager.rackSkus().getWithResponse("w", com.azure.core.util.Context.NONE).getValue(); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkusListMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkusListMockTests.java index f0ada8972fc2..d40b9c1f1d7f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkusListMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RackSkusListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -21,7 +21,7 @@ public final class RackSkusListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"computeMachines\":[{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":5821199159815636734,\"cpuSockets\":677060499735804457,\"disks\":[{}],\"generation\":\"dop\",\"hardwareVersion\":\"ttbas\",\"memoryCapacityGB\":8045657271328608430,\"model\":\"dl\",\"networkInterfaces\":[{}],\"totalThreads\":8462029470006123816,\"vendor\":\"kixvvlwy\"},\"rackSlot\":1187250674252870070},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":5302851662899038686,\"cpuSockets\":7890287065555101152,\"disks\":[{},{}],\"generation\":\"feuzjljmphfkye\",\"hardwareVersion\":\"lgjzmi\",\"memoryCapacityGB\":4972131269176865288,\"model\":\"ccn\",\"networkInterfaces\":[{},{},{}],\"totalThreads\":6267822314819515506,\"vendor\":\"uiadhbatecaatsdo\"},\"rackSlot\":7583523537306047423},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":2333823958133148696,\"cpuSockets\":628922762091625002,\"disks\":[{},{},{},{}],\"generation\":\"jdllwktle\",\"hardwareVersion\":\"wavvqxuajgcqwuly\",\"memoryCapacityGB\":2415129657839639392,\"model\":\"fdruw\",\"networkInterfaces\":[{}],\"totalThreads\":7437541342121277518,\"vendor\":\"lhuulriqb\"},\"rackSlot\":7904408196973881332},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":8609254707882415008,\"cpuSockets\":1914561130405499807,\"disks\":[{},{}],\"generation\":\"tfyhcdjws\",\"hardwareVersion\":\"ardnagttpufpbpgn\",\"memoryCapacityGB\":8700956360206524200,\"model\":\"ujbfwxiplkys\",\"networkInterfaces\":[{},{},{},{}],\"totalThreads\":1097236927264540123,\"vendor\":\"xslwhd\"},\"rackSlot\":2666490817589236887}],\"controllerMachines\":[{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":399660601979603954,\"cpuSockets\":3694265006598202173,\"disks\":[{}],\"generation\":\"pcqzg\",\"hardwareVersion\":\"otjecohmxvvl\",\"memoryCapacityGB\":257842997554936344,\"model\":\"pbxwieexuyaderl\",\"networkInterfaces\":[{}],\"totalThreads\":6944286089790759384,\"vendor\":\"yimyccgrvk\"},\"rackSlot\":7210079204059916470}],\"description\":\"nuif\",\"maxClusterSlots\":2779200852040801128,\"provisioningState\":\"Canceled\",\"rackType\":\"Aggregator\",\"storageAppliances\":[{\"properties\":{\"capacityGB\":2185918521613029625,\"model\":\"jmwvvbtuqkxxi\"},\"rackSlot\":4440194731650426984},{\"properties\":{\"capacityGB\":7710457744223836014,\"model\":\"otjgxieqfkyfhi\"},\"rackSlot\":8013744090719184218},{\"properties\":{\"capacityGB\":4805103256749737674,\"model\":\"ynvskpajbmgeume\"},\"rackSlot\":6602066615723681411},{\"properties\":{\"capacityGB\":5846934506133184339,\"model\":\"wkqm\"},\"rackSlot\":2391068865752577153}],\"supportedRackSkuIds\":[\"iscr\"]},\"id\":\"lgftrqrejdaa\",\"name\":\"uqimldahlfxl\",\"type\":\"uifmuadjnfs\"}]}"; + = "{\"value\":[{\"properties\":{\"computeMachines\":[{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":1373968080899974777,\"cpuSockets\":6332208098611020427,\"disks\":[{},{}],\"generation\":\"tresr\",\"hardwareVersion\":\"tshuvftwaivm\",\"memoryCapacityGB\":4611039989281754388,\"model\":\"zgjypanhxmpdxxz\",\"networkInterfaces\":[{},{},{},{}],\"totalThreads\":5791930249143484499,\"vendor\":\"otnxlkfhglh\"},\"rackSlot\":6042012721899886188},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":7465142531459881079,\"cpuSockets\":2370313728933974202,\"disks\":[{},{}],\"generation\":\"lqxov\",\"hardwareVersion\":\"qibukklvzrl\",\"memoryCapacityGB\":106115275253276674,\"model\":\"metjs\",\"networkInterfaces\":[{},{},{}],\"totalThreads\":8138175118626444262,\"vendor\":\"qnasdsyenzsieu\"},\"rackSlot\":6474737675833038731}],\"controllerMachines\":[{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":225647048317236034,\"cpuSockets\":6319871299775343572,\"disks\":[{}],\"generation\":\"shezs\",\"hardwareVersion\":\"olrupjovm\",\"memoryCapacityGB\":7809248755491065732,\"model\":\"ebrazwzlpzbtzuyk\",\"networkInterfaces\":[{}],\"totalThreads\":7221789336073312659,\"vendor\":\"yepfn\"},\"rackSlot\":2703217900378871776},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":1773202042768243354,\"cpuSockets\":3144374551812240182,\"disks\":[{},{}],\"generation\":\"yqejga\",\"hardwareVersion\":\"kctgkp\",\"memoryCapacityGB\":1924859848190101380,\"model\":\"kcy\",\"networkInterfaces\":[{}],\"totalThreads\":5067666560019601283,\"vendor\":\"yf\"},\"rackSlot\":5174536415479265927},{\"properties\":{\"bootstrapProtocol\":\"PXE\",\"cpuCores\":5112572943576628414,\"cpuSockets\":4924475067864805072,\"disks\":[{},{},{},{}],\"generation\":\"utgwrmkahpqha\",\"hardwareVersion\":\"ntacih\",\"memoryCapacityGB\":4896298163622414853,\"model\":\"ipnmliqmv\",\"networkInterfaces\":[{},{}],\"totalThreads\":1256833668205258532,\"vendor\":\"qgrvg\"},\"rackSlot\":3836296603772272401}],\"deploymentType\":\"AzureLocal\",\"description\":\"dtsdfjy\",\"maxClusterSlots\":3432090950134745492,\"provisioningState\":\"Succeeded\",\"rackType\":\"Single\",\"storageAppliances\":[{\"properties\":{\"capacityGB\":5374272427471664262,\"model\":\"yzgleofjs\"},\"rackSlot\":823830391985899426},{\"properties\":{\"capacityGB\":6982225248189091522,\"model\":\"j\"},\"rackSlot\":8592863210177538862}],\"supportedRackSkuIds\":[\"maciqgjjrl\",\"iqlwixvtbou\",\"uxtndopgjttbasua\",\"ap\"]},\"id\":\"n\",\"name\":\"bea\",\"type\":\"bkixvvlwyn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksCreateOrUpdateMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksCreateOrUpdateMockTests.java index ccee34feee88..8e289b95ebfb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksCreateOrUpdateMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,6 +11,7 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.Rack; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -24,7 +25,7 @@ public final class RacksCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"gdqxwabzrw\",\"extendedLocation\":{\"name\":\"qrxhaclcdos\",\"type\":\"kptjqgkifmmai\"},\"properties\":{\"availabilityZone\":\"wh\",\"clusterId\":\"xkpbqwun\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"izazz\",\"provisioningState\":\"Succeeded\",\"rackLocation\":\"gvydjufbnklblaxp\",\"rackSerialNumber\":\"gjwdab\",\"rackSkuId\":\"lfdxaglz\"},\"location\":\"tlbtlqho\",\"tags\":{\"kgx\":\"uvmrsiflikyyp\",\"bpoks\":\"xfmyrqs\",\"wki\":\"anmhwgpterdi\"},\"id\":\"kskw\",\"name\":\"tsdetjygowifcq\",\"type\":\"olzkgys\"}"; + = "{\"properties\":{\"availabilityZone\":\"tfjikffffgkuh\",\"rackLocation\":\"nwhvuldbkkejj\",\"rackSerialNumber\":\"jigawgaz\",\"rackSkuId\":\"xjqifhujjsbc\",\"clusterId\":\"zaahzbhuroolkoli\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"ojusuzgfjzcva\",\"provisioningState\":\"Succeeded\"},\"etag\":\"alahf\",\"extendedLocation\":{\"name\":\"wcco\",\"type\":\"EdgeZone\"},\"location\":\"kuk\",\"tags\":{\"oq\":\"zynuh\"},\"id\":\"qshavlj\",\"name\":\"k\",\"type\":\"yrqolnthbbnkgz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,28 +35,28 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Rack response = manager.racks() - .define("it") - .withRegion("kgd") - .withExistingResourceGroup("yvrmkjm") - .withExtendedLocation(new ExtendedLocation().withName("tpmnoe").withType("hqlfmsib")) - .withAvailabilityZone("oyrfgxk") - .withRackLocation("lfxampqc") - .withRackSerialNumber("zgeuqxbpiat") - .withRackSkuId("faujegqdtad") - .withTags(mapOf("qsktxqf", "krukizyhgsqt", "cgbfzuscstun", "jbqggweeiwdhdm", "bkl", "lhxd", "f", - "iichgjsysmvxodgw")) - .withIfMatch("izagbbgiar") - .withIfNoneMatch("sy") + .define("lwivqt") + .withRegion("qlvge") + .withExistingResourceGroup("umentqontwhymxym") + .withExtendedLocation( + new ExtendedLocation().withName("dcvxodkrvfsxxby").withType(ExtendedLocationType.EDGE_ZONE)) + .withAvailabilityZone("wlhlsycoybajasq") + .withRackLocation("bfajcywhjqwmchq") + .withRackSerialNumber("htfxcpupuki") + .withRackSkuId("mjzpwdlvwtiwsm") + .withTags(mapOf("obygoo", "goljtzxnmxs", "djnosdkvibf", "xqapjxvazyjfucsa")) + .withIfMatch("oimyfpqd") + .withIfNoneMatch("wkppnwyytfvp") .create(); - Assertions.assertEquals("tlbtlqho", response.location()); - Assertions.assertEquals("uvmrsiflikyyp", response.tags().get("kgx")); - Assertions.assertEquals("qrxhaclcdos", response.extendedLocation().name()); - Assertions.assertEquals("kptjqgkifmmai", response.extendedLocation().type()); - Assertions.assertEquals("wh", response.availabilityZone()); - Assertions.assertEquals("gvydjufbnklblaxp", response.rackLocation()); - Assertions.assertEquals("gjwdab", response.rackSerialNumber()); - Assertions.assertEquals("lfdxaglz", response.rackSkuId()); + Assertions.assertEquals("kuk", response.location()); + Assertions.assertEquals("zynuh", response.tags().get("oq")); + Assertions.assertEquals("wcco", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, response.extendedLocation().type()); + Assertions.assertEquals("tfjikffffgkuh", response.availabilityZone()); + Assertions.assertEquals("nwhvuldbkkejj", response.rackLocation()); + Assertions.assertEquals("jigawgaz", response.rackSerialNumber()); + Assertions.assertEquals("xjqifhujjsbc", response.rackSkuId()); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksGetByResourceGroupWithResponseMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksGetByResourceGroupWithResponseMockTests.java index 62402a90f3bd..cfe6da7f0ef8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksGetByResourceGroupWithResponseMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksGetByResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -10,6 +10,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.Rack; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,7 +22,7 @@ public final class RacksGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"etag\":\"acqoccqrqxwetj\",\"extendedLocation\":{\"name\":\"drhutfdo\",\"type\":\"dtxopgehpadkmdzg\"},\"properties\":{\"availabilityZone\":\"szxvctkbbxuhar\",\"clusterId\":\"ir\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"abvoyngsuxxcz\",\"provisioningState\":\"Accepted\",\"rackLocation\":\"qjoghdsai\",\"rackSerialNumber\":\"janormovdxxu\",\"rackSkuId\":\"ntujmoilunwemhd\"},\"location\":\"ljslkyozd\",\"tags\":{\"rhrhtsl\":\"jue\",\"j\":\"jtv\"},\"id\":\"xvgjbfi\",\"name\":\"bpnjodf\",\"type\":\"bj\"}"; + = "{\"properties\":{\"availabilityZone\":\"spugzfeuzjljmph\",\"rackLocation\":\"ky\",\"rackSerialNumber\":\"zolgjzmicuydocc\",\"rackSkuId\":\"xshanzb\",\"clusterId\":\"adh\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"caatsdohzniucbda\",\"provisioningState\":\"Failed\"},\"etag\":\"iinj\",\"extendedLocation\":{\"name\":\"llwkt\",\"type\":\"EdgeZone\"},\"location\":\"owavvqxuajgcqw\",\"tags\":{\"wsikxxtclhuulr\":\"nkgfcfdr\",\"lttfyhc\":\"qbyokvjgbzsxebr\"},\"id\":\"jwsuoardnag\",\"name\":\"tpufpbpgnrholhu\",\"type\":\"bfwxiplkys\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,16 +32,16 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Rack response = manager.racks() - .getByResourceGroupWithResponse("itbfjtdy", "tnp", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("bb", "qvzfj", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ljslkyozd", response.location()); - Assertions.assertEquals("jue", response.tags().get("rhrhtsl")); - Assertions.assertEquals("drhutfdo", response.extendedLocation().name()); - Assertions.assertEquals("dtxopgehpadkmdzg", response.extendedLocation().type()); - Assertions.assertEquals("szxvctkbbxuhar", response.availabilityZone()); - Assertions.assertEquals("qjoghdsai", response.rackLocation()); - Assertions.assertEquals("janormovdxxu", response.rackSerialNumber()); - Assertions.assertEquals("ntujmoilunwemhd", response.rackSkuId()); + Assertions.assertEquals("owavvqxuajgcqw", response.location()); + Assertions.assertEquals("nkgfcfdr", response.tags().get("wsikxxtclhuulr")); + Assertions.assertEquals("llwkt", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, response.extendedLocation().type()); + Assertions.assertEquals("spugzfeuzjljmph", response.availabilityZone()); + Assertions.assertEquals("ky", response.rackLocation()); + Assertions.assertEquals("zolgjzmicuydocc", response.rackSerialNumber()); + Assertions.assertEquals("xshanzb", response.rackSkuId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksListByResourceGroupMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksListByResourceGroupMockTests.java index 9829c274c7b6..21ea4a1433c2 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksListByResourceGroupMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksListByResourceGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,6 +11,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.Rack; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,7 +23,7 @@ public final class RacksListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"awatuwqkokbczo\",\"extendedLocation\":{\"name\":\"hymgobllms\",\"type\":\"wgwima\"},\"properties\":{\"availabilityZone\":\"neakh\",\"clusterId\":\"ho\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"nrfvqtvkhg\",\"provisioningState\":\"Canceled\",\"rackLocation\":\"gxkfnaoaqymhccto\",\"rackSerialNumber\":\"uowyrnskbyhqu\",\"rackSkuId\":\"czygxv\"},\"location\":\"jpxecxqnwhsco\",\"tags\":{\"ljfewxqo\":\"mvgxsmpknpwir\",\"hknqiijge\":\"oxudnmckap\",\"qih\":\"cdgmoqu\",\"tjouwhldxwhi\":\"kyow\"},\"id\":\"proqk\",\"name\":\"mfxm\",\"type\":\"vprstv\"}]}"; + = "{\"value\":[{\"properties\":{\"availabilityZone\":\"rxslwhdmcv\",\"rackLocation\":\"tbbzj\",\"rackSerialNumber\":\"f\",\"rackSkuId\":\"huwzbxpcqzgi\",\"clusterId\":\"tjecohm\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"rrskapbxwieexuy\",\"provisioningState\":\"Accepted\"},\"etag\":\"ltfokyksyim\",\"extendedLocation\":{\"name\":\"ccgrvkcxzznn\",\"type\":\"EdgeZone\"},\"location\":\"ersejeg\",\"tags\":{\"tu\":\"jguwrjmwvv\",\"wgxql\":\"kxxi\",\"qfkyfhiwvjaqu\":\"ekotjgxi\",\"nvskpaj\":\"by\"},\"id\":\"mgeu\",\"name\":\"exmj\",\"type\":\"xcbccwkqmt\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +33,15 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.racks().listByResourceGroup("vsnvlaq", 1326448066, "z", com.azure.core.util.Context.NONE); + = manager.racks().listByResourceGroup("l", 1962986932, "j", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jpxecxqnwhsco", response.iterator().next().location()); - Assertions.assertEquals("mvgxsmpknpwir", response.iterator().next().tags().get("ljfewxqo")); - Assertions.assertEquals("hymgobllms", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("wgwima", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("neakh", response.iterator().next().availabilityZone()); - Assertions.assertEquals("gxkfnaoaqymhccto", response.iterator().next().rackLocation()); - Assertions.assertEquals("uowyrnskbyhqu", response.iterator().next().rackSerialNumber()); - Assertions.assertEquals("czygxv", response.iterator().next().rackSkuId()); + Assertions.assertEquals("ersejeg", response.iterator().next().location()); + Assertions.assertEquals("jguwrjmwvv", response.iterator().next().tags().get("tu")); + Assertions.assertEquals("ccgrvkcxzznn", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, response.iterator().next().extendedLocation().type()); + Assertions.assertEquals("rxslwhdmcv", response.iterator().next().availabilityZone()); + Assertions.assertEquals("tbbzj", response.iterator().next().rackLocation()); + Assertions.assertEquals("f", response.iterator().next().rackSerialNumber()); + Assertions.assertEquals("huwzbxpcqzgi", response.iterator().next().rackSkuId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksListMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksListMockTests.java index dfbddddbe665..e1ff351bde45 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksListMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,6 +11,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.Rack; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,7 +23,7 @@ public final class RacksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"irhhmo\",\"extendedLocation\":{\"name\":\"usuzgfjzcvaaxo\",\"type\":\"alahf\"},\"properties\":{\"availabilityZone\":\"wcco\",\"clusterId\":\"xkukm\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"nuhhoqeqshav\",\"provisioningState\":\"Succeeded\",\"rackLocation\":\"k\",\"rackSerialNumber\":\"yrqolnthbbnkgz\",\"rackSkuId\":\"kwdrnzkjthfc\"},\"location\":\"jncjmlfuyfjbp\",\"tags\":{\"fuiocuselq\":\"dhlrufzcqyjmq\",\"qmdtffi\":\"rsazrhxud\",\"khmwdmd\":\"jmr\"},\"id\":\"gyqi\",\"name\":\"okwtjawhvagnqfqq\",\"type\":\"lcvmyolcaymjch\"}]}"; + = "{\"value\":[{\"properties\":{\"availabilityZone\":\"qis\",\"rackLocation\":\"rpilgftrqrejdaah\",\"rackSerialNumber\":\"qimlda\",\"rackSkuId\":\"lfxlmuifmuadj\",\"clusterId\":\"snc\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"oshjgcze\",\"provisioningState\":\"Succeeded\"},\"etag\":\"xgztlcgctjch\",\"extendedLocation\":{\"name\":\"j\",\"type\":\"EdgeZone\"},\"location\":\"wjzebecuvlb\",\"tags\":{\"jkxpylrwoxzgwpsy\":\"wc\",\"erdkdkgawqwjxild\":\"jijeypdvrb\"},\"id\":\"kc\",\"name\":\"feygzqp\",\"type\":\"oisfmnaybdjn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,15 +32,15 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.racks().list(648783991, "olk", com.azure.core.util.Context.NONE); + PagedIterable response = manager.racks().list(556714103, "p", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jncjmlfuyfjbp", response.iterator().next().location()); - Assertions.assertEquals("dhlrufzcqyjmq", response.iterator().next().tags().get("fuiocuselq")); - Assertions.assertEquals("usuzgfjzcvaaxo", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("alahf", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("wcco", response.iterator().next().availabilityZone()); - Assertions.assertEquals("k", response.iterator().next().rackLocation()); - Assertions.assertEquals("yrqolnthbbnkgz", response.iterator().next().rackSerialNumber()); - Assertions.assertEquals("kwdrnzkjthfc", response.iterator().next().rackSkuId()); + Assertions.assertEquals("wjzebecuvlb", response.iterator().next().location()); + Assertions.assertEquals("wc", response.iterator().next().tags().get("jkxpylrwoxzgwpsy")); + Assertions.assertEquals("j", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, response.iterator().next().extendedLocation().type()); + Assertions.assertEquals("qis", response.iterator().next().availabilityZone()); + Assertions.assertEquals("rpilgftrqrejdaah", response.iterator().next().rackLocation()); + Assertions.assertEquals("qimlda", response.iterator().next().rackSerialNumber()); + Assertions.assertEquals("lfxlmuifmuadj", response.iterator().next().rackSkuId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksPatchPropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksPatchPropertiesTests.java index e5ef04b2b0a0..0179b452f3dd 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksPatchPropertiesTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RacksPatchPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,17 +11,17 @@ public final class RacksPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RacksPatchProperties model = BinaryData.fromString("{\"rackLocation\":\"aweyur\",\"rackSerialNumber\":\"hy\"}") + RacksPatchProperties model = BinaryData.fromString("{\"rackLocation\":\"lq\",\"rackSerialNumber\":\"quvre\"}") .toObject(RacksPatchProperties.class); - Assertions.assertEquals("aweyur", model.rackLocation()); - Assertions.assertEquals("hy", model.rackSerialNumber()); + Assertions.assertEquals("lq", model.rackLocation()); + Assertions.assertEquals("quvre", model.rackSerialNumber()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RacksPatchProperties model = new RacksPatchProperties().withRackLocation("aweyur").withRackSerialNumber("hy"); + RacksPatchProperties model = new RacksPatchProperties().withRackLocation("lq").withRackSerialNumber("quvre"); model = BinaryData.fromObject(model).toObject(RacksPatchProperties.class); - Assertions.assertEquals("aweyur", model.rackLocation()); - Assertions.assertEquals("hy", model.rackSerialNumber()); + Assertions.assertEquals("lq", model.rackLocation()); + Assertions.assertEquals("quvre", model.rackSerialNumber()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RuntimeProtectionConfigurationTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RuntimeProtectionConfigurationTests.java index 0bea6f5c2312..ca53d7ea9a6a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RuntimeProtectionConfigurationTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RuntimeProtectionConfigurationTests.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.networkcloud.models.RuntimeProtectionConfiguration; +import com.azure.resourcemanager.networkcloud.models.RuntimeProtectionDefinitionUpdateMode; import com.azure.resourcemanager.networkcloud.models.RuntimeProtectionEnforcementLevel; import org.junit.jupiter.api.Assertions; @@ -13,15 +14,19 @@ public final class RuntimeProtectionConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RuntimeProtectionConfiguration model - = BinaryData.fromString("{\"enforcementLevel\":\"Audit\"}").toObject(RuntimeProtectionConfiguration.class); - Assertions.assertEquals(RuntimeProtectionEnforcementLevel.AUDIT, model.enforcementLevel()); + = BinaryData.fromString("{\"definitionUpdateMode\":\"None\",\"enforcementLevel\":\"OnDemand\"}") + .toObject(RuntimeProtectionConfiguration.class); + Assertions.assertEquals(RuntimeProtectionDefinitionUpdateMode.NONE, model.definitionUpdateMode()); + Assertions.assertEquals(RuntimeProtectionEnforcementLevel.ON_DEMAND, model.enforcementLevel()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RuntimeProtectionConfiguration model - = new RuntimeProtectionConfiguration().withEnforcementLevel(RuntimeProtectionEnforcementLevel.AUDIT); + = new RuntimeProtectionConfiguration().withDefinitionUpdateMode(RuntimeProtectionDefinitionUpdateMode.NONE) + .withEnforcementLevel(RuntimeProtectionEnforcementLevel.ON_DEMAND); model = BinaryData.fromObject(model).toObject(RuntimeProtectionConfiguration.class); - Assertions.assertEquals(RuntimeProtectionEnforcementLevel.AUDIT, model.enforcementLevel()); + Assertions.assertEquals(RuntimeProtectionDefinitionUpdateMode.NONE, model.definitionUpdateMode()); + Assertions.assertEquals(RuntimeProtectionEnforcementLevel.ON_DEMAND, model.enforcementLevel()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RuntimeProtectionStatusTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RuntimeProtectionStatusTests.java index 11cf943a07c5..88dbb4450a36 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RuntimeProtectionStatusTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/RuntimeProtectionStatusTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class RuntimeProtectionStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RuntimeProtectionStatus model = BinaryData.fromString( - "{\"definitionsLastUpdated\":\"2021-06-02T14:17:50Z\",\"definitionsVersion\":\"ureximoryocfs\",\"scanCompletedTime\":\"2021-11-18T00:18:58Z\",\"scanScheduledTime\":\"2021-10-09T18:45:34Z\",\"scanStartedTime\":\"2021-12-09T10:40:37Z\"}") + "{\"agentHealthStatus\":\"Healthy\",\"agentHealthStatusIssues\":[\"cgygev\",\"zntypmrb\",\"izcdrqjsd\"],\"agentLicenseStatus\":\"Unlicensed\",\"definitionUpdateMode\":\"Automatic\",\"definitionsLastUpdated\":\"2021-07-10T19:26:28Z\",\"definitionsVersion\":\"de\",\"enforcementLevel\":\"RealTime\",\"scanCompletedTime\":\"2021-11-13T22:34:01Z\",\"scanScheduledTime\":\"2021-09-19T22:59:26Z\",\"scanStartedTime\":\"2021-02-05T10:41:48Z\"}") .toObject(RuntimeProtectionStatus.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RuntimeProtectionStatus model = new RuntimeProtectionStatus(); - model = BinaryData.fromObject(model).toObject(RuntimeProtectionStatus.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/SecretArchiveSettingsTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/SecretArchiveSettingsTests.java index 616231077336..02aa2f8090e8 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/SecretArchiveSettingsTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/SecretArchiveSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,12 +14,12 @@ public final class SecretArchiveSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SecretArchiveSettings model = BinaryData.fromString( - "{\"associatedIdentity\":{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"khnzbonlw\"},\"vaultUri\":\"oegokdwbwh\"}") + "{\"associatedIdentity\":{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"budurgkakmo\"},\"vaultUri\":\"hjjklff\"}") .toObject(SecretArchiveSettings.class); Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, model.associatedIdentity().identityType()); - Assertions.assertEquals("khnzbonlw", model.associatedIdentity().userAssignedIdentityResourceId()); - Assertions.assertEquals("oegokdwbwh", model.vaultUri()); + Assertions.assertEquals("budurgkakmo", model.associatedIdentity().userAssignedIdentityResourceId()); + Assertions.assertEquals("hjjklff", model.vaultUri()); } @org.junit.jupiter.api.Test @@ -28,12 +28,12 @@ public void testSerialize() throws Exception { = new SecretArchiveSettings() .withAssociatedIdentity( new IdentitySelector().withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) - .withUserAssignedIdentityResourceId("khnzbonlw")) - .withVaultUri("oegokdwbwh"); + .withUserAssignedIdentityResourceId("budurgkakmo")) + .withVaultUri("hjjklff"); model = BinaryData.fromObject(model).toObject(SecretArchiveSettings.class); Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, model.associatedIdentity().identityType()); - Assertions.assertEquals("khnzbonlw", model.associatedIdentity().userAssignedIdentityResourceId()); - Assertions.assertEquals("oegokdwbwh", model.vaultUri()); + Assertions.assertEquals("budurgkakmo", model.associatedIdentity().userAssignedIdentityResourceId()); + Assertions.assertEquals("hjjklff", model.vaultUri()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StepStateTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StepStateTests.java index 665471cf4971..f52396d1236a 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StepStateTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StepStateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class StepStateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StepState model = BinaryData.fromString( - "{\"endTime\":\"igdtopbob\",\"message\":\"ghmewuam\",\"startTime\":\"hrzayvvtpgvdf\",\"status\":\"NotStarted\",\"stepName\":\"kftutqxlngxlefg\"}") + "{\"endTime\":\"ezrkgqhcjrefo\",\"message\":\"mkqsleyyv\",\"startTime\":\"qjpkcattpngjcrc\",\"status\":\"Failed\",\"stepName\":\"pjhvmdajvnys\"}") .toObject(StepState.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StepState model = new StepState(); - model = BinaryData.fromObject(model).toObject(StepState.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceCommandSpecificationTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceCommandSpecificationTests.java index 40d34a399d63..42c2d96ddb7f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceCommandSpecificationTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceCommandSpecificationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,20 +12,21 @@ public final class StorageApplianceCommandSpecificationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - StorageApplianceCommandSpecification model - = BinaryData.fromString("{\"arguments\":[\"ytehqpuvjmvqmt\",\"wckygr\",\"ejnndljdju\"],\"command\":\"kb\"}") - .toObject(StorageApplianceCommandSpecification.class); - Assertions.assertEquals("ytehqpuvjmvqmt", model.arguments().get(0)); - Assertions.assertEquals("kb", model.command()); + StorageApplianceCommandSpecification model = BinaryData + .fromString( + "{\"arguments\":[\"w\",\"epdfgkmtdherng\",\"tcjuahokqto\",\"kauxof\"],\"command\":\"hfphwpnulaiywze\"}") + .toObject(StorageApplianceCommandSpecification.class); + Assertions.assertEquals("w", model.arguments().get(0)); + Assertions.assertEquals("hfphwpnulaiywze", model.command()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StorageApplianceCommandSpecification model = new StorageApplianceCommandSpecification() - .withArguments(Arrays.asList("ytehqpuvjmvqmt", "wckygr", "ejnndljdju")) - .withCommand("kb"); + .withArguments(Arrays.asList("w", "epdfgkmtdherng", "tcjuahokqto", "kauxof")) + .withCommand("hfphwpnulaiywze"); model = BinaryData.fromObject(model).toObject(StorageApplianceCommandSpecification.class); - Assertions.assertEquals("ytehqpuvjmvqmt", model.arguments().get(0)); - Assertions.assertEquals("kb", model.command()); + Assertions.assertEquals("w", model.arguments().get(0)); + Assertions.assertEquals("hfphwpnulaiywze", model.command()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceEnableRemoteVendorManagementParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceEnableRemoteVendorManagementParametersTests.java index fd9b70a306ff..ea4c4f24c7ae 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceEnableRemoteVendorManagementParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceEnableRemoteVendorManagementParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,18 +12,18 @@ public final class StorageApplianceEnableRemoteVendorManagementParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - StorageApplianceEnableRemoteVendorManagementParameters model - = BinaryData.fromString("{\"supportEndpoints\":[\"zzlt\",\"fhbzffovwmbjlzq\",\"czpgvdwnapfdq\"]}") - .toObject(StorageApplianceEnableRemoteVendorManagementParameters.class); - Assertions.assertEquals("zzlt", model.supportEndpoints().get(0)); + StorageApplianceEnableRemoteVendorManagementParameters model = BinaryData + .fromString("{\"supportEndpoints\":[\"lafcbahh\",\"zpofoiyjwpfilk\",\"kkholvdndvia\",\"ogphuartvtiu\"]}") + .toObject(StorageApplianceEnableRemoteVendorManagementParameters.class); + Assertions.assertEquals("lafcbahh", model.supportEndpoints().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StorageApplianceEnableRemoteVendorManagementParameters model = new StorageApplianceEnableRemoteVendorManagementParameters() - .withSupportEndpoints(Arrays.asList("zzlt", "fhbzffovwmbjlzq", "czpgvdwnapfdq")); + .withSupportEndpoints(Arrays.asList("lafcbahh", "zpofoiyjwpfilk", "kkholvdndvia", "ogphuartvtiu")); model = BinaryData.fromObject(model).toObject(StorageApplianceEnableRemoteVendorManagementParameters.class); - Assertions.assertEquals("zzlt", model.supportEndpoints().get(0)); + Assertions.assertEquals("lafcbahh", model.supportEndpoints().get(0)); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceExpansionShelfTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceExpansionShelfTests.java new file mode 100644 index 000000000000..dcb05fd1a26b --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceExpansionShelfTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.models.StorageApplianceExpansionShelf; +import org.junit.jupiter.api.Assertions; + +public final class StorageApplianceExpansionShelfTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StorageApplianceExpansionShelf model + = BinaryData.fromString("{\"model\":\"mxmcuqudtcvclxy\",\"version\":\"dkvgfabuiyjibuzp\"}") + .toObject(StorageApplianceExpansionShelf.class); + Assertions.assertEquals("mxmcuqudtcvclxy", model.model()); + Assertions.assertEquals("dkvgfabuiyjibuzp", model.version()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceMonitoringConfigurationStatusTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceMonitoringConfigurationStatusTests.java new file mode 100644 index 000000000000..01e04b57fa59 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceMonitoringConfigurationStatusTests.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.networkcloud.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkcloud.models.StorageApplianceMetricsConfigurationStatusLogLevel; +import com.azure.resourcemanager.networkcloud.models.StorageApplianceMetricsConfigurationStatusMetricsLevel; +import com.azure.resourcemanager.networkcloud.models.StorageApplianceMonitoringConfigurationStatus; +import org.junit.jupiter.api.Assertions; + +public final class StorageApplianceMonitoringConfigurationStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StorageApplianceMonitoringConfigurationStatus model + = BinaryData.fromString("{\"logLevel\":\"Default\",\"metricsLevel\":\"Default\"}") + .toObject(StorageApplianceMonitoringConfigurationStatus.class); + Assertions.assertEquals(StorageApplianceMetricsConfigurationStatusLogLevel.DEFAULT, model.logLevel()); + Assertions.assertEquals(StorageApplianceMetricsConfigurationStatusMetricsLevel.DEFAULT, model.metricsLevel()); + } +} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancePatchParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancePatchParametersTests.java index b7358ef4a459..390b4897756d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancePatchParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancePatchParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,20 +14,20 @@ public final class StorageAppliancePatchParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageAppliancePatchParameters model = BinaryData.fromString( - "{\"properties\":{\"serialNumber\":\"ravjuq\"},\"tags\":{\"jjk\":\"xmrgchbapxkiy\",\"scgdu\":\"ajb\",\"jy\":\"sioycblevpmcl\"}}") + "{\"properties\":{\"serialNumber\":\"knpgoxgjiuq\"},\"tags\":{\"d\":\"tozipqwj\",\"ylkmqp\":\"urrxxgewpktv\",\"hlfbcgwgc\":\"o\"}}") .toObject(StorageAppliancePatchParameters.class); - Assertions.assertEquals("xmrgchbapxkiy", model.tags().get("jjk")); - Assertions.assertEquals("ravjuq", model.serialNumber()); + Assertions.assertEquals("tozipqwj", model.tags().get("d")); + Assertions.assertEquals("knpgoxgjiuq", model.serialNumber()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StorageAppliancePatchParameters model = new StorageAppliancePatchParameters() - .withTags(mapOf("jjk", "xmrgchbapxkiy", "scgdu", "ajb", "jy", "sioycblevpmcl")) - .withSerialNumber("ravjuq"); + .withTags(mapOf("d", "tozipqwj", "ylkmqp", "urrxxgewpktv", "hlfbcgwgc", "o")) + .withSerialNumber("knpgoxgjiuq"); model = BinaryData.fromObject(model).toObject(StorageAppliancePatchParameters.class); - Assertions.assertEquals("xmrgchbapxkiy", model.tags().get("jjk")); - Assertions.assertEquals("ravjuq", model.serialNumber()); + Assertions.assertEquals("tozipqwj", model.tags().get("d")); + Assertions.assertEquals("knpgoxgjiuq", model.serialNumber()); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancePatchPropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancePatchPropertiesTests.java index 7f6d4bb49f43..50fdd41acd91 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancePatchPropertiesTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageAppliancePatchPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,14 +12,14 @@ public final class StorageAppliancePatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageAppliancePatchProperties model - = BinaryData.fromString("{\"serialNumber\":\"yxlzgs\"}").toObject(StorageAppliancePatchProperties.class); - Assertions.assertEquals("yxlzgs", model.serialNumber()); + = BinaryData.fromString("{\"serialNumber\":\"xoe\"}").toObject(StorageAppliancePatchProperties.class); + Assertions.assertEquals("xoe", model.serialNumber()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StorageAppliancePatchProperties model = new StorageAppliancePatchProperties().withSerialNumber("yxlzgs"); + StorageAppliancePatchProperties model = new StorageAppliancePatchProperties().withSerialNumber("xoe"); model = BinaryData.fromObject(model).toObject(StorageAppliancePatchProperties.class); - Assertions.assertEquals("yxlzgs", model.serialNumber()); + Assertions.assertEquals("xoe", model.serialNumber()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceRunReadCommandsParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceRunReadCommandsParametersTests.java index b12f5cd7d808..afaf588ce2d9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceRunReadCommandsParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceRunReadCommandsParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,29 +14,26 @@ public final class StorageApplianceRunReadCommandsParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageApplianceRunReadCommandsParameters model = BinaryData.fromString( - "{\"commands\":[{\"arguments\":[\"tptnuwjtk\",\"chgcgqyh\"],\"command\":\"eseyqr\"},{\"arguments\":[\"eldotjv\"],\"command\":\"kwiswskukjtas\"},{\"arguments\":[\"ispkxkdtx\",\"kndlqvtwknvg\"],\"command\":\"mb\"},{\"arguments\":[\"yw\",\"tmqa\",\"kueatgroeshoy\"],\"command\":\"zcbyfq\"}],\"limitTimeSeconds\":139164425175562524}") + "{\"commands\":[{\"arguments\":[\"chnmna\",\"mnxhkxjqirwrweo\"],\"command\":\"xffi\"},{\"arguments\":[\"wrsnewmozqvbu\",\"qmamhsycxhxzga\"],\"command\":\"ttaboidvmfqh\"}],\"limitTimeSeconds\":3132194827411846414}") .toObject(StorageApplianceRunReadCommandsParameters.class); - Assertions.assertEquals("tptnuwjtk", model.commands().get(0).arguments().get(0)); - Assertions.assertEquals("eseyqr", model.commands().get(0).command()); - Assertions.assertEquals(139164425175562524L, model.limitTimeSeconds()); + Assertions.assertEquals("chnmna", model.commands().get(0).arguments().get(0)); + Assertions.assertEquals("xffi", model.commands().get(0).command()); + Assertions.assertEquals(3132194827411846414L, model.limitTimeSeconds()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StorageApplianceRunReadCommandsParameters model = new StorageApplianceRunReadCommandsParameters().withCommands(Arrays.asList( - new StorageApplianceCommandSpecification().withArguments(Arrays.asList("tptnuwjtk", "chgcgqyh")) - .withCommand("eseyqr"), - new StorageApplianceCommandSpecification().withArguments(Arrays.asList("eldotjv")) - .withCommand("kwiswskukjtas"), - new StorageApplianceCommandSpecification().withArguments(Arrays.asList("ispkxkdtx", "kndlqvtwknvg")) - .withCommand("mb"), - new StorageApplianceCommandSpecification().withArguments(Arrays.asList("yw", "tmqa", "kueatgroeshoy")) - .withCommand("zcbyfq"))) - .withLimitTimeSeconds(139164425175562524L); + new StorageApplianceCommandSpecification().withArguments(Arrays.asList("chnmna", "mnxhkxjqirwrweo")) + .withCommand("xffi"), + new StorageApplianceCommandSpecification() + .withArguments(Arrays.asList("wrsnewmozqvbu", "qmamhsycxhxzga")) + .withCommand("ttaboidvmfqh"))) + .withLimitTimeSeconds(3132194827411846414L); model = BinaryData.fromObject(model).toObject(StorageApplianceRunReadCommandsParameters.class); - Assertions.assertEquals("tptnuwjtk", model.commands().get(0).arguments().get(0)); - Assertions.assertEquals("eseyqr", model.commands().get(0).command()); - Assertions.assertEquals(139164425175562524L, model.limitTimeSeconds()); + Assertions.assertEquals("chnmna", model.commands().get(0).arguments().get(0)); + Assertions.assertEquals("xffi", model.commands().get(0).command()); + Assertions.assertEquals(3132194827411846414L, model.limitTimeSeconds()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceSkuPropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceSkuPropertiesTests.java index 5b23000a5918..a9c674763cb4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceSkuPropertiesTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceSkuPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class StorageApplianceSkuPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageApplianceSkuProperties model - = BinaryData.fromString("{\"capacityGB\":7514993743216079337,\"model\":\"zrxcczurt\"}") + = BinaryData.fromString("{\"capacityGB\":6282236757902676992,\"model\":\"tmninw\"}") .toObject(StorageApplianceSkuProperties.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageApplianceSkuProperties model = new StorageApplianceSkuProperties(); - model = BinaryData.fromObject(model).toObject(StorageApplianceSkuProperties.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceSkuSlotTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceSkuSlotTests.java index f1707883d132..77f421f36511 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceSkuSlotTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageApplianceSkuSlotTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,13 +11,7 @@ public final class StorageApplianceSkuSlotTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageApplianceSkuSlot model = BinaryData.fromString( - "{\"properties\":{\"capacityGB\":8468981532737718039,\"model\":\"ygvkzqkjj\"},\"rackSlot\":7086092996624999553}") + "{\"properties\":{\"capacityGB\":2278873561609898345,\"model\":\"svu\"},\"rackSlot\":314729469898266965}") .toObject(StorageApplianceSkuSlot.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageApplianceSkuSlot model = new StorageApplianceSkuSlot(); - model = BinaryData.fromObject(model).toObject(StorageApplianceSkuSlot.class); - } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageProfileTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageProfileTests.java index bdff4fb201d6..0b3d39b68750 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageProfileTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/StorageProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -16,24 +16,24 @@ public final class StorageProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageProfile model = BinaryData.fromString( - "{\"osDisk\":{\"createOption\":\"Persistent\",\"deleteOption\":\"Delete\",\"diskSizeGB\":4622473731827876718},\"volumeAttachments\":[\"jyoogwxh\",\"sd\"]}") + "{\"osDisk\":{\"createOption\":\"Ephemeral\",\"deleteOption\":\"Delete\",\"diskSizeGB\":7844444251983194678},\"volumeAttachments\":[\"qyhqo\",\"oihiqak\"]}") .toObject(StorageProfile.class); - Assertions.assertEquals(OsDiskCreateOption.PERSISTENT, model.osDisk().createOption()); + Assertions.assertEquals(OsDiskCreateOption.EPHEMERAL, model.osDisk().createOption()); Assertions.assertEquals(OsDiskDeleteOption.DELETE, model.osDisk().deleteOption()); - Assertions.assertEquals(4622473731827876718L, model.osDisk().diskSizeGB()); - Assertions.assertEquals("jyoogwxh", model.volumeAttachments().get(0)); + Assertions.assertEquals(7844444251983194678L, model.osDisk().diskSizeGB()); + Assertions.assertEquals("qyhqo", model.volumeAttachments().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StorageProfile model - = new StorageProfile().withOsDisk(new OsDisk().withCreateOption(OsDiskCreateOption.PERSISTENT) + = new StorageProfile().withOsDisk(new OsDisk().withCreateOption(OsDiskCreateOption.EPHEMERAL) .withDeleteOption(OsDiskDeleteOption.DELETE) - .withDiskSizeGB(4622473731827876718L)).withVolumeAttachments(Arrays.asList("jyoogwxh", "sd")); + .withDiskSizeGB(7844444251983194678L)).withVolumeAttachments(Arrays.asList("qyhqo", "oihiqak")); model = BinaryData.fromObject(model).toObject(StorageProfile.class); - Assertions.assertEquals(OsDiskCreateOption.PERSISTENT, model.osDisk().createOption()); + Assertions.assertEquals(OsDiskCreateOption.EPHEMERAL, model.osDisk().createOption()); Assertions.assertEquals(OsDiskDeleteOption.DELETE, model.osDisk().deleteOption()); - Assertions.assertEquals(4622473731827876718L, model.osDisk().diskSizeGB()); - Assertions.assertEquals("jyoogwxh", model.volumeAttachments().get(0)); + Assertions.assertEquals(7844444251983194678L, model.osDisk().diskSizeGB()); + Assertions.assertEquals("qyhqo", model.volumeAttachments().get(0)); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkAttachmentConfigurationTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkAttachmentConfigurationTests.java index 86b1b13ce4ca..1c29ae45398e 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkAttachmentConfigurationTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkAttachmentConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,19 +13,19 @@ public final class TrunkedNetworkAttachmentConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TrunkedNetworkAttachmentConfiguration model - = BinaryData.fromString("{\"networkId\":\"ghvxndzwmkrefa\",\"pluginType\":\"DPDK\"}") + = BinaryData.fromString("{\"networkId\":\"pyostronzmyhgfi\",\"pluginType\":\"IPVLAN\"}") .toObject(TrunkedNetworkAttachmentConfiguration.class); - Assertions.assertEquals("ghvxndzwmkrefa", model.networkId()); - Assertions.assertEquals(KubernetesPluginType.DPDK, model.pluginType()); + Assertions.assertEquals("pyostronzmyhgfi", model.networkId()); + Assertions.assertEquals(KubernetesPluginType.IPVLAN, model.pluginType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { TrunkedNetworkAttachmentConfiguration model - = new TrunkedNetworkAttachmentConfiguration().withNetworkId("ghvxndzwmkrefa") - .withPluginType(KubernetesPluginType.DPDK); + = new TrunkedNetworkAttachmentConfiguration().withNetworkId("pyostronzmyhgfi") + .withPluginType(KubernetesPluginType.IPVLAN); model = BinaryData.fromObject(model).toObject(TrunkedNetworkAttachmentConfiguration.class); - Assertions.assertEquals("ghvxndzwmkrefa", model.networkId()); - Assertions.assertEquals(KubernetesPluginType.DPDK, model.pluginType()); + Assertions.assertEquals("pyostronzmyhgfi", model.networkId()); + Assertions.assertEquals(KubernetesPluginType.IPVLAN, model.pluginType()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkInnerTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkInnerTests.java index 306b19215303..8fc12b2604eb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkInnerTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkInnerTests.java @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.networkcloud.fluent.models.TrunkedNetworkInner; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; import java.util.Arrays; import java.util.HashMap; @@ -17,36 +18,38 @@ public final class TrunkedNetworkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TrunkedNetworkInner model = BinaryData.fromString( - "{\"etag\":\"fcttuxuuyilfl\",\"extendedLocation\":{\"name\":\"oiquvrehmrnjhvs\",\"type\":\"jztczytqj\"},\"properties\":{\"associatedResourceIds\":[\"auunfprnjletlx\"],\"clusterId\":\"rpddouifamo\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"yn\",\"hybridAksClustersAssociatedIds\":[\"qwzdvpiwhxq\",\"zdtmaajquhuxylrj\",\"m\",\"ygjbmzyospspsh\"],\"hybridAksPluginType\":\"SRIOV\",\"interfaceName\":\"yjpmspbpssdfppyo\",\"isolationDomainIds\":[\"ieyujtvc\",\"kcnyx\",\"x\",\"unjdx\"],\"provisioningState\":\"Failed\",\"virtualMachinesAssociatedIds\":[\"vxlx\",\"aglqivbgkcvkh\"],\"vlans\":[3704999238857518787,3079448056204199548,2262701313966252987]},\"location\":\"oniypfpubcpzgp\",\"tags\":{\"gqjxgpnrhgovfgp\":\"vhjknidi\",\"zvuporqzdfuydz\":\"kqmhhaowjr\",\"xqpswok\":\"kfvxcnq\"},\"id\":\"vkhlggdhbemz\",\"name\":\"kzsz\",\"type\":\"wiwtglxxhl\"}") + "{\"properties\":{\"hybridAksPluginType\":\"DPDK\",\"interfaceName\":\"slwkojpl\",\"isolationDomainIds\":[\"dnpdwrpqaf\",\"fugsnnfhyetefy\",\"oc\",\"ctfjgtixr\"],\"vlans\":[3731882443821848818,418846037583136212,7262703039995760177],\"associatedResourceIds\":[\"muowolbauiro\",\"ionszonwp\"],\"clusterId\":\"ajinnixjawrtmjfj\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"xlzhcoxovnekh\",\"hybridAksClustersAssociatedIds\":[\"usfnr\",\"tjxtxr\",\"cq\",\"jvidttge\"],\"virtualMachinesAssociatedIds\":[\"lvyjtcvuwkas\",\"zies\",\"uughtuqfecjxeyg\",\"uhxu\"],\"provisioningState\":\"Canceled\"},\"etag\":\"ewmrswnjlxu\",\"extendedLocation\":{\"name\":\"rhwpus\",\"type\":\"CustomLocation\"},\"location\":\"aqehg\",\"tags\":{\"xncnwfe\":\"hzjqatucoige\",\"cgbjbgdlfgt\":\"bnwgfmxj\",\"naquflq\":\"y\",\"zeqyjleziun\":\"ctqhamzjrwdk\"},\"id\":\"xdfzantkw\",\"name\":\"eg\",\"type\":\"amlbnseqacjjvpil\"}") .toObject(TrunkedNetworkInner.class); - Assertions.assertEquals("oniypfpubcpzgp", model.location()); - Assertions.assertEquals("vhjknidi", model.tags().get("gqjxgpnrhgovfgp")); - Assertions.assertEquals("oiquvrehmrnjhvs", model.extendedLocation().name()); - Assertions.assertEquals("jztczytqj", model.extendedLocation().type()); - Assertions.assertEquals(HybridAksPluginType.SRIOV, model.hybridAksPluginType()); - Assertions.assertEquals("yjpmspbpssdfppyo", model.interfaceName()); - Assertions.assertEquals("ieyujtvc", model.isolationDomainIds().get(0)); - Assertions.assertEquals(3704999238857518787L, model.vlans().get(0)); + Assertions.assertEquals("aqehg", model.location()); + Assertions.assertEquals("hzjqatucoige", model.tags().get("xncnwfe")); + Assertions.assertEquals("rhwpus", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.extendedLocation().type()); + Assertions.assertEquals(HybridAksPluginType.DPDK, model.hybridAksPluginType()); + Assertions.assertEquals("slwkojpl", model.interfaceName()); + Assertions.assertEquals("dnpdwrpqaf", model.isolationDomainIds().get(0)); + Assertions.assertEquals(3731882443821848818L, model.vlans().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TrunkedNetworkInner model = new TrunkedNetworkInner().withLocation("oniypfpubcpzgp") - .withTags(mapOf("gqjxgpnrhgovfgp", "vhjknidi", "zvuporqzdfuydz", "kqmhhaowjr", "xqpswok", "kfvxcnq")) - .withExtendedLocation(new ExtendedLocation().withName("oiquvrehmrnjhvs").withType("jztczytqj")) - .withHybridAksPluginType(HybridAksPluginType.SRIOV) - .withInterfaceName("yjpmspbpssdfppyo") - .withIsolationDomainIds(Arrays.asList("ieyujtvc", "kcnyx", "x", "unjdx")) - .withVlans(Arrays.asList(3704999238857518787L, 3079448056204199548L, 2262701313966252987L)); + TrunkedNetworkInner model = new TrunkedNetworkInner().withLocation("aqehg") + .withTags(mapOf("xncnwfe", "hzjqatucoige", "cgbjbgdlfgt", "bnwgfmxj", "naquflq", "y", "zeqyjleziun", + "ctqhamzjrwdk")) + .withExtendedLocation( + new ExtendedLocation().withName("rhwpus").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withHybridAksPluginType(HybridAksPluginType.DPDK) + .withInterfaceName("slwkojpl") + .withIsolationDomainIds(Arrays.asList("dnpdwrpqaf", "fugsnnfhyetefy", "oc", "ctfjgtixr")) + .withVlans(Arrays.asList(3731882443821848818L, 418846037583136212L, 7262703039995760177L)); model = BinaryData.fromObject(model).toObject(TrunkedNetworkInner.class); - Assertions.assertEquals("oniypfpubcpzgp", model.location()); - Assertions.assertEquals("vhjknidi", model.tags().get("gqjxgpnrhgovfgp")); - Assertions.assertEquals("oiquvrehmrnjhvs", model.extendedLocation().name()); - Assertions.assertEquals("jztczytqj", model.extendedLocation().type()); - Assertions.assertEquals(HybridAksPluginType.SRIOV, model.hybridAksPluginType()); - Assertions.assertEquals("yjpmspbpssdfppyo", model.interfaceName()); - Assertions.assertEquals("ieyujtvc", model.isolationDomainIds().get(0)); - Assertions.assertEquals(3704999238857518787L, model.vlans().get(0)); + Assertions.assertEquals("aqehg", model.location()); + Assertions.assertEquals("hzjqatucoige", model.tags().get("xncnwfe")); + Assertions.assertEquals("rhwpus", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.extendedLocation().type()); + Assertions.assertEquals(HybridAksPluginType.DPDK, model.hybridAksPluginType()); + Assertions.assertEquals("slwkojpl", model.interfaceName()); + Assertions.assertEquals("dnpdwrpqaf", model.isolationDomainIds().get(0)); + Assertions.assertEquals(3731882443821848818L, model.vlans().get(0)); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkListTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkListTests.java index f1449188c314..22a63ffdc297 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkListTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkListTests.java @@ -1,84 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.networkcloud.fluent.models.TrunkedNetworkInner; -import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.implementation.models.TrunkedNetworkList; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; -import com.azure.resourcemanager.networkcloud.models.TrunkedNetworkList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class TrunkedNetworkListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TrunkedNetworkList model = BinaryData.fromString( - "{\"nextLink\":\"n\",\"value\":[{\"etag\":\"zfylsg\",\"extendedLocation\":{\"name\":\"rpfbcunezz\",\"type\":\"e\"},\"properties\":{\"associatedResourceIds\":[\"fwyfwlwxjwet\",\"psihcla\",\"zvaylptrsqqw\",\"tcmwqkchc\"],\"clusterId\":\"axfe\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"jexfdeqvhp\",\"hybridAksClustersAssociatedIds\":[\"kkshkbffm\",\"mxzjrgywwpgjx\",\"nptfujgi\",\"gaao\"],\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"aqutdewemxswvruu\",\"isolationDomainIds\":[\"zjgehkfkim\",\"tixo\",\"ffqyinlj\"],\"provisioningState\":\"Provisioning\",\"virtualMachinesAssociatedIds\":[\"hi\",\"monstshiyxgve\",\"fclduccbirdsv\"],\"vlans\":[8371303576837694665,982375523100581938]},\"location\":\"gstmninwjizciln\",\"tags\":{\"luxlxqzvnersby\":\"shejjtbxqm\",\"ze\":\"ucrwnami\",\"fuhok\":\"rqbsmswziq\",\"czznvfbycjsxj\":\"ruswhv\"},\"id\":\"wix\",\"name\":\"vumwmxqh\",\"type\":\"dvnoamldsehaohdj\"},{\"etag\":\"flzokxco\",\"extendedLocation\":{\"name\":\"pelnjetag\",\"type\":\"tsxoatftgz\"},\"properties\":{\"associatedResourceIds\":[\"bs\",\"vefloccsrmozihmi\",\"g\",\"wtxxpkyjcx\"],\"clusterId\":\"xgrytfmp\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"lrmcaykg\",\"hybridAksClustersAssociatedIds\":[\"xu\",\"t\",\"ksxwpnd\"],\"hybridAksPluginType\":\"DPDK\",\"interfaceName\":\"nznthjtw\",\"isolationDomainIds\":[\"aosrxuz\",\"oamktcq\",\"os\"],\"provisioningState\":\"Canceled\",\"virtualMachinesAssociatedIds\":[\"hgxqdlyrt\"],\"vlans\":[5992510681594871014,5185737430210196834,6650488414164518594]},\"location\":\"katbhjm\",\"tags\":{\"vlagun\":\"bsoqeqala\",\"mhyreeudz\":\"tgfebwln\",\"pdqmjxlyyzglgouw\":\"av\"},\"id\":\"lmjjyuo\",\"name\":\"qtobaxkjeyt\",\"type\":\"nlb\"},{\"etag\":\"kwr\",\"extendedLocation\":{\"name\":\"snkq\",\"type\":\"hsyrqunj\"},\"properties\":{\"associatedResourceIds\":[\"enx\",\"ulkpakd\"],\"clusterId\":\"fmjnnawtqa\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"ckpggqoweyird\",\"hybridAksClustersAssociatedIds\":[\"sn\",\"wfl\",\"qmp\",\"zruwn\"],\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"xiw\",\"isolationDomainIds\":[\"ngjsaasi\"],\"provisioningState\":\"Provisioning\",\"virtualMachinesAssociatedIds\":[\"zjvkviirhgfgrws\"],\"vlans\":[8591259357843021796,4323048608254500144,623355788866694259,1716738927704410418]},\"location\":\"lbyvictctbrxkjzw\",\"tags\":{\"hkwfbkgozxwop\":\"ffm\"},\"id\":\"bydpizqaclnapxb\",\"name\":\"yg\",\"type\":\"ugjknf\"}]}") + "{\"value\":[{\"properties\":{\"hybridAksPluginType\":\"SRIOV\",\"interfaceName\":\"ygb\",\"isolationDomainIds\":[\"qqekewvnqvcdlgu\"],\"vlans\":[1583021266402651237,1003401906819026802],\"associatedResourceIds\":[\"nlaxpunjqikcz\",\"vitac\"],\"clusterId\":\"mfcsserx\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"oxhlw\",\"hybridAksClustersAssociatedIds\":[\"j\",\"qrsxyp\",\"uuuybnchrsziz\"],\"virtualMachinesAssociatedIds\":[\"elyetndnbf\",\"yggagflnlgmt\",\"wahzjmucftbyr\"],\"provisioningState\":\"Provisioning\"},\"etag\":\"hkpigqfusuckzmkw\",\"extendedLocation\":{\"name\":\"lsnoxaxmqeqalh\",\"type\":\"CustomLocation\"},\"location\":\"hgwydyynfsv\",\"tags\":{\"narfdlpukhpyrn\":\"bvqt\"},\"id\":\"izjcpeog\",\"name\":\"hnmgbroux\",\"type\":\"dbhfhp\"},{\"properties\":{\"hybridAksPluginType\":\"DPDK\",\"interfaceName\":\"jzoywjxhp\",\"isolationDomainIds\":[\"lontacnpq\",\"tehtuevrhrljyoog\",\"xh\",\"sd\"],\"vlans\":[809684715358738696,4498449621335160642,4273598841722740442,1942292497864642353],\"associatedResourceIds\":[\"kfuarenlv\"],\"clusterId\":\"tklnvnafvvkyfed\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"oslc\",\"hybridAksClustersAssociatedIds\":[\"p\"],\"virtualMachinesAssociatedIds\":[\"hminqcymczngnbdx\",\"ewuninvud\",\"chaqdtvqec\"],\"provisioningState\":\"Succeeded\"},\"etag\":\"mxxdtddmflh\",\"extendedLocation\":{\"name\":\"ytxzvtznapxbanno\",\"type\":\"CustomLocation\"},\"location\":\"xc\",\"tags\":{\"rrrouuxvnsa\":\"prwnwvroevytlyo\",\"lobdxna\":\"bcrymodizrx\"},\"id\":\"pmkmlmvevfx\",\"name\":\"op\",\"type\":\"hbzxli\"}],\"nextLink\":\"rdddtfgxqbawpcb\"}") .toObject(TrunkedNetworkList.class); - Assertions.assertEquals("n", model.nextLink()); - Assertions.assertEquals("gstmninwjizciln", model.value().get(0).location()); - Assertions.assertEquals("shejjtbxqm", model.value().get(0).tags().get("luxlxqzvnersby")); - Assertions.assertEquals("rpfbcunezz", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("e", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(HybridAksPluginType.OSDEVICE, model.value().get(0).hybridAksPluginType()); - Assertions.assertEquals("aqutdewemxswvruu", model.value().get(0).interfaceName()); - Assertions.assertEquals("zjgehkfkim", model.value().get(0).isolationDomainIds().get(0)); - Assertions.assertEquals(8371303576837694665L, model.value().get(0).vlans().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrunkedNetworkList model = new TrunkedNetworkList().withNextLink("n") - .withValue(Arrays.asList( - new TrunkedNetworkInner().withLocation("gstmninwjizciln") - .withTags(mapOf("luxlxqzvnersby", "shejjtbxqm", "ze", "ucrwnami", "fuhok", "rqbsmswziq", - "czznvfbycjsxj", "ruswhv")) - .withExtendedLocation(new ExtendedLocation().withName("rpfbcunezz").withType("e")) - .withHybridAksPluginType(HybridAksPluginType.OSDEVICE) - .withInterfaceName("aqutdewemxswvruu") - .withIsolationDomainIds(Arrays.asList("zjgehkfkim", "tixo", "ffqyinlj")) - .withVlans(Arrays.asList(8371303576837694665L, 982375523100581938L)), - new TrunkedNetworkInner().withLocation("katbhjm") - .withTags(mapOf("vlagun", "bsoqeqala", "mhyreeudz", "tgfebwln", "pdqmjxlyyzglgouw", "av")) - .withExtendedLocation(new ExtendedLocation().withName("pelnjetag").withType("tsxoatftgz")) - .withHybridAksPluginType(HybridAksPluginType.DPDK) - .withInterfaceName("nznthjtw") - .withIsolationDomainIds(Arrays.asList("aosrxuz", "oamktcq", "os")) - .withVlans(Arrays.asList(5992510681594871014L, 5185737430210196834L, 6650488414164518594L)), - new TrunkedNetworkInner().withLocation("lbyvictctbrxkjzw") - .withTags(mapOf("hkwfbkgozxwop", "ffm")) - .withExtendedLocation(new ExtendedLocation().withName("snkq").withType("hsyrqunj")) - .withHybridAksPluginType(HybridAksPluginType.OSDEVICE) - .withInterfaceName("xiw") - .withIsolationDomainIds(Arrays.asList("ngjsaasi")) - .withVlans(Arrays.asList(8591259357843021796L, 4323048608254500144L, 623355788866694259L, - 1716738927704410418L)))); - model = BinaryData.fromObject(model).toObject(TrunkedNetworkList.class); - Assertions.assertEquals("n", model.nextLink()); - Assertions.assertEquals("gstmninwjizciln", model.value().get(0).location()); - Assertions.assertEquals("shejjtbxqm", model.value().get(0).tags().get("luxlxqzvnersby")); - Assertions.assertEquals("rpfbcunezz", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("e", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(HybridAksPluginType.OSDEVICE, model.value().get(0).hybridAksPluginType()); - Assertions.assertEquals("aqutdewemxswvruu", model.value().get(0).interfaceName()); - Assertions.assertEquals("zjgehkfkim", model.value().get(0).isolationDomainIds().get(0)); - Assertions.assertEquals(8371303576837694665L, model.value().get(0).vlans().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("hgwydyynfsv", model.value().get(0).location()); + Assertions.assertEquals("bvqt", model.value().get(0).tags().get("narfdlpukhpyrn")); + Assertions.assertEquals("lsnoxaxmqeqalh", model.value().get(0).extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); + Assertions.assertEquals(HybridAksPluginType.SRIOV, model.value().get(0).hybridAksPluginType()); + Assertions.assertEquals("ygb", model.value().get(0).interfaceName()); + Assertions.assertEquals("qqekewvnqvcdlgu", model.value().get(0).isolationDomainIds().get(0)); + Assertions.assertEquals(1583021266402651237L, model.value().get(0).vlans().get(0)); + Assertions.assertEquals("rdddtfgxqbawpcb", model.nextLink()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkPatchParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkPatchParametersTests.java index e827a2353098..eb30ccf29fa4 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkPatchParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkPatchParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,15 +14,15 @@ public final class TrunkedNetworkPatchParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TrunkedNetworkPatchParameters model - = BinaryData.fromString("{\"tags\":{\"ceysfaqeg\":\"qyn\"}}").toObject(TrunkedNetworkPatchParameters.class); - Assertions.assertEquals("qyn", model.tags().get("ceysfaqeg")); + = BinaryData.fromString("{\"tags\":{\"vwkpqh\":\"fzyjqt\"}}").toObject(TrunkedNetworkPatchParameters.class); + Assertions.assertEquals("fzyjqt", model.tags().get("vwkpqh")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TrunkedNetworkPatchParameters model = new TrunkedNetworkPatchParameters().withTags(mapOf("ceysfaqeg", "qyn")); + TrunkedNetworkPatchParameters model = new TrunkedNetworkPatchParameters().withTags(mapOf("vwkpqh", "fzyjqt")); model = BinaryData.fromObject(model).toObject(TrunkedNetworkPatchParameters.class); - Assertions.assertEquals("qyn", model.tags().get("ceysfaqeg")); + Assertions.assertEquals("fzyjqt", model.tags().get("vwkpqh")); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkPropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkPropertiesTests.java index b6baa3cb3f7a..f7c4783f1d05 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkPropertiesTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworkPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,25 +14,26 @@ public final class TrunkedNetworkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TrunkedNetworkProperties model = BinaryData.fromString( - "{\"associatedResourceIds\":[\"gpicr\"],\"clusterId\":\"zhrgmqgjsxvpqc\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"bodthsqqgvri\",\"hybridAksClustersAssociatedIds\":[\"kclacjfrn\"],\"hybridAksPluginType\":\"DPDK\",\"interfaceName\":\"xauzlwvsgmwohqfz\",\"isolationDomainIds\":[\"vux\",\"mk\"],\"provisioningState\":\"Provisioning\",\"virtualMachinesAssociatedIds\":[\"nwpztekovmrib\",\"attgplu\"],\"vlans\":[4954488312546840581,1603965922436753716]}") + "{\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"qjagmditgueiook\",\"isolationDomainIds\":[\"sahrtdtpdel\",\"ac\"],\"vlans\":[79183127884513317,6855240131377842443,635778272678481965,9161390879433317319],\"associatedResourceIds\":[\"f\"],\"clusterId\":\"jkgd\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"f\",\"hybridAksClustersAssociatedIds\":[\"jwabmd\",\"jtmvc\",\"pexcmjurbuhh\",\"kyqltqsrogt\"],\"virtualMachinesAssociatedIds\":[\"ffdjktsysidfvclg\",\"xnfuijtkbusqogs\",\"ikayiansharuj\"],\"provisioningState\":\"Canceled\"}") .toObject(TrunkedNetworkProperties.class); - Assertions.assertEquals(HybridAksPluginType.DPDK, model.hybridAksPluginType()); - Assertions.assertEquals("xauzlwvsgmwohqfz", model.interfaceName()); - Assertions.assertEquals("vux", model.isolationDomainIds().get(0)); - Assertions.assertEquals(4954488312546840581L, model.vlans().get(0)); + Assertions.assertEquals(HybridAksPluginType.OSDEVICE, model.hybridAksPluginType()); + Assertions.assertEquals("qjagmditgueiook", model.interfaceName()); + Assertions.assertEquals("sahrtdtpdel", model.isolationDomainIds().get(0)); + Assertions.assertEquals(79183127884513317L, model.vlans().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { TrunkedNetworkProperties model - = new TrunkedNetworkProperties().withHybridAksPluginType(HybridAksPluginType.DPDK) - .withInterfaceName("xauzlwvsgmwohqfz") - .withIsolationDomainIds(Arrays.asList("vux", "mk")) - .withVlans(Arrays.asList(4954488312546840581L, 1603965922436753716L)); + = new TrunkedNetworkProperties().withHybridAksPluginType(HybridAksPluginType.OSDEVICE) + .withInterfaceName("qjagmditgueiook") + .withIsolationDomainIds(Arrays.asList("sahrtdtpdel", "ac")) + .withVlans( + Arrays.asList(79183127884513317L, 6855240131377842443L, 635778272678481965L, 9161390879433317319L)); model = BinaryData.fromObject(model).toObject(TrunkedNetworkProperties.class); - Assertions.assertEquals(HybridAksPluginType.DPDK, model.hybridAksPluginType()); - Assertions.assertEquals("xauzlwvsgmwohqfz", model.interfaceName()); - Assertions.assertEquals("vux", model.isolationDomainIds().get(0)); - Assertions.assertEquals(4954488312546840581L, model.vlans().get(0)); + Assertions.assertEquals(HybridAksPluginType.OSDEVICE, model.hybridAksPluginType()); + Assertions.assertEquals("qjagmditgueiook", model.interfaceName()); + Assertions.assertEquals("sahrtdtpdel", model.isolationDomainIds().get(0)); + Assertions.assertEquals(79183127884513317L, model.vlans().get(0)); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksCreateOrUpdateMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksCreateOrUpdateMockTests.java index 4fcf7d2eb01d..1f47028e5e34 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksCreateOrUpdateMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,6 +11,7 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; import com.azure.resourcemanager.networkcloud.models.TrunkedNetwork; import java.nio.charset.StandardCharsets; @@ -26,7 +27,7 @@ public final class TrunkedNetworksCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"qjzmhkdcl\",\"extendedLocation\":{\"name\":\"croczf\",\"type\":\"unerke\"},\"properties\":{\"associatedResourceIds\":[\"zshxzezbzuz\"],\"clusterId\":\"l\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"kejcgwfsgqksty\",\"hybridAksClustersAssociatedIds\":[\"pyuijp\",\"rdavsjcfmazpzdq\"],\"hybridAksPluginType\":\"DPDK\",\"interfaceName\":\"cmcokxizekuv\",\"isolationDomainIds\":[\"jwucaonzva\",\"bvb\"],\"provisioningState\":\"Succeeded\",\"virtualMachinesAssociatedIds\":[\"mdidac\",\"zidgzwd\"],\"vlans\":[5791397980525597100,8418922348350774533,7223221630388837830]},\"location\":\"tdivykpxkqejtp\",\"tags\":{\"oiboan\":\"jiunrlshxuknsykd\",\"uld\":\"drcoanv\",\"baqzizxzpz\":\"onckbnlblfxlup\",\"bogvgfklqiy\":\"eghlw\"},\"id\":\"dve\",\"name\":\"elsbfvd\",\"type\":\"trkzxsgtznsvlrds\"}"; + = "{\"properties\":{\"hybridAksPluginType\":\"SRIOV\",\"interfaceName\":\"smusuaawj\",\"isolationDomainIds\":[\"xwjnfcz\"],\"vlans\":[2595914989199311759,4987925881288573593,1738814052386416780],\"associatedResourceIds\":[\"ba\"],\"clusterId\":\"sjtgirnbgmgmddo\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"nltwmpftmfoeajog\",\"hybridAksClustersAssociatedIds\":[\"wetamfddrvlk\"],\"virtualMachinesAssociatedIds\":[\"bhnrecchdidr\",\"uhkahm\",\"edbiucvkhhwmjpjb\",\"eunxcqrrihufoi\"],\"provisioningState\":\"Succeeded\"},\"etag\":\"ybxvgn\",\"extendedLocation\":{\"name\":\"uzpbgkzcscpi\",\"type\":\"EdgeZone\"},\"location\":\"kunhdimjuk\",\"tags\":{\"gofmhxwrjlv\":\"zkaugpucdocfqpl\"},\"id\":\"klkvb\",\"name\":\"ikyjtkakvlb\",\"type\":\"shjvpzaptuoskaoi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,27 +37,29 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); TrunkedNetwork response = manager.trunkedNetworks() - .define("nhokh") - .withRegion("rkptgongruats") - .withExistingResourceGroup("uhbcak") - .withExtendedLocation(new ExtendedLocation().withName("azdnck").withType("dbjp")) - .withIsolationDomainIds(Arrays.asList("rwqirvtktyhhmvf", "lapjajod", "krrwepgqvqokql", "jqgir")) - .withVlans(Arrays.asList(872849846780246766L, 9092121557598185851L)) - .withTags(mapOf("aby", "sjqhenigbeqngu")) - .withHybridAksPluginType(HybridAksPluginType.SRIOV) - .withInterfaceName("p") - .withIfMatch("xlniwmcpm") - .withIfNoneMatch("rdlhvdvmiphbe") + .define("gjwdab") + .withRegion("nwdxzedpqlrfbor") + .withExistingResourceGroup("laxp") + .withExtendedLocation( + new ExtendedLocation().withName("neychbjizq").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withIsolationDomainIds(Arrays.asList("zfytlbtlqhopxou")) + .withVlans( + Arrays.asList(8365003666633002371L, 6031786168477667232L, 8946651255530035086L, 4700224604669495876L)) + .withTags(mapOf("vfrbypic", "mlnfyz")) + .withHybridAksPluginType(HybridAksPluginType.OSDEVICE) + .withInterfaceName("xa") + .withIfMatch("pxtzhigqqbtimpk") + .withIfNoneMatch("blornsih") .create(); - Assertions.assertEquals("tdivykpxkqejtp", response.location()); - Assertions.assertEquals("jiunrlshxuknsykd", response.tags().get("oiboan")); - Assertions.assertEquals("croczf", response.extendedLocation().name()); - Assertions.assertEquals("unerke", response.extendedLocation().type()); - Assertions.assertEquals(HybridAksPluginType.DPDK, response.hybridAksPluginType()); - Assertions.assertEquals("cmcokxizekuv", response.interfaceName()); - Assertions.assertEquals("jwucaonzva", response.isolationDomainIds().get(0)); - Assertions.assertEquals(5791397980525597100L, response.vlans().get(0)); + Assertions.assertEquals("kunhdimjuk", response.location()); + Assertions.assertEquals("zkaugpucdocfqpl", response.tags().get("gofmhxwrjlv")); + Assertions.assertEquals("uzpbgkzcscpi", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, response.extendedLocation().type()); + Assertions.assertEquals(HybridAksPluginType.SRIOV, response.hybridAksPluginType()); + Assertions.assertEquals("smusuaawj", response.interfaceName()); + Assertions.assertEquals("xwjnfcz", response.isolationDomainIds().get(0)); + Assertions.assertEquals(2595914989199311759L, response.vlans().get(0)); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksGetByResourceGroupWithResponseMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksGetByResourceGroupWithResponseMockTests.java index 08bf8ad52ee9..97ed01332102 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksGetByResourceGroupWithResponseMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksGetByResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -10,6 +10,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; import com.azure.resourcemanager.networkcloud.models.TrunkedNetwork; import java.nio.charset.StandardCharsets; @@ -22,7 +23,7 @@ public final class TrunkedNetworksGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"etag\":\"hf\",\"extendedLocation\":{\"name\":\"gbjmlr\",\"type\":\"esrfwsszvlcwli\"},\"properties\":{\"associatedResourceIds\":[\"ntfxxcrqmipfjwfo\",\"gizmshxxbaizabu\",\"nvgskjtoxjd\"],\"clusterId\":\"sjznvhx\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"i\",\"hybridAksClustersAssociatedIds\":[\"dhfnzocxmtfshksn\"],\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"pamwbw\",\"isolationDomainIds\":[\"nlslcef\"],\"provisioningState\":\"Accepted\",\"virtualMachinesAssociatedIds\":[\"wtkvi\",\"lpfliwoyn\"],\"vlans\":[8843044974204258452,9200982035931214075]},\"location\":\"ladpcmhjha\",\"tags\":{\"ekymffztsilscvqs\":\"b\",\"ihyeseu\":\"eiihfymko\"},\"id\":\"gcigzh\",\"name\":\"gsmgb\",\"type\":\"mt\"}"; + = "{\"properties\":{\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"dnzyzawatuwqko\",\"isolationDomainIds\":[\"czothymgo\",\"l\",\"msn\",\"gwi\"],\"vlans\":[1863339354491674068,4501292757426570565,6525173374380066185,888266510862921455],\"associatedResourceIds\":[\"bcyanrfvqtvk\",\"gvoogxkfna\",\"aqymhcctopuowyr\",\"skbyhquhczygx\"],\"clusterId\":\"ajpxecxqnwhscoza\",\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"xsm\",\"hybridAksClustersAssociatedIds\":[\"pwirfljfewxqouo\",\"ud\",\"mckaprh\"],\"virtualMachinesAssociatedIds\":[\"iijgencd\",\"moqueqihkkyow\"],\"provisioningState\":\"Failed\"},\"etag\":\"uwhldxwhieproqks\",\"extendedLocation\":{\"name\":\"fxmcvprstvk\",\"type\":\"CustomLocation\"},\"location\":\"fjtdyot\",\"tags\":{\"cqrq\":\"facqo\"},\"id\":\"wetjtdrhutf\",\"name\":\"oadtxopgehpadkmd\",\"type\":\"gssz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,16 +33,16 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); TrunkedNetwork response = manager.trunkedNetworks() - .getByResourceGroupWithResponse("g", "qzusitoq", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("lcaymjchtv", "n", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ladpcmhjha", response.location()); - Assertions.assertEquals("b", response.tags().get("ekymffztsilscvqs")); - Assertions.assertEquals("gbjmlr", response.extendedLocation().name()); - Assertions.assertEquals("esrfwsszvlcwli", response.extendedLocation().type()); + Assertions.assertEquals("fjtdyot", response.location()); + Assertions.assertEquals("facqo", response.tags().get("cqrq")); + Assertions.assertEquals("fxmcvprstvk", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, response.extendedLocation().type()); Assertions.assertEquals(HybridAksPluginType.OSDEVICE, response.hybridAksPluginType()); - Assertions.assertEquals("pamwbw", response.interfaceName()); - Assertions.assertEquals("nlslcef", response.isolationDomainIds().get(0)); - Assertions.assertEquals(8843044974204258452L, response.vlans().get(0)); + Assertions.assertEquals("dnzyzawatuwqko", response.interfaceName()); + Assertions.assertEquals("czothymgo", response.isolationDomainIds().get(0)); + Assertions.assertEquals(1863339354491674068L, response.vlans().get(0)); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListByResourceGroupMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListByResourceGroupMockTests.java index c46dda05b784..ef2fb074d643 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListByResourceGroupMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListByResourceGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,6 +11,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; import com.azure.resourcemanager.networkcloud.models.TrunkedNetwork; import java.nio.charset.StandardCharsets; @@ -23,7 +24,7 @@ public final class TrunkedNetworksListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"qownkiuajewnahw\",\"extendedLocation\":{\"name\":\"xjjmztnlmsoodtm\",\"type\":\"ecdh\"},\"properties\":{\"associatedResourceIds\":[\"wcrpt\",\"eajczxvlgsrgkr\",\"izrpywlptyuqhrl\"],\"clusterId\":\"skykpfuofix\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"fykkpyycpawmpjpr\",\"hybridAksClustersAssociatedIds\":[\"rpcfpcfjfwzl\",\"z\",\"wk\",\"yep\"],\"hybridAksPluginType\":\"SRIOV\",\"interfaceName\":\"nnidmdiawpzxk\",\"isolationDomainIds\":[\"ntmkctdhuosgwqps\",\"azihq\",\"dvqgcnbhcbmjkz\"],\"provisioningState\":\"Provisioning\",\"virtualMachinesAssociatedIds\":[\"ynts\"],\"vlans\":[4131201062515209692,2907134383034197357,1631064550747822546]},\"location\":\"hkmo\",\"tags\":{\"kbwg\":\"rh\",\"pfdzxcouzfwofw\":\"jgrulcfogxhcxnwj\",\"kzkdtzxsoednlwg\":\"k\",\"isnionetbzdrdpue\":\"ihezomucmq\"},\"id\":\"xkgtlzlmtrlxcznn\",\"name\":\"zkbnbmxl\",\"type\":\"mwt\"}]}"; + = "{\"value\":[{\"properties\":{\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"bvoyng\",\"isolationDomainIds\":[\"xxc\"],\"vlans\":[6901468364845194264,124801550834036216],\"associatedResourceIds\":[\"hdsaidj\",\"normov\",\"xxurntujmoilunwe\",\"hdeeljslkyozdsfz\"],\"clusterId\":\"egrhrh\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"jtv\",\"hybridAksClustersAssociatedIds\":[\"xvgjbfi\",\"bpnjodf\"],\"virtualMachinesAssociatedIds\":[\"qqw\",\"tqsmoxsa\",\"uxejgwecywnfyszz\",\"czs\"],\"provisioningState\":\"Provisioning\"},\"etag\":\"dnddbbozsyv\",\"extendedLocation\":{\"name\":\"mkjmyitrchwudlxe\",\"type\":\"CustomLocation\"},\"location\":\"tpmnoe\",\"tags\":{\"kydpmypgfqvmtywh\":\"lfmsibzoyrfg\"},\"id\":\"a\",\"name\":\"xpejpewpy\",\"type\":\"lfxampqc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +34,16 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.trunkedNetworks() - .listByResourceGroup("etwilyrzoxpd", 711714374, "lfr", com.azure.core.util.Context.NONE); + .listByResourceGroup("vctkbbx", 1188736161, "arlsirn", com.azure.core.util.Context.NONE); - Assertions.assertEquals("hkmo", response.iterator().next().location()); - Assertions.assertEquals("rh", response.iterator().next().tags().get("kbwg")); - Assertions.assertEquals("xjjmztnlmsoodtm", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("ecdh", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals(HybridAksPluginType.SRIOV, response.iterator().next().hybridAksPluginType()); - Assertions.assertEquals("nnidmdiawpzxk", response.iterator().next().interfaceName()); - Assertions.assertEquals("ntmkctdhuosgwqps", response.iterator().next().isolationDomainIds().get(0)); - Assertions.assertEquals(4131201062515209692L, response.iterator().next().vlans().get(0)); + Assertions.assertEquals("tpmnoe", response.iterator().next().location()); + Assertions.assertEquals("lfmsibzoyrfg", response.iterator().next().tags().get("kydpmypgfqvmtywh")); + Assertions.assertEquals("mkjmyitrchwudlxe", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, + response.iterator().next().extendedLocation().type()); + Assertions.assertEquals(HybridAksPluginType.OSDEVICE, response.iterator().next().hybridAksPluginType()); + Assertions.assertEquals("bvoyng", response.iterator().next().interfaceName()); + Assertions.assertEquals("xxc", response.iterator().next().isolationDomainIds().get(0)); + Assertions.assertEquals(6901468364845194264L, response.iterator().next().vlans().get(0)); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListMockTests.java index 1e553f185632..397573a8be29 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/TrunkedNetworksListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,6 +11,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType; import com.azure.resourcemanager.networkcloud.models.TrunkedNetwork; import java.nio.charset.StandardCharsets; @@ -23,7 +24,7 @@ public final class TrunkedNetworksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"vitmdmuqohhih\",\"extendedLocation\":{\"name\":\"a\",\"type\":\"quddrwjclj\"},\"properties\":{\"associatedResourceIds\":[\"lhpv\",\"adbwe\",\"ninafhxrz\"],\"clusterId\":\"m\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"ucwviqllukhkrcq\",\"hybridAksClustersAssociatedIds\":[\"bvzarmq\",\"bpoksts\",\"nvago\"],\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"d\",\"isolationDomainIds\":[\"brdvce\",\"qwh\",\"txnmxgnmguz\"],\"provisioningState\":\"Canceled\",\"virtualMachinesAssociatedIds\":[\"rbalkjnb\",\"bdhlltq\"],\"vlans\":[5165185335468616668,1776299933017387749,217833730888954029,4190381666651264959]},\"location\":\"necova\",\"tags\":{\"anlxunpq\":\"heu\",\"aslgacizuxlrarwp\":\"ckqiawzlzk\",\"ytnkqb\":\"wsaudoejtighsxj\"},\"id\":\"lahovuuwx\",\"name\":\"mehjnhjioti\",\"type\":\"fbbcngkegxcypxbb\"}]}"; + = "{\"value\":[{\"properties\":{\"hybridAksPluginType\":\"DPDK\",\"interfaceName\":\"b\",\"isolationDomainIds\":[\"atwfauj\",\"gqdtadrakg\",\"dhjkrukizy\",\"gsq\"],\"vlans\":[7246970809169737497,2514576016590060824],\"associatedResourceIds\":[\"fpjbqggwe\",\"iwdhdmncgbfzu\"],\"clusterId\":\"stunmlh\",\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"klciichgjsysm\",\"hybridAksClustersAssociatedIds\":[\"dgwxfkzsifcu\"],\"virtualMachinesAssociatedIds\":[\"u\",\"gcwx\",\"ec\"],\"provisioningState\":\"Provisioning\"},\"etag\":\"trdxri\",\"extendedLocation\":{\"name\":\"agbbgia\",\"type\":\"CustomLocation\"},\"location\":\"ykpgd\",\"tags\":{\"lcdosqkpt\":\"abzrwiqrxha\",\"mmainwhe\":\"qgki\"},\"id\":\"xkpbqwun\",\"name\":\"obuizaz\",\"type\":\"elwgvydjufbnkl\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +34,16 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.trunkedNetworks().list(89327285, "xwnujvqyn", com.azure.core.util.Context.NONE); + = manager.trunkedNetworks().list(593163699, "g", com.azure.core.util.Context.NONE); - Assertions.assertEquals("necova", response.iterator().next().location()); - Assertions.assertEquals("heu", response.iterator().next().tags().get("anlxunpq")); - Assertions.assertEquals("a", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("quddrwjclj", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals(HybridAksPluginType.OSDEVICE, response.iterator().next().hybridAksPluginType()); - Assertions.assertEquals("d", response.iterator().next().interfaceName()); - Assertions.assertEquals("brdvce", response.iterator().next().isolationDomainIds().get(0)); - Assertions.assertEquals(5165185335468616668L, response.iterator().next().vlans().get(0)); + Assertions.assertEquals("ykpgd", response.iterator().next().location()); + Assertions.assertEquals("abzrwiqrxha", response.iterator().next().tags().get("lcdosqkpt")); + Assertions.assertEquals("agbbgia", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, + response.iterator().next().extendedLocation().type()); + Assertions.assertEquals(HybridAksPluginType.DPDK, response.iterator().next().hybridAksPluginType()); + Assertions.assertEquals("b", response.iterator().next().interfaceName()); + Assertions.assertEquals("atwfauj", response.iterator().next().isolationDomainIds().get(0)); + Assertions.assertEquals(7246970809169737497L, response.iterator().next().vlans().get(0)); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/UserAssignedIdentityTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/UserAssignedIdentityTests.java index 0e7669bdff83..161e3512fe0d 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/UserAssignedIdentityTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/UserAssignedIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -10,9 +10,9 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"2351a4e7-de83-494f-a937-b54d02ca59e2\",\"clientId\":\"91a543c1-0729-469c-ab85-527eb1696545\"}") - .toObject(UserAssignedIdentity.class); + UserAssignedIdentity model + = BinaryData.fromString("{\"principalId\":\"elsfeaen\",\"clientId\":\"bfatklddxbjhwu\"}") + .toObject(UserAssignedIdentity.class); } @org.junit.jupiter.api.Test diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ValidationThresholdTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ValidationThresholdTests.java index 8e397a04dea1..89b48fd7db95 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ValidationThresholdTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/ValidationThresholdTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,21 +14,21 @@ public final class ValidationThresholdTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ValidationThreshold model = BinaryData - .fromString("{\"grouping\":\"PerCluster\",\"type\":\"PercentSuccess\",\"value\":162175660969635758}") + .fromString("{\"grouping\":\"PerRack\",\"type\":\"PercentSuccess\",\"value\":3600159393956753307}") .toObject(ValidationThreshold.class); - Assertions.assertEquals(ValidationThresholdGrouping.PER_CLUSTER, model.grouping()); + Assertions.assertEquals(ValidationThresholdGrouping.PER_RACK, model.grouping()); Assertions.assertEquals(ValidationThresholdType.PERCENT_SUCCESS, model.type()); - Assertions.assertEquals(162175660969635758L, model.value()); + Assertions.assertEquals(3600159393956753307L, model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ValidationThreshold model = new ValidationThreshold().withGrouping(ValidationThresholdGrouping.PER_CLUSTER) + ValidationThreshold model = new ValidationThreshold().withGrouping(ValidationThresholdGrouping.PER_RACK) .withType(ValidationThresholdType.PERCENT_SUCCESS) - .withValue(162175660969635758L); + .withValue(3600159393956753307L); model = BinaryData.fromObject(model).toObject(ValidationThreshold.class); - Assertions.assertEquals(ValidationThresholdGrouping.PER_CLUSTER, model.grouping()); + Assertions.assertEquals(ValidationThresholdGrouping.PER_RACK, model.grouping()); Assertions.assertEquals(ValidationThresholdType.PERCENT_SUCCESS, model.type()); - Assertions.assertEquals(162175660969635758L, model.value()); + Assertions.assertEquals(3600159393956753307L, model.value()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachineAssignRelayParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachineAssignRelayParametersTests.java index 967f23f659aa..49193a2dd5bb 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachineAssignRelayParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachineAssignRelayParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,18 +13,18 @@ public final class VirtualMachineAssignRelayParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineAssignRelayParameters model - = BinaryData.fromString("{\"machineId\":\"essmzhhku\",\"relayType\":\"Platform\"}") + = BinaryData.fromString("{\"machineId\":\"digsxcdgl\",\"relayType\":\"Platform\"}") .toObject(VirtualMachineAssignRelayParameters.class); - Assertions.assertEquals("essmzhhku", model.machineId()); + Assertions.assertEquals("digsxcdgl", model.machineId()); Assertions.assertEquals(RelayType.PLATFORM, model.relayType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualMachineAssignRelayParameters model - = new VirtualMachineAssignRelayParameters().withMachineId("essmzhhku").withRelayType(RelayType.PLATFORM); + = new VirtualMachineAssignRelayParameters().withMachineId("digsxcdgl").withRelayType(RelayType.PLATFORM); model = BinaryData.fromObject(model).toObject(VirtualMachineAssignRelayParameters.class); - Assertions.assertEquals("essmzhhku", model.machineId()); + Assertions.assertEquals("digsxcdgl", model.machineId()); Assertions.assertEquals(RelayType.PLATFORM, model.relayType()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinePlacementHintTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinePlacementHintTests.java index 4d19bd0fa11e..389a59c6ac20 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinePlacementHintTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinePlacementHintTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -15,25 +15,25 @@ public final class VirtualMachinePlacementHintTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachinePlacementHint model = BinaryData.fromString( - "{\"hintType\":\"AntiAffinity\",\"resourceId\":\"w\",\"schedulingExecution\":\"Soft\",\"scope\":\"Machine\"}") + "{\"hintType\":\"AntiAffinity\",\"resourceId\":\"igrfihotjewl\",\"schedulingExecution\":\"Soft\",\"scope\":\"Rack\"}") .toObject(VirtualMachinePlacementHint.class); Assertions.assertEquals(VirtualMachinePlacementHintType.ANTI_AFFINITY, model.hintType()); - Assertions.assertEquals("w", model.resourceId()); + Assertions.assertEquals("igrfihotjewl", model.resourceId()); Assertions.assertEquals(VirtualMachineSchedulingExecution.SOFT, model.schedulingExecution()); - Assertions.assertEquals(VirtualMachinePlacementHintPodAffinityScope.MACHINE, model.scope()); + Assertions.assertEquals(VirtualMachinePlacementHintPodAffinityScope.RACK, model.scope()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualMachinePlacementHint model = new VirtualMachinePlacementHint().withHintType(VirtualMachinePlacementHintType.ANTI_AFFINITY) - .withResourceId("w") + .withResourceId("igrfihotjewl") .withSchedulingExecution(VirtualMachineSchedulingExecution.SOFT) - .withScope(VirtualMachinePlacementHintPodAffinityScope.MACHINE); + .withScope(VirtualMachinePlacementHintPodAffinityScope.RACK); model = BinaryData.fromObject(model).toObject(VirtualMachinePlacementHint.class); Assertions.assertEquals(VirtualMachinePlacementHintType.ANTI_AFFINITY, model.hintType()); - Assertions.assertEquals("w", model.resourceId()); + Assertions.assertEquals("igrfihotjewl", model.resourceId()); Assertions.assertEquals(VirtualMachineSchedulingExecution.SOFT, model.schedulingExecution()); - Assertions.assertEquals(VirtualMachinePlacementHintPodAffinityScope.MACHINE, model.scope()); + Assertions.assertEquals(VirtualMachinePlacementHintPodAffinityScope.RACK, model.scope()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinePowerOffParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinePowerOffParametersTests.java index 11f0982c2bea..f261b0a5b38f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinePowerOffParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VirtualMachinePowerOffParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumeInnerTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumeInnerTests.java index a089fddc257c..4e23d44406f6 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumeInnerTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumeInnerTests.java @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.networkcloud.fluent.models.VolumeInner; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -15,30 +16,31 @@ public final class VolumeInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeInner model = BinaryData.fromString( - "{\"etag\":\"r\",\"extendedLocation\":{\"name\":\"moucsofldpuviyfc\",\"type\":\"abeolhbhlvbm\"},\"properties\":{\"allocatedSizeMiB\":1945796688920432745,\"attachedTo\":[\"xtkcudfbsfar\"],\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"wlkjxn\",\"provisioningState\":\"Failed\",\"serialNumber\":\"gf\",\"sizeMiB\":8145230125096169194,\"storageApplianceId\":\"qyki\"},\"location\":\"d\",\"tags\":{\"ycjimryvwgcwwpbm\":\"oafcluqvox\"},\"id\":\"gwe\",\"name\":\"ydsx\",\"type\":\"efoh\"}") + "{\"properties\":{\"sizeMiB\":1729116644305213337,\"storageApplianceId\":\"htomflrytswfp\",\"allocatedSizeMiB\":7106258411472210858,\"assignedStorageApplianceId\":\"cxnmskwhqjjyslu\",\"attachedTo\":[\"shhkvpedw\",\"slsrhmpq\",\"wwsko\",\"dcbrwimuvq\"],\"detailedStatus\":\"Active\",\"detailedStatusMessage\":\"ovyrrleaesinu\",\"serialNumber\":\"ljqobbpihehcecyb\",\"provisioningState\":\"Accepted\"},\"etag\":\"rjb\",\"extendedLocation\":{\"name\":\"mpxdlvy\",\"type\":\"CustomLocation\"},\"location\":\"e\",\"tags\":{\"qwjksghudgz\":\"s\",\"ggsvoujkxibdaf\":\"xog\",\"xfbvfb\":\"rkmdyom\",\"rhpw\":\"dy\"},\"id\":\"gddeimaw\",\"name\":\"o\",\"type\":\"gkkumuikjcj\"}") .toObject(VolumeInner.class); - Assertions.assertEquals("d", model.location()); - Assertions.assertEquals("oafcluqvox", model.tags().get("ycjimryvwgcwwpbm")); - Assertions.assertEquals("moucsofldpuviyfc", model.extendedLocation().name()); - Assertions.assertEquals("abeolhbhlvbm", model.extendedLocation().type()); - Assertions.assertEquals(8145230125096169194L, model.sizeMiB()); - Assertions.assertEquals("qyki", model.storageApplianceId()); + Assertions.assertEquals("e", model.location()); + Assertions.assertEquals("s", model.tags().get("qwjksghudgz")); + Assertions.assertEquals("mpxdlvy", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.extendedLocation().type()); + Assertions.assertEquals(1729116644305213337L, model.sizeMiB()); + Assertions.assertEquals("htomflrytswfp", model.storageApplianceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeInner model = new VolumeInner().withLocation("d") - .withTags(mapOf("ycjimryvwgcwwpbm", "oafcluqvox")) - .withExtendedLocation(new ExtendedLocation().withName("moucsofldpuviyfc").withType("abeolhbhlvbm")) - .withSizeMiB(8145230125096169194L) - .withStorageApplianceId("qyki"); + VolumeInner model = new VolumeInner().withLocation("e") + .withTags(mapOf("qwjksghudgz", "s", "ggsvoujkxibdaf", "xog", "xfbvfb", "rkmdyom", "rhpw", "dy")) + .withExtendedLocation( + new ExtendedLocation().withName("mpxdlvy").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withSizeMiB(1729116644305213337L) + .withStorageApplianceId("htomflrytswfp"); model = BinaryData.fromObject(model).toObject(VolumeInner.class); - Assertions.assertEquals("d", model.location()); - Assertions.assertEquals("oafcluqvox", model.tags().get("ycjimryvwgcwwpbm")); - Assertions.assertEquals("moucsofldpuviyfc", model.extendedLocation().name()); - Assertions.assertEquals("abeolhbhlvbm", model.extendedLocation().type()); - Assertions.assertEquals(8145230125096169194L, model.sizeMiB()); - Assertions.assertEquals("qyki", model.storageApplianceId()); + Assertions.assertEquals("e", model.location()); + Assertions.assertEquals("s", model.tags().get("qwjksghudgz")); + Assertions.assertEquals("mpxdlvy", model.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.extendedLocation().type()); + Assertions.assertEquals(1729116644305213337L, model.sizeMiB()); + Assertions.assertEquals("htomflrytswfp", model.storageApplianceId()); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumeListTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumeListTests.java index da91402841f6..3aa3d61e6638 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumeListTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumeListTests.java @@ -1,69 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.networkcloud.fluent.models.VolumeInner; -import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; -import com.azure.resourcemanager.networkcloud.models.VolumeList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.networkcloud.implementation.models.VolumeList; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import org.junit.jupiter.api.Assertions; public final class VolumeListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeList model = BinaryData.fromString( - "{\"nextLink\":\"fqkfuarenl\",\"value\":[{\"etag\":\"klnvnafvvkyfede\",\"extendedLocation\":{\"name\":\"jboslcqxypok\",\"type\":\"hminqcymczngnbdx\"},\"properties\":{\"allocatedSizeMiB\":5929229428598126104,\"attachedTo\":[\"nvudbchaqdtvqecr\",\"ct\"],\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"tddmf\",\"provisioningState\":\"Canceled\",\"serialNumber\":\"tx\",\"sizeMiB\":3534624948212489198,\"storageApplianceId\":\"napxbannovv\"},\"location\":\"czytprwn\",\"tags\":{\"rouuxvnsasbcry\":\"oevytlyokr\",\"izrxklob\":\"o\"},\"id\":\"xnazpmkml\",\"name\":\"vevfxz\",\"type\":\"pj\"},{\"etag\":\"zxlioh\",\"extendedLocation\":{\"name\":\"d\",\"type\":\"dtfgxqbawpcbb\"},\"properties\":{\"allocatedSizeMiB\":2776880760546842080,\"attachedTo\":[\"napqo\",\"yuicdhzbdy\"],\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"bdvibidmhmwffpl\",\"provisioningState\":\"Accepted\",\"serialNumber\":\"apckccrrvw\",\"sizeMiB\":5172465473466396677,\"storageApplianceId\":\"oy\"},\"location\":\"k\",\"tags\":{\"pyyrmfs\":\"immoiroqboshbrag\",\"opfppdbwnupgah\":\"bpav\",\"jcaacfdmmcpugm\":\"kuma\"},\"id\":\"hqepvufhbzehewh\",\"name\":\"qhnlbqnbld\",\"type\":\"eaclgschorimk\"}]}") + "{\"value\":[{\"properties\":{\"sizeMiB\":4701444639628716569,\"storageApplianceId\":\"eu\",\"allocatedSizeMiB\":3494867884167863109,\"assignedStorageApplianceId\":\"ecpaxwkufyk\",\"attachedTo\":[\"hxepmrutzna\",\"aobn\"],\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"djltymkm\",\"serialNumber\":\"uihywart\",\"provisioningState\":\"Provisioning\"},\"etag\":\"kixkykxdssjpemm\",\"extendedLocation\":{\"name\":\"cfxhikkflrmy\",\"type\":\"EdgeZone\"},\"location\":\"nc\",\"tags\":{\"gqcg\":\"riswslmiiio\"},\"id\":\"uugqk\",\"name\":\"totiowlxteqdptjg\",\"type\":\"dtguk\"},{\"properties\":{\"sizeMiB\":4920247076088382341,\"storageApplianceId\":\"lwphqlkccuzgyg\",\"allocatedSizeMiB\":1419473330453448629,\"assignedStorageApplianceId\":\"iul\",\"attachedTo\":[\"iip\",\"glvawuwzdufypivl\",\"bbjpmcubkmif\"],\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"ubvphavpmhbrbqgv\",\"serialNumber\":\"vpbbt\",\"provisioningState\":\"Accepted\"},\"etag\":\"oknssqyzqedikdf\",\"extendedLocation\":{\"name\":\"db\",\"type\":\"EdgeZone\"},\"location\":\"rjgeih\",\"tags\":{\"xmjpbyep\":\"ggwfiwz\"},\"id\":\"mgtvlj\",\"name\":\"rc\",\"type\":\"yfqi\"},{\"properties\":{\"sizeMiB\":6617336734963620105,\"storageApplianceId\":\"npomy\",\"allocatedSizeMiB\":8598927623023900637,\"assignedStorageApplianceId\":\"vnuileey\",\"attachedTo\":[\"lpaugmrm\",\"jlrxwtoaukhfk\",\"cisiz\",\"oaedsxjwuivedwcg\"],\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"xeiqbpsmg\",\"serialNumber\":\"guamlj\",\"provisioningState\":\"Succeeded\"},\"etag\":\"msplzgaufcshhvn\",\"extendedLocation\":{\"name\":\"wgnxkympqanxrj\",\"type\":\"EdgeZone\"},\"location\":\"tw\",\"tags\":{\"shxcylhkg\":\"oypnyg\",\"ycphdrwjjkhvyo\":\"nsghp\"},\"id\":\"ac\",\"name\":\"u\",\"type\":\"vxnqmhrpqpd\"},{\"properties\":{\"sizeMiB\":7913636459879404649,\"storageApplianceId\":\"oi\",\"allocatedSizeMiB\":3374523693499834548,\"assignedStorageApplianceId\":\"f\",\"attachedTo\":[\"ifmcsypobkdqzr\",\"zsylollgt\"],\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"ydmxzj\",\"serialNumber\":\"p\",\"provisioningState\":\"Succeeded\"},\"etag\":\"rkihcirld\",\"extendedLocation\":{\"name\":\"fx\",\"type\":\"EdgeZone\"},\"location\":\"oxnbkkjanurnnqbn\",\"tags\":{\"gypxrxvbfihwuhvc\":\"izxqltgrd\",\"s\":\"a\",\"wqagnepzwa\":\"bxrblmliowxihspn\",\"qqqagwwrxaomzi\":\"lsbs\"},\"id\":\"glrrczez\",\"name\":\"hhltnjadhqo\",\"type\":\"wjqo\"}],\"nextLink\":\"eayfbpcmspl\"}") .toObject(VolumeList.class); - Assertions.assertEquals("fqkfuarenl", model.nextLink()); - Assertions.assertEquals("czytprwn", model.value().get(0).location()); - Assertions.assertEquals("oevytlyokr", model.value().get(0).tags().get("rouuxvnsasbcry")); - Assertions.assertEquals("jboslcqxypok", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("hminqcymczngnbdx", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(3534624948212489198L, model.value().get(0).sizeMiB()); - Assertions.assertEquals("napxbannovv", model.value().get(0).storageApplianceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeList model - = new VolumeList().withNextLink("fqkfuarenl") - .withValue(Arrays.asList( - new VolumeInner().withLocation("czytprwn") - .withTags(mapOf("rouuxvnsasbcry", "oevytlyokr", "izrxklob", "o")) - .withExtendedLocation( - new ExtendedLocation().withName("jboslcqxypok").withType("hminqcymczngnbdx")) - .withSizeMiB(3534624948212489198L) - .withStorageApplianceId("napxbannovv"), - new VolumeInner().withLocation("k") - .withTags( - mapOf("pyyrmfs", "immoiroqboshbrag", "opfppdbwnupgah", "bpav", "jcaacfdmmcpugm", "kuma")) - .withExtendedLocation(new ExtendedLocation().withName("d").withType("dtfgxqbawpcbb")) - .withSizeMiB(5172465473466396677L) - .withStorageApplianceId("oy"))); - model = BinaryData.fromObject(model).toObject(VolumeList.class); - Assertions.assertEquals("fqkfuarenl", model.nextLink()); - Assertions.assertEquals("czytprwn", model.value().get(0).location()); - Assertions.assertEquals("oevytlyokr", model.value().get(0).tags().get("rouuxvnsasbcry")); - Assertions.assertEquals("jboslcqxypok", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("hminqcymczngnbdx", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(3534624948212489198L, model.value().get(0).sizeMiB()); - Assertions.assertEquals("napxbannovv", model.value().get(0).storageApplianceId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("nc", model.value().get(0).location()); + Assertions.assertEquals("riswslmiiio", model.value().get(0).tags().get("gqcg")); + Assertions.assertEquals("cfxhikkflrmy", model.value().get(0).extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.value().get(0).extendedLocation().type()); + Assertions.assertEquals(4701444639628716569L, model.value().get(0).sizeMiB()); + Assertions.assertEquals("eu", model.value().get(0).storageApplianceId()); + Assertions.assertEquals("eayfbpcmspl", model.nextLink()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumePatchParametersTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumePatchParametersTests.java index 15bb938a7609..17a3c8b4c735 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumePatchParametersTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumePatchParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -14,17 +14,17 @@ public final class VolumePatchParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePatchParameters model = BinaryData.fromString( - "{\"tags\":{\"nwqjwgokn\":\"tcpoqma\",\"jbzten\":\"ejjjkxybwfdb\",\"us\":\"vkzykjtjknsxf\",\"upnqrmgjfb\":\"cdp\"}}") + "{\"tags\":{\"sggux\":\"oznnhdrlktgj\",\"ywaeeczgf\":\"eml\",\"blycsxzujksr\":\"ukklelss\",\"ewbidyvteowxv\":\"smdesqplpvmjcd\"}}") .toObject(VolumePatchParameters.class); - Assertions.assertEquals("tcpoqma", model.tags().get("nwqjwgokn")); + Assertions.assertEquals("oznnhdrlktgj", model.tags().get("sggux")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumePatchParameters model = new VolumePatchParameters().withTags( - mapOf("nwqjwgokn", "tcpoqma", "jbzten", "ejjjkxybwfdb", "us", "vkzykjtjknsxf", "upnqrmgjfb", "cdp")); + VolumePatchParameters model = new VolumePatchParameters().withTags(mapOf("sggux", "oznnhdrlktgj", "ywaeeczgf", + "eml", "blycsxzujksr", "ukklelss", "ewbidyvteowxv", "smdesqplpvmjcd")); model = BinaryData.fromObject(model).toObject(VolumePatchParameters.class); - Assertions.assertEquals("tcpoqma", model.tags().get("nwqjwgokn")); + Assertions.assertEquals("oznnhdrlktgj", model.tags().get("sggux")); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumePropertiesTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumePropertiesTests.java index 331739ec6152..76a9163da8fd 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumePropertiesTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -12,18 +12,18 @@ public final class VolumePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeProperties model = BinaryData.fromString( - "{\"allocatedSizeMiB\":2352862867370650267,\"attachedTo\":[\"wndyqleallk\",\"mtkhlowkxxpvbr\",\"fjmzsyzfho\"],\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"k\",\"provisioningState\":\"Provisioning\",\"serialNumber\":\"h\",\"sizeMiB\":1655044742724101731,\"storageApplianceId\":\"lpjrtwsz\"}") + "{\"sizeMiB\":4565782594636369377,\"storageApplianceId\":\"bwsnsqow\",\"allocatedSizeMiB\":5712048841217945904,\"assignedStorageApplianceId\":\"likytwvczcswka\",\"attachedTo\":[\"jyfdvlv\",\"b\",\"rnfxtgddp\",\"th\"],\"detailedStatus\":\"Active\",\"detailedStatusMessage\":\"naoyank\",\"serialNumber\":\"eqswanklty\",\"provisioningState\":\"Succeeded\"}") .toObject(VolumeProperties.class); - Assertions.assertEquals(1655044742724101731L, model.sizeMiB()); - Assertions.assertEquals("lpjrtwsz", model.storageApplianceId()); + Assertions.assertEquals(4565782594636369377L, model.sizeMiB()); + Assertions.assertEquals("bwsnsqow", model.storageApplianceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VolumeProperties model - = new VolumeProperties().withSizeMiB(1655044742724101731L).withStorageApplianceId("lpjrtwsz"); + = new VolumeProperties().withSizeMiB(4565782594636369377L).withStorageApplianceId("bwsnsqow"); model = BinaryData.fromObject(model).toObject(VolumeProperties.class); - Assertions.assertEquals(1655044742724101731L, model.sizeMiB()); - Assertions.assertEquals("lpjrtwsz", model.storageApplianceId()); + Assertions.assertEquals(4565782594636369377L, model.sizeMiB()); + Assertions.assertEquals("bwsnsqow", model.storageApplianceId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumesCreateOrUpdateMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumesCreateOrUpdateMockTests.java index 4576aad4c2c4..959295977de0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumesCreateOrUpdateMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumesCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,6 +11,7 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; import com.azure.resourcemanager.networkcloud.models.ExtendedLocation; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.Volume; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -24,7 +25,7 @@ public final class VolumesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"sozjvxdzciggbnv\",\"extendedLocation\":{\"name\":\"xofwalzy\",\"type\":\"whoea\"},\"properties\":{\"allocatedSizeMiB\":1090560148574517969,\"attachedTo\":[\"oeysfp\"],\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"wuuhauegnkwmnfe\",\"provisioningState\":\"Succeeded\",\"serialNumber\":\"jyrkwfug\",\"sizeMiB\":9221982839205722630,\"storageApplianceId\":\"rkuumn\"},\"location\":\"urhzzf\",\"tags\":{\"svwlujop\":\"eoq\",\"fmwc\":\"nibittoztjdqumq\",\"rbelfnzz\":\"ddtgctxegtvgwy\"},\"id\":\"yizwbxgdebxla\",\"name\":\"unomir\",\"type\":\"p\"}"; + = "{\"properties\":{\"sizeMiB\":1894227724898676418,\"storageApplianceId\":\"biwksde\",\"allocatedSizeMiB\":302403613316415534,\"assignedStorageApplianceId\":\"fpzvoikvntwczf\",\"attachedTo\":[\"shl\",\"xpblalh\",\"ezpfki\"],\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"dqzsaaoqdsgp\",\"serialNumber\":\"txjqfiafc\",\"provisioningState\":\"Succeeded\"},\"etag\":\"bfijzzcaoijol\",\"extendedLocation\":{\"name\":\"uauktwieopexelx\",\"type\":\"CustomLocation\"},\"location\":\"rswyilj\",\"tags\":{\"do\":\"kgxyxyauxre\"},\"id\":\"mcnltmwytkujsqyc\",\"name\":\"moxfablq\",\"type\":\"pwbmwhria\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,23 +35,23 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Volume response = manager.volumes() - .define("hnxlzbuwodmachb") - .withRegion("jwayhi") - .withExistingResourceGroup("sqc") - .withExtendedLocation(new ExtendedLocation().withName("rmvgoqplehmumkz").withType("llcz")) - .withSizeMiB(8672131710381210963L) - .withTags(mapOf("kslvlizedvb", "wwvg", "srgekzyqxadyfhb", "abv", "aqjsgyzstujr", "wkhojqttbspvkhg")) - .withStorageApplianceId("nhczbutoucgjt") - .withIfMatch("qwrldaxur") - .withIfNoneMatch("qa") + .define("dgsjsat") + .withRegion("wdwisvn") + .withExistingResourceGroup("fcvcewbwq") + .withExtendedLocation(new ExtendedLocation().withName("qqt").withType(ExtendedLocationType.CUSTOM_LOCATION)) + .withSizeMiB(3609336538530529746L) + .withTags(mapOf("yh", "lajamca", "yklleynqanhkiggl", "tpzcr")) + .withStorageApplianceId("mazdfsqxh") + .withIfMatch("yctajqz") + .withIfNoneMatch("vale") .create(); - Assertions.assertEquals("urhzzf", response.location()); - Assertions.assertEquals("eoq", response.tags().get("svwlujop")); - Assertions.assertEquals("xofwalzy", response.extendedLocation().name()); - Assertions.assertEquals("whoea", response.extendedLocation().type()); - Assertions.assertEquals(9221982839205722630L, response.sizeMiB()); - Assertions.assertEquals("rkuumn", response.storageApplianceId()); + Assertions.assertEquals("rswyilj", response.location()); + Assertions.assertEquals("kgxyxyauxre", response.tags().get("do")); + Assertions.assertEquals("uauktwieopexelx", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, response.extendedLocation().type()); + Assertions.assertEquals(1894227724898676418L, response.sizeMiB()); + Assertions.assertEquals("biwksde", response.storageApplianceId()); } // Use "Map.of" if available diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumesGetByResourceGroupWithResponseMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumesGetByResourceGroupWithResponseMockTests.java index f53c3b20ed37..ca2fdcac40f9 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumesGetByResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -10,6 +10,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.Volume; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,7 +22,7 @@ public final class VolumesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"etag\":\"gmusaictdscnkzzo\",\"extendedLocation\":{\"name\":\"nrddclzeqoz\",\"type\":\"ehlbzqixbnjrqvzy\"},\"properties\":{\"allocatedSizeMiB\":6346244026146843114,\"attachedTo\":[\"nynpameudpabcre\",\"wzosgy\"],\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"vasormrexzvdubew\",\"provisioningState\":\"Accepted\",\"serialNumber\":\"baduvecovsdq\",\"sizeMiB\":8704273485806855158,\"storageApplianceId\":\"dbakr\"},\"location\":\"mz\",\"tags\":{\"clngy\":\"pkeqsifj\",\"ombcdtajdopggo\":\"nhr\",\"qtrotpvclp\":\"wj\",\"vhxccbmkakmkoo\":\"fyrlmwkptskwxj\"},\"id\":\"bputmgvmuyakml\",\"name\":\"ktfowzkroyrdur\",\"type\":\"flzqjimejtgzjxx\"}"; + = "{\"properties\":{\"sizeMiB\":181851911706260962,\"storageApplianceId\":\"iwm\",\"allocatedSizeMiB\":375695126412184600,\"assignedStorageApplianceId\":\"dlhvdv\",\"attachedTo\":[\"hbeae\",\"jzmhkdclacroczfm\",\"ner\"],\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"xzs\",\"serialNumber\":\"zezbzu\",\"provisioningState\":\"Accepted\"},\"etag\":\"evzske\",\"extendedLocation\":{\"name\":\"cgwfsgqkstyecu\",\"type\":\"EdgeZone\"},\"location\":\"ijpardavsjcf\",\"tags\":{\"zvcmcokxi\":\"pzdqw\",\"nzvajbvbnkrdem\":\"ekuvfrjwuca\",\"misvpztd\":\"idackzidgzwdyd\",\"tpjfojiunrlshxuk\":\"vykpxkqe\"},\"id\":\"sykdtoi\",\"name\":\"oancdrco\",\"type\":\"nvxuldxonckb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +32,14 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Volume response = manager.volumes() - .getByResourceGroupWithResponse("gwjfkainjmuy", "vecvzts", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exmnv", "vmuw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("mz", response.location()); - Assertions.assertEquals("pkeqsifj", response.tags().get("clngy")); - Assertions.assertEquals("nrddclzeqoz", response.extendedLocation().name()); - Assertions.assertEquals("ehlbzqixbnjrqvzy", response.extendedLocation().type()); - Assertions.assertEquals(8704273485806855158L, response.sizeMiB()); - Assertions.assertEquals("dbakr", response.storageApplianceId()); + Assertions.assertEquals("ijpardavsjcf", response.location()); + Assertions.assertEquals("pzdqw", response.tags().get("zvcmcokxi")); + Assertions.assertEquals("cgwfsgqkstyecu", response.extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, response.extendedLocation().type()); + Assertions.assertEquals(181851911706260962L, response.sizeMiB()); + Assertions.assertEquals("iwm", response.storageApplianceId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumesListByResourceGroupMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumesListByResourceGroupMockTests.java index 58cf279e76c7..2f0ea4cd74d0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumesListByResourceGroupMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumesListByResourceGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,6 +11,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.Volume; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,7 +23,7 @@ public final class VolumesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"hkxfpwhdyslbklgl\",\"extendedLocation\":{\"name\":\"nn\",\"type\":\"kwayqshwy\"},\"properties\":{\"allocatedSizeMiB\":5138364005597798559,\"attachedTo\":[\"tb\",\"aqjmkgxqwque\"],\"detailedStatus\":\"Error\",\"detailedStatusMessage\":\"ztpziizevjykof\",\"provisioningState\":\"Accepted\",\"serialNumber\":\"fkhkqtwqlep\",\"sizeMiB\":6684999473360022351,\"storageApplianceId\":\"c\"},\"location\":\"fwzcntogffjwaj\",\"tags\":{\"stfzknhrkmjq\":\"wzvaqkifmxaw\"},\"id\":\"cfvdscnhemvwfnqq\",\"name\":\"ypvndrw\",\"type\":\"godtggrs\"}]}"; + = "{\"value\":[{\"properties\":{\"sizeMiB\":3960268840786703349,\"storageApplianceId\":\"iynd\",\"allocatedSizeMiB\":2150541271370935561,\"assignedStorageApplianceId\":\"sbfvdstrkzxsgtzn\",\"attachedTo\":[\"rds\"],\"detailedStatus\":\"Active\",\"detailedStatusMessage\":\"im\",\"serialNumber\":\"dnox\",\"provisioningState\":\"Canceled\"},\"etag\":\"qaqotnn\",\"extendedLocation\":{\"name\":\"xolousdv\",\"type\":\"EdgeZone\"},\"location\":\"tqm\",\"tags\":{\"btqgkujdsoox\":\"jdrpizfulgycts\",\"arikeejdpdfhtwmm\":\"qwoeurbtigapd\"},\"id\":\"fqbriqu\",\"name\":\"wwtrjm\",\"type\":\"qkvyhzokpoyuohu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +32,14 @@ public void testListByResourceGroup() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.volumes().listByResourceGroup("tcsubmzoo", 317518503, "vo", com.azure.core.util.Context.NONE); + PagedIterable response = manager.volumes() + .listByResourceGroup("lblfxlupibaqzizx", 782593007, "zweghlwwbogvg", com.azure.core.util.Context.NONE); - Assertions.assertEquals("fwzcntogffjwaj", response.iterator().next().location()); - Assertions.assertEquals("wzvaqkifmxaw", response.iterator().next().tags().get("stfzknhrkmjq")); - Assertions.assertEquals("nn", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("kwayqshwy", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals(6684999473360022351L, response.iterator().next().sizeMiB()); - Assertions.assertEquals("c", response.iterator().next().storageApplianceId()); + Assertions.assertEquals("tqm", response.iterator().next().location()); + Assertions.assertEquals("jdrpizfulgycts", response.iterator().next().tags().get("btqgkujdsoox")); + Assertions.assertEquals("xolousdv", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, response.iterator().next().extendedLocation().type()); + Assertions.assertEquals(3960268840786703349L, response.iterator().next().sizeMiB()); + Assertions.assertEquals("iynd", response.iterator().next().storageApplianceId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumesListMockTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumesListMockTests.java index 05b696b7a296..a1bef6104e56 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumesListMockTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VolumesListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -11,6 +11,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.networkcloud.NetworkCloudManager; +import com.azure.resourcemanager.networkcloud.models.ExtendedLocationType; import com.azure.resourcemanager.networkcloud.models.Volume; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,7 +23,7 @@ public final class VolumesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"z\",\"extendedLocation\":{\"name\":\"wihvaangqtnh\",\"type\":\"rfdmfdvbbaexx\"},\"properties\":{\"allocatedSizeMiB\":2111869483655368468,\"attachedTo\":[\"fkkauigvmua\"],\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"fedyuep\",\"provisioningState\":\"Succeeded\",\"serialNumber\":\"tidajjvyweocf\",\"sizeMiB\":2610208171754811537,\"storageApplianceId\":\"fjxokye\"},\"location\":\"yasvf\",\"tags\":{\"jekrknfd\":\"myg\"},\"id\":\"ugjqyckgtxkrdt\",\"name\":\"lcr\",\"type\":\"jdkl\"}]}"; + = "{\"value\":[{\"properties\":{\"sizeMiB\":2652660898093983743,\"storageApplianceId\":\"jnglpwsad\",\"allocatedSizeMiB\":4039935328242326223,\"assignedStorageApplianceId\":\"mxpezco\",\"attachedTo\":[\"jrmfqzwqd\",\"xkeedcnwmy\",\"xfqzkvemyzd\"],\"detailedStatus\":\"Provisioning\",\"detailedStatusMessage\":\"qpqifdbmptrwtxz\",\"serialNumber\":\"samonat\",\"provisioningState\":\"Accepted\"},\"etag\":\"xroqsqjghrmthspl\",\"extendedLocation\":{\"name\":\"sttxs\",\"type\":\"EdgeZone\"},\"location\":\"fq\",\"tags\":{\"sxyr\":\"iceovxgzw\",\"ik\":\"jmtikes\",\"dseipnquwzxhrp\":\"ohzixyqhfnkvycqq\"},\"id\":\"yodlhkfktltddsob\",\"name\":\"opnouhbqezkq\",\"type\":\"saluzyi\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +32,13 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.volumes().list(2103406504, "qwczsyiq", com.azure.core.util.Context.NONE); + PagedIterable response = manager.volumes().list(346934936, "snaajph", com.azure.core.util.Context.NONE); - Assertions.assertEquals("yasvf", response.iterator().next().location()); - Assertions.assertEquals("myg", response.iterator().next().tags().get("jekrknfd")); - Assertions.assertEquals("wihvaangqtnh", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("rfdmfdvbbaexx", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals(2610208171754811537L, response.iterator().next().sizeMiB()); - Assertions.assertEquals("fjxokye", response.iterator().next().storageApplianceId()); + Assertions.assertEquals("fq", response.iterator().next().location()); + Assertions.assertEquals("iceovxgzw", response.iterator().next().tags().get("sxyr")); + Assertions.assertEquals("sttxs", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, response.iterator().next().extendedLocation().type()); + Assertions.assertEquals(2652660898093983743L, response.iterator().next().sizeMiB()); + Assertions.assertEquals("jnglpwsad", response.iterator().next().storageApplianceId()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VulnerabilityScanningSettingsPatchTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VulnerabilityScanningSettingsPatchTests.java index 4caee97b4e6b..b9c5f3b4db5b 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VulnerabilityScanningSettingsPatchTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VulnerabilityScanningSettingsPatchTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VulnerabilityScanningSettingsTests.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VulnerabilityScanningSettingsTests.java index 9c53cfec8ad0..61b1dfb30c0f 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VulnerabilityScanningSettingsTests.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/test/java/com/azure/resourcemanager/networkcloud/generated/VulnerabilityScanningSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.networkcloud.generated; @@ -13,15 +13,15 @@ public final class VulnerabilityScanningSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VulnerabilityScanningSettings model - = BinaryData.fromString("{\"containerScan\":\"Enabled\"}").toObject(VulnerabilityScanningSettings.class); - Assertions.assertEquals(VulnerabilityScanningSettingsContainerScan.ENABLED, model.containerScan()); + = BinaryData.fromString("{\"containerScan\":\"Disabled\"}").toObject(VulnerabilityScanningSettings.class); + Assertions.assertEquals(VulnerabilityScanningSettingsContainerScan.DISABLED, model.containerScan()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VulnerabilityScanningSettings model - = new VulnerabilityScanningSettings().withContainerScan(VulnerabilityScanningSettingsContainerScan.ENABLED); + VulnerabilityScanningSettings model = new VulnerabilityScanningSettings() + .withContainerScan(VulnerabilityScanningSettingsContainerScan.DISABLED); model = BinaryData.fromObject(model).toObject(VulnerabilityScanningSettings.class); - Assertions.assertEquals(VulnerabilityScanningSettingsContainerScan.ENABLED, model.containerScan()); + Assertions.assertEquals(VulnerabilityScanningSettingsContainerScan.DISABLED, model.containerScan()); } } diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/tsp-location.yaml b/sdk/networkcloud/azure-resourcemanager-networkcloud/tsp-location.yaml new file mode 100644 index 000000000000..3cb63bbddd40 --- /dev/null +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/networkcloud/NetworkCloud.Management +commit: 13c2dbb75b6428e8a8e0751e40fe1e3dbc453d8b +repo: Azure/azure-rest-api-specs +additionalDirectories: